blob: 4f094ea65070208055764cb32b10850c1f3a8f46 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700685PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
Benjamin Petersonbed04b62019-09-09 05:13:00 -0700785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_libm
840with_libc
841enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800843with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100844with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100845with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800856CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700857PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858PKG_CONFIG
859PKG_CONFIG_PATH
860PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864ac_init_help=
865ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000866ac_unrecognized_opts=
867ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868# The variables have the same names as the options, with
869# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882x_includes=NONE
883x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
Benjamin Petersonbed04b62019-09-09 05:13:00 -0700899runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
Benjamin Petersonbed04b62019-09-09 05:13:00 -07001152 -runstatedir | --runstatedir | --runstatedi | --runstated \
1153 | --runstate | --runstat | --runsta | --runst | --runs \
1154 | --run | --ru | --r)
1155 ac_prev=runstatedir ;;
1156 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1157 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1158 | --run=* | --ru=* | --r=*)
1159 runstatedir=$ac_optarg ;;
1160
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1162 ac_prev=sbindir ;;
1163 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1164 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
1167 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169 | --sharedst | --shareds | --shared | --share | --shar \
1170 | --sha | --sh)
1171 ac_prev=sharedstatedir ;;
1172 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1175 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 -site | --site | --sit)
1179 ac_prev=site ;;
1180 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1184 ac_prev=srcdir ;;
1185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189 | --syscon | --sysco | --sysc | --sys | --sy)
1190 ac_prev=sysconfdir ;;
1191 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001194
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1201 verbose=yes ;;
1202
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 -version | --version | --versio | --versi | --vers | -V)
1204 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt_orig=$ac_useropt
1212 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213 case $ac_user_opts in
1214 *"
1215"with_$ac_useropt"
1216"*) ;;
1217 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218 ac_unrecognized_sep=', ';;
1219 esac
1220 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt_orig=$ac_useropt
1228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229 case $ac_user_opts in
1230 *"
1231"with_$ac_useropt"
1232"*) ;;
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
1235 esac
1236 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 --x)
1239 # Obsolete; use --with-x.
1240 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243 | --x-incl | --x-inc | --x-in | --x-i)
1244 ac_prev=x_includes ;;
1245 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
1249 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251 ac_prev=x_libraries ;;
1252 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ;;
1259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 *=*)
1261 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 case $ac_envvar in #(
1264 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 export $ac_envvar ;;
1269
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001270 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001275 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 ;;
1277
1278 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279done
1280
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
1285
Matthias Kloseb9621712010-04-24 17:59:49 +00001286if test -n "$ac_unrecognized_opts"; then
1287 case $enable_option_checking in
1288 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291 esac
1292fi
1293
1294# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296 datadir sysconfdir sharedstatedir localstatedir includedir \
1297 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersonbed04b62019-09-09 05:13:00 -07001298 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 # Remove trailing slashes.
1302 case $ac_val in
1303 */ )
1304 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305 eval $ac_var=\$ac_val;;
1306 esac
1307 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 [\\/$]* | ?:[\\/]* ) continue;;
1310 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001313done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# There might be people who depend on the old broken behavior: `$host'
1316# used to hold the argument of --host etc.
1317# FIXME: To remove some day.
1318build=$build_alias
1319host=$host_alias
1320target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322# FIXME: To remove some day.
1323if test "x$host_alias" != x; then
1324 if test "x$build_alias" = x; then
1325 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 elif test "x$build_alias" != "x$host_alias"; then
1327 cross_compiling=yes
1328 fi
1329fi
1330
1331ac_tool_prefix=
1332test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334test "$silent" = yes && exec 6>/dev/null
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338ac_ls_di=`ls -di .` &&
1339ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343
1344
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345# Find the source files, if location was not specified.
1346if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 ac_confdir=`$as_dirname -- "$as_myself" ||
1350$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351 X"$as_myself" : 'X\(//\)[^/]' \| \
1352 X"$as_myself" : 'X\(//\)$' \| \
1353 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\/\)[^/].*/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\/\)$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\).*/{
1368 s//\1/
1369 q
1370 }
1371 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001372 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001374 srcdir=..
1375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376else
1377 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379if test ! -r "$srcdir/$ac_unique_file"; then
1380 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386 pwd)`
1387# When building in place, set srcdir=.
1388if test "$ac_abs_confdir" = "$ac_pwd"; then
1389 srcdir=.
1390fi
1391# Remove unnecessary trailing slashes from srcdir.
1392# Double slashes in file names in object file debugging info
1393# mess up M-x gdb in Emacs.
1394case $srcdir in
1395*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1396esac
1397for ac_var in $ac_precious_vars; do
1398 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_env_${ac_var}_value=\$${ac_var}
1400 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1402done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001403
Martin v. Löwis11437992002-04-12 09:54:03 +00001404#
1405# Report the --help message.
1406#
1407if test "$ac_init_help" = "long"; then
1408 # Omit some internal or obsolete options to make the list less imposing.
1409 # This message is too long to be a string in the A/UX 3.1 sh.
1410 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001411\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413Usage: $0 [OPTION]... [VAR=VALUE]...
1414
1415To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416VAR=VALUE. See below for descriptions of some of the useful variables.
1417
1418Defaults for the options are specified in brackets.
1419
1420Configuration:
1421 -h, --help display this help and exit
1422 --help=short display options specific to this package
1423 --help=recursive display the short help of all the included packages
1424 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001425 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --cache-file=FILE cache test results in FILE [disabled]
1427 -C, --config-cache alias for \`--cache-file=config.cache'
1428 -n, --no-create do not create output files
1429 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1430
Martin v. Löwis11437992002-04-12 09:54:03 +00001431Installation directories:
1432 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437By default, \`make install' will install all the files in
1438\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1439an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440for instance \`--prefix=\$HOME'.
1441
1442For better control, use the options below.
1443
1444Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --bindir=DIR user executables [EPREFIX/bin]
1446 --sbindir=DIR system admin executables [EPREFIX/sbin]
1447 --libexecdir=DIR program executables [EPREFIX/libexec]
1448 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1449 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1450 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersonbed04b62019-09-09 05:13:00 -07001451 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 --libdir=DIR object code libraries [EPREFIX/lib]
1453 --includedir=DIR C header files [PREFIX/include]
1454 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1455 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1456 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1457 --infodir=DIR info documentation [DATAROOTDIR/info]
1458 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1459 --mandir=DIR man documentation [DATAROOTDIR/man]
1460 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1461 --htmldir=DIR html documentation [DOCDIR]
1462 --dvidir=DIR dvi documentation [DOCDIR]
1463 --pdfdir=DIR pdf documentation [DOCDIR]
1464 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466
1467 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001468
1469System types:
1470 --build=BUILD configure for building on BUILD [guessed]
1471 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001477 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001491 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1492 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
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
1504 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001505 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1506 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001507 --with-framework-name=FRAMEWORK
1508 specify an alternate name of the framework built
1509 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-cxx-main=<compiler>
1511 compile main() and link python executable with C++
1512 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-suffix=.exe set executable suffix
1514 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001515 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001516 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001517 --with-lto Enable Link Time Optimization in any build. Disabled
1518 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001519 --with-hash-algorithm=[fnv|siphash24]
1520 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001521 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001522 enable AddressSanitizer (asan)
1523 --with-memory-sanitizer enable MemorySanitizer (msan)
1524 --with-undefined-behavior-sanitizer
1525 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001527 --with-system-expat build pyexpat module using an installed expat
1528 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001529 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001530 --with-system-libmpdec build _decimal module using an installed libmpdec
1531 library
Ned Deilyd819b932013-09-06 01:07:05 -07001532 --with-tcltk-includes='-I...'
1533 override search for Tcl and Tk include files
1534 --with-tcltk-libs='-L...'
1535 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001536 --with-dbmliborder=db1:db2:...
1537 order to check db backends for dbm. Valid value is a
1538 colon separated string with the backend names
1539 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with(out)-doc-strings disable/enable documentation strings
1541 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001542 --with(out)-c-locale-coercion
1543 disable/enable C locale coercion to a UTF-8 based
1544 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001545 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001546 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001547 --with-libm=STRING math library
1548 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001549 --with(out)-computed-gotos
1550 Use computed gotos in evaluation loop (enabled by
1551 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001552 --with(out)-ensurepip=[=upgrade]
1553 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001554 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001555 --with-ssl-default-suites=[python|openssl|STRING]
1556 Override default cipher suites string, python: use
1557 Python's preferred selection (default), openssl:
1558 leave OpenSSL's defaults untouched, STRING: use a
1559 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001562 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001571 PROFILE_TASK
1572 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001573 PKG_CONFIG path to pkg-config utility
1574 PKG_CONFIG_PATH
1575 directories to add to pkg-config's search path
1576 PKG_CONFIG_LIBDIR
1577 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001578
1579Use these variables to override the choices made by `configure' or to help
1580it to find libraries and programs with nonstandard names/locations.
1581
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001582Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001583_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001585fi
1586
1587if test "$ac_init_help" = "recursive"; then
1588 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 test -d "$ac_dir" ||
1591 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1592 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_builddir=.
1594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595case "$ac_dir" in
1596.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1597*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001598 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001600 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 case $ac_top_builddir_sub in
1602 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1603 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1604 esac ;;
1605esac
1606ac_abs_top_builddir=$ac_pwd
1607ac_abs_builddir=$ac_pwd$ac_dir_suffix
1608# for backward compatibility:
1609ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
1611case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 ac_top_srcdir=$ac_top_builddir_sub
1615 ac_abs_top_srcdir=$ac_pwd ;;
1616 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 ac_top_srcdir=$srcdir
1619 ac_abs_top_srcdir=$srcdir ;;
1620 *) # Relative name.
1621 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1622 ac_top_srcdir=$ac_top_build_prefix$srcdir
1623 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001624esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 cd "$ac_dir" || { ac_status=$?; continue; }
1628 # Check for guested configure.
1629 if test -f "$ac_srcdir/configure.gnu"; then
1630 echo &&
1631 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1632 elif test -f "$ac_srcdir/configure"; then
1633 echo &&
1634 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001636 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 fi || ac_status=$?
1638 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 done
1640fi
1641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001643if $ac_init_version; then
1644 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001645python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001646generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001647
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001648Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001649This configure script is free software; the Free Software Foundation
1650gives unlimited permission to copy, distribute and modify it.
1651_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001652 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001654
1655## ------------------------ ##
1656## Autoconf initialization. ##
1657## ------------------------ ##
1658
1659# ac_fn_c_try_compile LINENO
1660# --------------------------
1661# Try to compile conftest.$ac_ext, and return whether this succeeded.
1662ac_fn_c_try_compile ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 rm -f conftest.$ac_objext
1666 if { { ac_try="$ac_compile"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_compile") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1681 test $ac_status = 0; } && {
1682 test -z "$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 } && test -s conftest.$ac_objext; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_compile
1696
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001697# ac_fn_c_try_cpp LINENO
1698# ----------------------
1699# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1700ac_fn_c_try_cpp ()
1701{
1702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1703 if { { ac_try="$ac_cpp conftest.$ac_ext"
1704case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1711 ac_status=$?
1712 if test -s conftest.err; then
1713 grep -v '^ *+' conftest.err >conftest.er1
1714 cat conftest.er1 >&5
1715 mv -f conftest.er1 conftest.err
1716 fi
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; } > conftest.i && {
1719 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1720 test ! -s conftest.err
1721 }; then :
1722 ac_retval=0
1723else
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=1
1728fi
1729 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_cpp
1733
Matthias Kloseb9621712010-04-24 17:59:49 +00001734# ac_fn_c_try_link LINENO
1735# -----------------------
1736# Try to link conftest.$ac_ext, and return whether this succeeded.
1737ac_fn_c_try_link ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 rm -f conftest.$ac_objext conftest$ac_exeext
1741 if { { ac_try="$ac_link"
1742case "(($ac_try" in
1743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1744 *) ac_try_echo=$ac_try;;
1745esac
1746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1747$as_echo "$ac_try_echo"; } >&5
1748 (eval "$ac_link") 2>conftest.err
1749 ac_status=$?
1750 if test -s conftest.err; then
1751 grep -v '^ *+' conftest.err >conftest.er1
1752 cat conftest.er1 >&5
1753 mv -f conftest.er1 conftest.err
1754 fi
1755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756 test $ac_status = 0; } && {
1757 test -z "$ac_c_werror_flag" ||
1758 test ! -s conftest.err
1759 } && test -s conftest$ac_exeext && {
1760 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001761 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 }; then :
1763 ac_retval=0
1764else
1765 $as_echo "$as_me: failed program was:" >&5
1766sed 's/^/| /' conftest.$ac_ext >&5
1767
1768 ac_retval=1
1769fi
1770 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1771 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1772 # interfere with the next link command; also delete a directory that is
1773 # left behind by Apple's compiler. We do this before executing the actions.
1774 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 as_fn_set_status $ac_retval
1777
1778} # ac_fn_c_try_link
1779
Matthias Kloseb9621712010-04-24 17:59:49 +00001780# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1781# -------------------------------------------------------
1782# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1783# the include files in INCLUDES and setting the cache variable VAR
1784# accordingly.
1785ac_fn_c_check_header_mongrel ()
1786{
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001788 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1790$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001791if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 $as_echo_n "(cached) " >&6
1793fi
1794eval ac_res=\$$3
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1796$as_echo "$ac_res" >&6; }
1797else
1798 # Is the header compilable?
1799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1800$as_echo_n "checking $2 usability... " >&6; }
1801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802/* end confdefs.h. */
1803$4
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_compile "$LINENO"; then :
1807 ac_header_compiler=yes
1808else
1809 ac_header_compiler=no
1810fi
1811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1813$as_echo "$ac_header_compiler" >&6; }
1814
1815# Is the header present?
1816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1817$as_echo_n "checking $2 presence... " >&6; }
1818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820#include <$2>
1821_ACEOF
1822if ac_fn_c_try_cpp "$LINENO"; then :
1823 ac_header_preproc=yes
1824else
1825 ac_header_preproc=no
1826fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001827rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1829$as_echo "$ac_header_preproc" >&6; }
1830
1831# So? What about this header?
1832case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1833 yes:no: )
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1835$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1838 ;;
1839 no:yes:* )
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1841$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1843$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1845$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1847$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1849$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001850( $as_echo "## --------------------------------------- ##
1851## Report this to https://bugs.python.org/ ##
1852## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001853 ) | sed "s/^/$as_me: WARNING: /" >&2
1854 ;;
1855esac
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1857$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001858if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001859 $as_echo_n "(cached) " >&6
1860else
1861 eval "$3=\$ac_header_compiler"
1862fi
1863eval ac_res=\$$3
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1865$as_echo "$ac_res" >&6; }
1866fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001867 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001868
1869} # ac_fn_c_check_header_mongrel
1870
1871# ac_fn_c_try_run LINENO
1872# ----------------------
1873# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1874# that executables *can* be run.
1875ac_fn_c_try_run ()
1876{
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878 if { { ac_try="$ac_link"
1879case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_link") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1889 { { case "(($ac_try" in
1890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1891 *) ac_try_echo=$ac_try;;
1892esac
1893eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1894$as_echo "$ac_try_echo"; } >&5
1895 (eval "$ac_try") 2>&5
1896 ac_status=$?
1897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1898 test $ac_status = 0; }; }; then :
1899 ac_retval=0
1900else
1901 $as_echo "$as_me: program exited with status $ac_status" >&5
1902 $as_echo "$as_me: failed program was:" >&5
1903sed 's/^/| /' conftest.$ac_ext >&5
1904
1905 ac_retval=$ac_status
1906fi
1907 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 as_fn_set_status $ac_retval
1910
1911} # ac_fn_c_try_run
1912
1913# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1914# -------------------------------------------------------
1915# Tests whether HEADER exists and can be compiled using the include files in
1916# INCLUDES, setting the cache variable VAR accordingly.
1917ac_fn_c_check_header_compile ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001922if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001923 $as_echo_n "(cached) " >&6
1924else
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928#include <$2>
1929_ACEOF
1930if ac_fn_c_try_compile "$LINENO"; then :
1931 eval "$3=yes"
1932else
1933 eval "$3=no"
1934fi
1935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1936fi
1937eval ac_res=\$$3
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1939$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001941
1942} # ac_fn_c_check_header_compile
1943
Matthias Kloseb9621712010-04-24 17:59:49 +00001944# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1945# -------------------------------------------
1946# Tests whether TYPE exists after having included INCLUDES, setting cache
1947# variable VAR accordingly.
1948ac_fn_c_check_type ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1952$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001953if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001954 $as_echo_n "(cached) " >&6
1955else
1956 eval "$3=no"
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960int
1961main ()
1962{
1963if (sizeof ($2))
1964 return 0;
1965 ;
1966 return 0;
1967}
1968_ACEOF
1969if ac_fn_c_try_compile "$LINENO"; then :
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$4
1973int
1974main ()
1975{
1976if (sizeof (($2)))
1977 return 0;
1978 ;
1979 return 0;
1980}
1981_ACEOF
1982if ac_fn_c_try_compile "$LINENO"; then :
1983
1984else
1985 eval "$3=yes"
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1990fi
1991eval ac_res=\$$3
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1993$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001994 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996} # ac_fn_c_check_type
1997
Matthias Kloseb9621712010-04-24 17:59:49 +00001998# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1999# --------------------------------------------
2000# Tries to find the compile-time value of EXPR in a program that includes
2001# INCLUDES, setting VAR accordingly. Returns whether the value could be
2002# computed
2003ac_fn_c_compute_int ()
2004{
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 if test "$cross_compiling" = yes; then
2007 # Depending upon the size, compute the lo and hi bounds.
2008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011int
2012main ()
2013{
2014static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002015test_array [0] = 0;
2016return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 ac_lo=0 ac_mid=0
2024 while :; do
2025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026/* end confdefs.h. */
2027$4
2028int
2029main ()
2030{
2031static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 ac_hi=$ac_mid; break
2041else
2042 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2043 if test $ac_lo -le $ac_mid; then
2044 ac_lo= ac_hi=
2045 break
2046 fi
2047 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050 done
2051else
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$4
2055int
2056main ()
2057{
2058static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002059test_array [0] = 0;
2060return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002076test_array [0] = 0;
2077return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002111test_array [0] = 0;
2112return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
2140
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
2161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
2174
2175 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002176 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 as_fn_set_status $ac_retval
2178
2179} # ac_fn_c_compute_int
2180
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002189if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002190 $as_echo_n "(cached) " >&6
2191else
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002245
2246} # ac_fn_c_check_func
2247
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002248# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2249# ---------------------------------------------
2250# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2251# accordingly.
2252ac_fn_c_check_decl ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 as_decl_name=`echo $2|sed 's/ *(.*//'`
2256 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2258$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2259if eval \${$3+:} false; then :
2260 $as_echo_n "(cached) " >&6
2261else
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$4
2265int
2266main ()
2267{
2268#ifndef $as_decl_name
2269#ifdef __cplusplus
2270 (void) $as_decl_use;
2271#else
2272 (void) $as_decl_name;
2273#endif
2274#endif
2275
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$3=yes"
2282else
2283 eval "$3=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287eval ac_res=\$$3
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
2290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291
2292} # ac_fn_c_check_decl
2293
Matthias Kloseb9621712010-04-24 17:59:49 +00002294# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2295# ----------------------------------------------------
2296# Tries to find if the field MEMBER exists in type AGGR, after including
2297# INCLUDES, setting cache variable VAR accordingly.
2298ac_fn_c_check_member ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2302$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002303if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002304 $as_echo_n "(cached) " >&6
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$5
2325int
2326main ()
2327{
2328static $2 ac_aggr;
2329if (sizeof ac_aggr.$3)
2330return 0;
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336 eval "$4=yes"
2337else
2338 eval "$4=no"
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343fi
2344eval ac_res=\$$4
2345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2346$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002347 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002348
2349} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002351This file contains any messages produced by compilers while
2352running configure, to aid debugging if configure makes a mistake.
2353
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002354It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002355generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
2357 $ $0 $@
2358
2359_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002361{
2362cat <<_ASUNAME
2363## --------- ##
2364## Platform. ##
2365## --------- ##
2366
2367hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2368uname -m = `(uname -m) 2>/dev/null || echo unknown`
2369uname -r = `(uname -r) 2>/dev/null || echo unknown`
2370uname -s = `(uname -s) 2>/dev/null || echo unknown`
2371uname -v = `(uname -v) 2>/dev/null || echo unknown`
2372
2373/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2374/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2375
2376/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2377/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2378/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002380/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2381/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2382/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2383
2384_ASUNAME
2385
2386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387for as_dir in $PATH
2388do
2389 IFS=$as_save_IFS
2390 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002391 $as_echo "PATH: $as_dir"
2392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002394
2395} >&5
2396
2397cat >&5 <<_ACEOF
2398
2399
2400## ----------- ##
2401## Core tests. ##
2402## ----------- ##
2403
2404_ACEOF
2405
2406
2407# Keep a trace of the command line.
2408# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002412ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_configure_args0=
2414ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002415ac_must_keep_next=false
2416for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002417do
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 for ac_arg
2419 do
2420 case $ac_arg in
2421 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2422 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2423 | -silent | --silent | --silen | --sile | --sil)
2424 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 esac
2428 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002435 case $ac_arg in
2436 *=* | --config-cache | -C | -disable-* | --disable-* \
2437 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2438 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2439 | -with-* | --with-* | -without-* | --without-* | --x)
2440 case "$ac_configure_args0 " in
2441 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2442 esac
2443 ;;
2444 -* ) ac_must_keep_next=true ;;
2445 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002447 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 ;;
2449 esac
2450 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002451done
Matthias Kloseb9621712010-04-24 17:59:49 +00002452{ ac_configure_args0=; unset ac_configure_args0;}
2453{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455# When interrupted or exit'd, cleanup temporary files, and complete
2456# config.log. We remove comments because anyway the quotes in there
2457# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458# WARNING: Use '\'' to represent an apostrophe within the trap.
2459# 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 +00002460trap 'exit_status=$?
2461 # Save into config.log some information that might help in debugging.
2462 {
2463 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002464
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002465 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002466## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002467## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 echo
2469 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470(
2471 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2472 eval ac_val=\$$ac_var
2473 case $ac_val in #(
2474 *${as_nl}*)
2475 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2477$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac
2479 case $ac_var in #(
2480 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2482 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac ;;
2484 esac
2485 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2488 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 "s/'\''/'\''\\\\'\'''\''/g;
2491 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2492 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002495 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac |
2497 sort
2498)
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002500
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002502## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_vars
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514
2515 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 echo
2520 for ac_var in $ac_subst_files
2521 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 eval ac_val=\$$ac_var
2523 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 done | sort
2528 echo
2529 fi
2530
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002533## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 fi
2539 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 $as_echo "$as_me: caught signal $ac_signal"
2541 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 rm -f core *.core core.conftest.* &&
2544 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002547for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
2550ac_signal=0
2551
2552# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002554
Matthias Kloseb9621712010-04-24 17:59:49 +00002555$as_echo "/* confdefs.h */" > confdefs.h
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557# Predefined preprocessor variables.
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_NAME "$PACKAGE_NAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_VERSION "$PACKAGE_VERSION"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_STRING "$PACKAGE_STRING"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577_ACEOF
2578
Matthias Kloseb9621712010-04-24 17:59:49 +00002579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_URL "$PACKAGE_URL"
2581_ACEOF
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583
2584# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002585# Prefer an explicitly selected file to automatically selected ones.
2586ac_site_file1=NONE
2587ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002589 # We do not want a PATH search for config.site.
2590 case $CONFIG_SITE in #((
2591 -*) ac_site_file1=./$CONFIG_SITE;;
2592 */*) ac_site_file1=$CONFIG_SITE;;
2593 *) ac_site_file1=./$CONFIG_SITE;;
2594 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$prefix/share/config.site
2597 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598else
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 ac_site_file1=$ac_default_prefix/share/config.site
2600 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002602for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603do
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 test "x$ac_site_file" = xNONE && continue
2605 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2607$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002609 . "$ac_site_file" \
2610 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2612as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002613See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614 fi
2615done
2616
2617if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 # Some versions of bash will fail to source /dev/null (special files
2619 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2620 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2622$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2625 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 esac
2627 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628else
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2630$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 >$cache_file
2632fi
2633
2634# Check that the precious variables saved in the cache have kept the same
2635# value.
2636ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2639 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2641 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $ac_old_set,$ac_new_set in
2643 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2645$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 +00002646 ac_cache_corrupted=: ;;
2647 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2649$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 ac_cache_corrupted=: ;;
2651 ,);;
2652 *)
2653 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 # differences in whitespace do not lead to failure.
2655 ac_old_val_w=`echo x $ac_old_val`
2656 ac_new_val_w=`echo x $ac_new_val`
2657 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2659$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2660 ac_cache_corrupted=:
2661 else
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2663$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2664 eval $ac_var=\$ac_old_val
2665 fi
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2667$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2669$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 fi;;
2671 esac
2672 # Pass precious variables to config.status.
2673 if test "$ac_new_set" = set; then
2674 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 *) ac_arg=$ac_var=$ac_new_val ;;
2677 esac
2678 case " $ac_configure_args " in
2679 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 esac
2682 fi
2683done
2684if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2688$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002689 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002691## -------------------- ##
2692## Main body of script. ##
2693## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694
Guido van Rossum7f43da71994-08-01 12:15:30 +00002695ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2699ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700
Guido van Rossum627b2d71993-12-24 10:39:16 +00002701
Michael W. Hudson54241132001-12-07 15:38:26 +00002702
Trent Nelson4d4ec652012-10-16 08:51:24 -04002703
Christian Heimesff5be6e2018-01-20 13:19:21 +01002704
2705
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002706if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002707 # If we're building out-of-tree, we need to make sure the following
2708 # resources get picked up before their $srcdir counterparts.
2709 # Objects/ -> typeslots.inc
2710 # Include/ -> Python-ast.h, graminit.h
2711 # Python/ -> importlib.h
2712 # (A side effect of this is that these resources will automatically be
2713 # regenerated when building out-of-tree, regardless of whether or not
2714 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2715 # off.)
2716 BASECPPFLAGS="-IObjects -IInclude -IPython"
2717else
2718 BASECPPFLAGS=""
2719fi
2720
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721
2722
2723
2724
Victor Stinner9ed34a82017-05-02 22:35:58 +02002725if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727# Extract the first word of "git", so it can be a program name with args.
2728set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2730$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo_n "(cached) " >&6
2733else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734 if test -n "$HAS_GIT"; then
2735 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002736else
2737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2738for as_dir in $PATH
2739do
2740 IFS=$as_save_IFS
2741 test -z "$as_dir" && as_dir=.
2742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2746 break 2
2747 fi
2748done
2749 done
2750IFS=$as_save_IFS
2751
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753fi
2754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755HAS_GIT=$ac_cv_prog_HAS_GIT
2756if test -n "$HAS_GIT"; then
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2758$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2761$as_echo "no" >&6; }
2762fi
2763
2764
2765else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002766HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769then
Xiang Zhang4c855572018-08-20 22:36:19 +08002770 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2771 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2772 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002774 GITVERSION=""
2775 GITTAG=""
2776 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777fi
2778
2779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002780ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002781
2782
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002783ac_aux_dir=
2784for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2785 if test -f "$ac_dir/install-sh"; then
2786 ac_aux_dir=$ac_dir
2787 ac_install_sh="$ac_aux_dir/install-sh -c"
2788 break
2789 elif test -f "$ac_dir/install.sh"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/install.sh -c"
2792 break
2793 elif test -f "$ac_dir/shtool"; then
2794 ac_aux_dir=$ac_dir
2795 ac_install_sh="$ac_aux_dir/shtool install -c"
2796 break
2797 fi
2798done
2799if test -z "$ac_aux_dir"; then
2800 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2801fi
2802
2803# These three variables are undocumented and unsupported,
2804# and are intended to be withdrawn in a future Autoconf release.
2805# They can cause serious problems if a builder's source tree is in a directory
2806# whose full name contains unusual characters.
2807ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2808ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2809ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2810
2811
2812# Make sure we can run config.sub.
2813$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2814 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2815
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2817$as_echo_n "checking build system type... " >&6; }
2818if ${ac_cv_build+:} false; then :
2819 $as_echo_n "(cached) " >&6
2820else
2821 ac_build_alias=$build_alias
2822test "x$ac_build_alias" = x &&
2823 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2824test "x$ac_build_alias" = x &&
2825 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2826ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2827 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2828
2829fi
2830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2831$as_echo "$ac_cv_build" >&6; }
2832case $ac_cv_build in
2833*-*-*) ;;
2834*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2835esac
2836build=$ac_cv_build
2837ac_save_IFS=$IFS; IFS='-'
2838set x $ac_cv_build
2839shift
2840build_cpu=$1
2841build_vendor=$2
2842shift; shift
2843# Remember, the first character of IFS is used to create $*,
2844# except with old shells:
2845build_os=$*
2846IFS=$ac_save_IFS
2847case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2848
2849
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2851$as_echo_n "checking host system type... " >&6; }
2852if ${ac_cv_host+:} false; then :
2853 $as_echo_n "(cached) " >&6
2854else
2855 if test "x$host_alias" = x; then
2856 ac_cv_host=$ac_cv_build
2857else
2858 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2859 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2860fi
2861
2862fi
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2864$as_echo "$ac_cv_host" >&6; }
2865case $ac_cv_host in
2866*-*-*) ;;
2867*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2868esac
2869host=$ac_cv_host
2870ac_save_IFS=$IFS; IFS='-'
2871set x $ac_cv_host
2872shift
2873host_cpu=$1
2874host_vendor=$2
2875shift; shift
2876# Remember, the first character of IFS is used to create $*,
2877# except with old shells:
2878host_os=$*
2879IFS=$ac_save_IFS
2880case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2881
2882
2883
doko@python.orga10e4a92013-01-25 18:45:12 +01002884
2885
Ned Deilyfcbc2462014-08-22 13:32:49 -07002886# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2887rm -f pybuilddir.txt
2888
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889for ac_prog in python$PACKAGE_VERSION python3 python
2890do
2891 # Extract the first word of "$ac_prog", so it can be a program name with args.
2892set dummy $ac_prog; ac_word=$2
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2894$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896 $as_echo_n "(cached) " >&6
2897else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002898 if test -n "$PYTHON_FOR_REGEN"; then
2899 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002900else
2901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2902for as_dir in $PATH
2903do
2904 IFS=$as_save_IFS
2905 test -z "$as_dir" && as_dir=.
2906 for ac_exec_ext in '' $ac_executable_extensions; do
2907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002908 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2910 break 2
2911 fi
2912done
2913 done
2914IFS=$as_save_IFS
2915
2916fi
2917fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2919if test -n "$PYTHON_FOR_REGEN"; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2921$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922else
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2924$as_echo "no" >&6; }
2925fi
2926
2927
Victor Stinnera5c62a82017-05-03 18:21:48 +02002928 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002929done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002930test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002931
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002932
2933
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002934if test "$cross_compiling" = yes; then
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2936$as_echo_n "checking for python interpreter for cross build... " >&6; }
2937 if test -z "$PYTHON_FOR_BUILD"; then
2938 for interp in python$PACKAGE_VERSION python3 python; do
2939 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002940 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 +02002941 break
2942 fi
2943 interp=
2944 done
2945 if test x$interp = x; then
2946 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2947 fi
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2949$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002950 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 +02002951 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002952elif test "$cross_compiling" = maybe; then
2953 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002954else
2955 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2956fi
2957
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959
Benjamin Petersond23f8222009-04-05 19:13:16 +00002960if test "$prefix" != "/"; then
2961 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2962fi
2963
2964
Martin v. Löwis11437992002-04-12 09:54:03 +00002965
2966
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002967# We don't use PACKAGE_ variables, and they cause conflicts
2968# with other autoconf-based packages that include Python.h
2969grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2970rm confdefs.h
2971mv confdefs.h.new confdefs.h
2972
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002973
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002974VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002975
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002976# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002977
2978SOVERSION=1.0
2979
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980# The later defininition of _XOPEN_SOURCE disables certain features
2981# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002984
2985
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002991
2992
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2994# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2995# them.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002998
2999
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003001# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3002# them.
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005
3006
3007
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003008define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003009
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003010# Arguments passed to configure.
3011
3012CONFIG_ARGS="$ac_configure_args"
3013
Matthias Kloseb9621712010-04-24 17:59:49 +00003014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3015$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003017if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 case $enableval in
3020 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003021 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003022 # information
3023 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003024 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3027 if test ! -d "${enableval}"
3028 then
3029 enableval=/
3030 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032 ;;
3033 esac
3034 case $enableval in
3035 no)
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038 ;;
3039 *)
3040 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 if test ! -d "${UNIVERSALSDK}"
3042 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003043 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045 ;;
3046 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049else
3050
3051 UNIVERSALSDK=
3052 enable_universalsdk=
3053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056if test -n "${UNIVERSALSDK}"
3057then
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3059$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060else
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003066
Ned Deily87adb6e2013-10-18 21:09:56 -07003067ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003068
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069# For backward compatibility reasons we prefer to select '32-bit' if available,
3070# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072if test "`uname -s`" = "Darwin"
3073then
3074 if test -n "${UNIVERSALSDK}"
3075 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003076 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003077 then
3078 UNIVERSAL_ARCHS="intel"
3079 fi
3080 fi
3081fi
3082
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3085$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
3087# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090 UNIVERSAL_ARCHS="$withval"
3091
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092fi
3093
Ned Deily87adb6e2013-10-18 21:09:56 -07003094if test -n "${UNIVERSALSDK}"
3095then
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3097$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3098else
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3100$as_echo "no" >&6; }
3101fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103
3104# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106 withval=$with_framework_name;
3107 PYTHONFRAMEWORK=${withval}
3108 PYTHONFRAMEWORKDIR=${withval}.framework
3109 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3110
3111else
3112
3113 PYTHONFRAMEWORK=Python
3114 PYTHONFRAMEWORKDIR=Python.framework
3115 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3116
3117fi
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003122 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003124 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 esac
3126 case $enableval in
3127 no)
3128 PYTHONFRAMEWORK=
3129 PYTHONFRAMEWORKDIR=no-framework
3130 PYTHONFRAMEWORKPREFIX=
3131 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST=
3133 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 FRAMEWORKALTINSTALLFIRST=
3135 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003136 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 if test "x${prefix}" = "xNONE"; then
3138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3139 else
3140 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3141 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003142 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003143 ;;
3144 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003146 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003147 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003148 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003149 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3150 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003151 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 if test "x${prefix}" = "xNONE" ; then
3155 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 else
3158 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3159 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160
3161 case "${enableval}" in
3162 /System*)
3163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3164 if test "${prefix}" = "NONE" ; then
3165 # See below
3166 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3167 fi
3168 ;;
3169
3170 /Library*)
3171 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3172 ;;
3173
3174 */Library/Frameworks)
3175 MDIR="`dirname "${enableval}"`"
3176 MDIR="`dirname "${MDIR}"`"
3177 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3178
3179 if test "${prefix}" = "NONE"; then
3180 # User hasn't specified the
3181 # --prefix option, but wants to install
3182 # the framework in a non-default location,
3183 # ensure that the compatibility links get
3184 # installed relative to that prefix as well
3185 # instead of in /usr/local.
3186 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3187 fi
3188 ;;
3189
3190 *)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 ;;
3193 esac
3194
Jack Jansen127e56e2001-09-11 14:41:54 +00003195 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003197 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003203 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3204
3205 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3206
Jack Jansene578a632001-08-15 01:27:14 +00003207 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003208
Guido van Rossum563e7081996-09-10 18:20:48 +00003209else
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Jack Jansene578a632001-08-15 01:27:14 +00003211 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003212 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003213 PYTHONFRAMEWORKPREFIX=
3214 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215 FRAMEWORKINSTALLFIRST=
3216 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 FRAMEWORKALTINSTALLFIRST=
3218 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003219 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 if test "x${prefix}" = "xNONE" ; then
3221 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3222 else
3223 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3224 fi
Jack Jansene578a632001-08-15 01:27:14 +00003225 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003226
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003228fi
3229
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
3231
Michael W. Hudson54241132001-12-07 15:38:26 +00003232
3233
3234
3235
Jack Jansene578a632001-08-15 01:27:14 +00003236
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003237
3238
3239
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003240
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003241
Ned Deilyb8f944f2013-11-21 22:42:25 -08003242
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003243
3244cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003245#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003246_ACEOF
3247
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003250## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003251## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003252##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253# Set name for machine-dependent library files
3254
Matthias Kloseb9621712010-04-24 17:59:49 +00003255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3256$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257if test -z "$MACHDEP"
3258then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003259 # avoid using uname for cross builds
3260 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003261 # ac_sys_system and ac_sys_release are used for setting
3262 # a lot of different things including 'define_xopen_source'
3263 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003265 *-*-linux-android*)
3266 ac_sys_system=Linux-android
3267 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003268 *-*-linux*)
3269 ac_sys_system=Linux
3270 ;;
3271 *-*-cygwin*)
3272 ac_sys_system=Cygwin
3273 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003274 *-*-vxworks*)
3275 ac_sys_system=VxWorks
3276 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 *)
3278 # for now, limit cross builds to known configurations
3279 MACHDEP="unknown"
3280 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3281 esac
3282 ac_sys_release=
3283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003285 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003286 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 fi
3292 ac_md_system=`echo $ac_sys_system |
3293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3294 ac_md_release=`echo $ac_sys_release |
3295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003297
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003299 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003300 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003301 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003302 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3307$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003308
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003309
3310if test "$cross_compiling" = yes; then
3311 case "$host" in
3312 *-*-linux*)
3313 case "$host_cpu" in
3314 arm*)
3315 _host_cpu=arm
3316 ;;
3317 *)
3318 _host_cpu=$host_cpu
3319 esac
3320 ;;
3321 *-*-cygwin*)
3322 _host_cpu=
3323 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003324 *-*-vxworks*)
3325 _host_cpu=$host_cpu
3326 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003327 *)
3328 # for now, limit cross builds to known configurations
3329 MACHDEP="unknown"
3330 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3331 esac
3332 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3333fi
3334
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003335# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3336# disable features if it is defined, without any means to access these
3337# features as extensions. For these systems, we skip the definition of
3338# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3339# some feature, make sure there is no alternative way to access this
3340# feature. Also, when using wildcards, make sure you have verified the
3341# need for not defining _XOPEN_SOURCE on all systems matching the
3342# wildcard, and that the wildcard does not include future systems
3343# (which may remove their limitations).
3344case $ac_sys_system/$ac_sys_release in
3345 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3346 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003347 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003348 # In addition, Stefan Krah confirms that issue #1244610 exists through
3349 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003350 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003351 define_xopen_source=no
3352 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3353 # also defined. This can be overridden by defining _BSD_SOURCE
3354 # As this has a different meaning on Linux, only define it on OpenBSD
3355
Matthias Kloseb9621712010-04-24 17:59:49 +00003356$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003357
3358 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003359 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003360 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3361 # also defined. This can be overridden by defining _BSD_SOURCE
3362 # As this has a different meaning on Linux, only define it on OpenBSD
3363
Matthias Kloseb9621712010-04-24 17:59:49 +00003364$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003365
3366 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003367 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3368 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3369 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003370 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 +00003371 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003372 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3373 # request to enable features supported by the standard as a request
3374 # to disable features not supported by the standard. The best way
3375 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3376 # entirely and define __EXTENSIONS__ instead.
3377 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003378 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003379 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3380 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003381 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003382 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003383 define_xopen_source=no;;
3384 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003385 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003386 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003387 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003388 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3389 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3390 # identifies itself as Darwin/7.*
3391 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3392 # disables platform specific features beyond repair.
3393 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3394 # has no effect, don't bother defining them
3395 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003396 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003397 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003398 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003399 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3400 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3401 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003402 AIX/4)
3403 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003404 AIX/5)
3405 if test `uname -r` -eq 1; then
3406 define_xopen_source=no
3407 fi
3408 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003409 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3410 # defining NI_NUMERICHOST.
3411 QNX/6.3.2)
3412 define_xopen_source=no
3413 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003414 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3415 # in network headers still using system V types.
3416 VxWorks/*)
3417 define_xopen_source=no
3418 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003419
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420esac
3421
3422if test $define_xopen_source = yes
3423then
Victor Stinner14d098d2011-09-07 22:29:43 +02003424 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003425
Victor Stinner14d098d2011-09-07 22:29:43 +02003426$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
3429 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3430 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3431 # several APIs are not declared. Since this is also needed in some
3432 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Matthias Kloseb9621712010-04-24 17:59:49 +00003434$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
3436
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003437
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003438$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440fi
3441
Christian Heimes647cd872013-12-07 23:39:33 +01003442# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3443case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003444 hp*|HP*)
3445 define_stdc_a1=yes;;
3446 *)
3447 define_stdc_a1=no;;
3448esac
3449
3450if test $define_stdc_a1 = yes
3451then
Christian Heimes647cd872013-12-07 23:39:33 +01003452
3453$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3454
Christian Heimesb02bcae2013-12-08 15:21:08 +01003455fi
Christian Heimes647cd872013-12-07 23:39:33 +01003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3458# it may influence the way we can build extensions, so distutils
3459# needs to check it
3460
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461
Jack Jansen6b08a402004-06-03 12:41:45 +00003462CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003463EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003464
Guido van Rossum627b2d71993-12-24 10:39:16 +00003465# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003466
3467# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3468# for debug/optimization stuff. BASECFLAGS is for flags that are required
3469# just to get things to compile and link. Users are free to override OPT
3470# when running configure or make. The build should not break if they do.
3471# BASECFLAGS should generally not be messed with, however.
3472
Guido van Rossum8b131c51995-03-09 14:10:13 +00003473# If the user switches compilers, we can't believe the cache
3474if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3475then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003476 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003477(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003478fi
3479
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003480# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3481# when the compiler supports them, but we don't always want -O2, and
3482# we set -g later.
3483if test -z "$CFLAGS"; then
3484 CFLAGS=
3485fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003486
3487if test "$ac_sys_system" = "Darwin"
3488then
3489 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003490 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 # information
3492 if test -z "${CC}"
3493 then
3494 found_gcc=
3495 found_clang=
3496 as_save_IFS=$IFS; IFS=:
3497 for as_dir in $PATH
3498 do
3499 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003500 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003502 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003503 fi
3504 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003505 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003506 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003507 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003508 fi
3509 fi
3510 done
3511 IFS=$as_save_IFS
3512
3513 if test -n "$found_gcc" -a -n "$found_clang"
3514 then
3515 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3516 then
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3518$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3519 CC="$found_clang"
3520 CXX="$found_clang++"
3521 fi
3522
3523
3524 elif test -z "$found_gcc" -a -n "$found_clang"
3525 then
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3527$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3528 CC="$found_clang"
3529 CXX="$found_clang++"
3530
3531 elif test -z "$found_gcc" -a -z "$found_clang"
3532 then
3533 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3534 if test -n "${found_clang}"
3535 then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3537$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3538 CC="${found_clang}"
3539 CXX="`/usr/bin/xcrun -find clang++`"
3540
3541 # else: use default behaviour
3542 fi
3543 fi
3544 fi
3545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003546ac_ext=c
3547ac_cpp='$CPP $CPPFLAGS'
3548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3550ac_compiler_gnu=$ac_cv_c_compiler_gnu
3551if test -n "$ac_tool_prefix"; then
3552 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3553set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3555$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003556if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003558else
3559 if test -n "$CC"; then
3560 ac_cv_prog_CC="$CC" # Let the user override the test.
3561else
Martin v. Löwis11437992002-04-12 09:54:03 +00003562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563for as_dir in $PATH
3564do
3565 IFS=$as_save_IFS
3566 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003568 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 $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 +00003571 break 2
3572 fi
3573done
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003576
Jack Jansendd19cf82001-12-06 22:36:17 +00003577fi
3578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003579CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003580if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3582$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003583else
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003586fi
3587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589fi
3590if test -z "$ac_cv_prog_CC"; then
3591 ac_ct_CC=$CC
3592 # Extract the first word of "gcc", so it can be a program name with args.
3593set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003596if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003598else
3599 if test -n "$ac_ct_CC"; then
3600 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3601else
3602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3603for as_dir in $PATH
3604do
3605 IFS=$as_save_IFS
3606 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $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 +00003611 break 2
3612 fi
3613done
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003616
3617fi
3618fi
3619ac_ct_CC=$ac_cv_prog_ac_ct_CC
3620if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3622$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623else
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 if test "x$ac_ct_CC" = x; then
3629 CC=""
3630 else
3631 case $cross_compiling:$ac_tool_warned in
3632yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635ac_tool_warned=yes ;;
3636esac
3637 CC=$ac_ct_CC
3638 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
3640 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003641fi
3642
Jack Jansendd19cf82001-12-06 22:36:17 +00003643if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644 if test -n "$ac_tool_prefix"; then
3645 # 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 +00003646set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3648$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003649if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003651else
3652 if test -n "$CC"; then
3653 ac_cv_prog_CC="$CC" # Let the user override the test.
3654else
Martin v. Löwis11437992002-04-12 09:54:03 +00003655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3656for as_dir in $PATH
3657do
3658 IFS=$as_save_IFS
3659 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 $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 +00003664 break 2
3665 fi
3666done
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003669
3670fi
3671fi
3672CC=$ac_cv_prog_CC
3673if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3675$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3678$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003679fi
3680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684if test -z "$CC"; then
3685 # Extract the first word of "cc", so it can be a program name with args.
3686set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3688$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003689if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003691else
3692 if test -n "$CC"; then
3693 ac_cv_prog_CC="$CC" # Let the user override the test.
3694else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697for as_dir in $PATH
3698do
3699 IFS=$as_save_IFS
3700 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3704 ac_prog_rejected=yes
3705 continue
3706 fi
3707 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $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 +00003709 break 2
3710 fi
3711done
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003714
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715if test $ac_prog_rejected = yes; then
3716 # We found a bogon in the path, so make sure we never use it.
3717 set dummy $ac_cv_prog_CC
3718 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720 # We chose a different compiler from the bogus one.
3721 # However, it has the same basename, so the bogon will be chosen
3722 # first if we set CC to just the basename; use the full file name.
3723 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003724 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725 fi
3726fi
3727fi
3728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739fi
3740if test -z "$CC"; then
3741 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 do
3744 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3745set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3747$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003748if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003750else
3751 if test -n "$CC"; then
3752 ac_cv_prog_CC="$CC" # Let the user override the test.
3753else
Martin v. Löwis11437992002-04-12 09:54:03 +00003754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3755for as_dir in $PATH
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 $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 +00003763 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765done
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
3769fi
3770fi
3771CC=$ac_cv_prog_CC
3772if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3774$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003775else
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3777$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003778fi
3779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 test -n "$CC" && break
3782 done
3783fi
3784if test -z "$CC"; then
3785 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003787do
3788 # Extract the first word of "$ac_prog", so it can be a program name with args.
3789set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003792if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003794else
3795 if test -n "$ac_ct_CC"; then
3796 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3797else
3798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $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 +00003807 break 2
3808 fi
3809done
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813fi
3814fi
3815ac_ct_CC=$ac_cv_prog_ac_ct_CC
3816if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3818$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 test -n "$ac_ct_CC" && break
3826done
Michael W. Hudson54241132001-12-07 15:38:26 +00003827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828 if test "x$ac_ct_CC" = x; then
3829 CC=""
3830 else
3831 case $cross_compiling:$ac_tool_warned in
3832yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835ac_tool_warned=yes ;;
3836esac
3837 CC=$ac_ct_CC
3838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
3840
3841fi
3842
3843
Matthias Kloseb9621712010-04-24 17:59:49 +00003844test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003846as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003847See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848
3849# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003850$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3851set X $ac_compile
3852ac_compiler=$2
3853for ac_option in --version -v -V -qversion; do
3854 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855case "(($ac_try" in
3856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3857 *) ac_try_echo=$ac_try;;
3858esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3860$as_echo "$ac_try_echo"; } >&5
3861 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 if test -s conftest.err; then
3864 sed '10a\
3865... rest of stderr output deleted ...
3866 10q' conftest.err >conftest.er1
3867 cat conftest.er1 >&5
3868 fi
3869 rm -f conftest.er1 conftest.err
3870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3871 test $ac_status = 0; }
3872done
Martin v. Löwis11437992002-04-12 09:54:03 +00003873
Matthias Kloseb9621712010-04-24 17:59:49 +00003874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877int
3878main ()
3879{
3880
3881 ;
3882 return 0;
3883}
3884_ACEOF
3885ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003886ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003887# Try to create an executable without -o first, disregard a.out.
3888# It will help us diagnose broken compilers, and finding out an intuition
3889# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3891$as_echo_n "checking whether the C compiler works... " >&6; }
3892ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3893
3894# The possible output files:
3895ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897ac_rmfiles=
3898for ac_file in $ac_files
3899do
3900 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3903 esac
3904done
3905rm -f $ac_rmfiles
3906
Matthias Kloseb9621712010-04-24 17:59:49 +00003907if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908case "(($ac_try" in
3909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3910 *) ac_try_echo=$ac_try;;
3911esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003912eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3913$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3919# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3920# in a Makefile. We should not override ac_cv_exeext if it was cached,
3921# so that the user can short-circuit this test for compilers unknown to
3922# Autoconf.
3923for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003924do
3925 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003928 ;;
3929 [ab].out )
3930 # We found the default executable, but exeext='' is most
3931 # certainly right.
3932 break;;
3933 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935 then :; else
3936 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3937 fi
3938 # We set ac_cv_exeext here because the later test for it is not
3939 # safe: cross compilers may not add the suffix if given an `-o'
3940 # argument, so we may need to know it at that point already.
3941 # Even if this section looks crufty: it has the advantage of
3942 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003943 break;;
3944 * )
3945 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 esac
3947done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948test "$ac_cv_exeext" = no && ac_cv_exeext=
3949
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003950else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 ac_file=''
3952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003953if test -z "$ac_file"; then :
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3955$as_echo "no" >&6; }
3956$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003957sed 's/^/| /' conftest.$ac_ext >&5
3958
Matthias Kloseb9621712010-04-24 17:59:49 +00003959{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003961as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003962See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003963else
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3965$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3968$as_echo_n "checking for C compiler default output file name... " >&6; }
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3970$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972
Matthias Kloseb9621712010-04-24 17:59:49 +00003973rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3976$as_echo_n "checking for suffix of executables... " >&6; }
3977if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3987 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003988 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3989# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3990# work properly (i.e., refer to `conftest.exe'), while it won't with
3991# `rm'.
3992for ac_file in conftest.exe conftest conftest.*; do
3993 test -f "$ac_file" || continue
3994 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3997 break;;
3998 * ) break;;
3999 esac
4000done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004001else
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004004as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004005See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004007rm -f conftest conftest$ac_cv_exeext
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4009$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010
4011rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004012EXEEXT=$ac_cv_exeext
4013ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4015/* end confdefs.h. */
4016#include <stdio.h>
4017int
4018main ()
4019{
4020FILE *f = fopen ("conftest.out", "w");
4021 return ferror (f) || fclose (f) != 0;
4022
4023 ;
4024 return 0;
4025}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004027ac_clean_files="$ac_clean_files conftest.out"
4028# Check that the compiler produces executables we can run. If not, either
4029# the compiler is broken, or we cross compile.
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4031$as_echo_n "checking whether we are cross compiling... " >&6; }
4032if test "$cross_compiling" != yes; then
4033 { { ac_try="$ac_link"
4034case "(($ac_try" in
4035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4036 *) ac_try_echo=$ac_try;;
4037esac
4038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4039$as_echo "$ac_try_echo"; } >&5
4040 (eval "$ac_link") 2>&5
4041 ac_status=$?
4042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4043 test $ac_status = 0; }
4044 if { ac_try='./conftest$ac_cv_exeext'
4045 { { case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
4049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4050$as_echo "$ac_try_echo"; } >&5
4051 (eval "$ac_try") 2>&5
4052 ac_status=$?
4053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4054 test $ac_status = 0; }; }; then
4055 cross_compiling=no
4056 else
4057 if test "$cross_compiling" = maybe; then
4058 cross_compiling=yes
4059 else
4060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004062as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004063If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004064See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004065 fi
4066 fi
4067fi
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4069$as_echo "$cross_compiling" >&6; }
4070
4071rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4072ac_clean_files=$ac_clean_files_save
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4074$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004075if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 $as_echo_n "(cached) " >&6
4077else
4078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004079/* end confdefs.h. */
4080
4081int
4082main ()
4083{
4084
4085 ;
4086 return 0;
4087}
4088_ACEOF
4089rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004090if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004098 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101 for ac_file in conftest.o conftest.obj conftest.*; do
4102 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004105 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4106 break;;
4107 esac
4108done
4109else
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004111sed 's/^/| /' conftest.$ac_ext >&5
4112
Matthias Kloseb9621712010-04-24 17:59:49 +00004113{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004115as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004116See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004117fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004118rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4121$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004122OBJEXT=$ac_cv_objext
4123ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4125$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004126if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004128else
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004131
Martin v. Löwis11437992002-04-12 09:54:03 +00004132int
4133main ()
4134{
4135#ifndef __GNUC__
4136 choke me
4137#endif
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 ac_compiler_gnu=yes
4145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004149ac_cv_c_compiler_gnu=$ac_compiler_gnu
4150
4151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4153$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4154if test $ac_compiler_gnu = yes; then
4155 GCC=yes
4156else
4157 GCC=
4158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159ac_test_CFLAGS=${CFLAGS+set}
4160ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4162$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004163if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004166 ac_save_c_werror_flag=$ac_c_werror_flag
4167 ac_c_werror_flag=yes
4168 ac_cv_prog_cc_g=no
4169 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
Martin v. Löwis11437992002-04-12 09:54:03 +00004173int
4174main ()
4175{
4176
4177 ;
4178 return 0;
4179}
4180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004181if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004182 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 CFLAGS=""
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186/* end confdefs.h. */
4187
4188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004196if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197
Matthias Kloseb9621712010-04-24 17:59:49 +00004198else
4199 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4220 ac_c_werror_flag=$ac_save_c_werror_flag
4221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4223$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004224if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004226elif test $ac_cv_prog_cc_g = yes; then
4227 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004228 CFLAGS="-g -O2"
4229 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004230 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231 fi
4232else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004233 if test "$GCC" = yes; then
4234 CFLAGS="-O2"
4235 else
4236 CFLAGS=
4237 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4240$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004241if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004243else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004245ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004247/* end confdefs.h. */
4248#include <stdarg.h>
4249#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004250struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004251/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4252struct buf { int x; };
4253FILE * (*rcsopen) (struct buf *, struct stat *, int);
4254static char *e (p, i)
4255 char **p;
4256 int i;
4257{
4258 return p[i];
4259}
4260static char *f (char * (*g) (char **, int), char **p, ...)
4261{
4262 char *s;
4263 va_list v;
4264 va_start (v,p);
4265 s = g (p, va_arg (v,int));
4266 va_end (v);
4267 return s;
4268}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004269
4270/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4271 function prototypes and stuff, but not '\xHH' hex character constants.
4272 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004274 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4275 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004277int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4280 inside strings and character constants. */
4281#define FOO(x) 'x'
4282int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4283
Skip Montanaro6dead952003-09-25 14:50:04 +00004284int test (int i, double x);
4285struct s1 {int (*f) (int a);};
4286struct s2 {int (*f) (double a);};
4287int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4288int argc;
4289char **argv;
4290int
4291main ()
4292{
4293return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4294 ;
4295 return 0;
4296}
4297_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4299 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004300do
4301 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305rm -f core conftest.err conftest.$ac_objext
4306 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004307done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004309CC=$ac_save_CC
4310
4311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312# AC_CACHE_VAL
4313case "x$ac_cv_prog_cc_c89" in
4314 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4316$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4319$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004320 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4323$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004324esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004325if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004326
Matthias Kloseb9621712010-04-24 17:59:49 +00004327fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004328
Martin v. Löwis11437992002-04-12 09:54:03 +00004329ac_ext=c
4330ac_cpp='$CPP $CPPFLAGS'
4331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4333ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004335ac_ext=c
4336ac_cpp='$CPP $CPPFLAGS'
4337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4339ac_compiler_gnu=$ac_cv_c_compiler_gnu
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4341$as_echo_n "checking how to run the C preprocessor... " >&6; }
4342# On Suns, sometimes $CPP names a directory.
4343if test -n "$CPP" && test -d "$CPP"; then
4344 CPP=
4345fi
4346if test -z "$CPP"; then
4347 if ${ac_cv_prog_CPP+:} false; then :
4348 $as_echo_n "(cached) " >&6
4349else
4350 # Double quotes because CPP needs to be expanded
4351 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4352 do
4353 ac_preproc_ok=false
4354for ac_c_preproc_warn_flag in '' yes
4355do
4356 # Use a header file that comes with gcc, so configuring glibc
4357 # with a fresh cross-compiler works.
4358 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4359 # <limits.h> exists even on freestanding compilers.
4360 # On the NeXT, cc -E runs the code through the compiler's parser,
4361 # not just through cpp. "Syntax error" is here to catch this case.
4362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4363/* end confdefs.h. */
4364#ifdef __STDC__
4365# include <limits.h>
4366#else
4367# include <assert.h>
4368#endif
4369 Syntax error
4370_ACEOF
4371if ac_fn_c_try_cpp "$LINENO"; then :
4372
4373else
4374 # Broken: fails on valid input.
4375continue
4376fi
4377rm -f conftest.err conftest.i conftest.$ac_ext
4378
4379 # OK, works on sane cases. Now check whether nonexistent headers
4380 # can be detected and how.
4381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4382/* end confdefs.h. */
4383#include <ac_nonexistent.h>
4384_ACEOF
4385if ac_fn_c_try_cpp "$LINENO"; then :
4386 # Broken: success on invalid input.
4387continue
4388else
4389 # Passes both tests.
4390ac_preproc_ok=:
4391break
4392fi
4393rm -f conftest.err conftest.i conftest.$ac_ext
4394
4395done
4396# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4397rm -f conftest.i conftest.err conftest.$ac_ext
4398if $ac_preproc_ok; then :
4399 break
4400fi
4401
4402 done
4403 ac_cv_prog_CPP=$CPP
4404
4405fi
4406 CPP=$ac_cv_prog_CPP
4407else
4408 ac_cv_prog_CPP=$CPP
4409fi
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4411$as_echo "$CPP" >&6; }
4412ac_preproc_ok=false
4413for ac_c_preproc_warn_flag in '' yes
4414do
4415 # Use a header file that comes with gcc, so configuring glibc
4416 # with a fresh cross-compiler works.
4417 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4418 # <limits.h> exists even on freestanding compilers.
4419 # On the NeXT, cc -E runs the code through the compiler's parser,
4420 # not just through cpp. "Syntax error" is here to catch this case.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
4423#ifdef __STDC__
4424# include <limits.h>
4425#else
4426# include <assert.h>
4427#endif
4428 Syntax error
4429_ACEOF
4430if ac_fn_c_try_cpp "$LINENO"; then :
4431
4432else
4433 # Broken: fails on valid input.
4434continue
4435fi
4436rm -f conftest.err conftest.i conftest.$ac_ext
4437
4438 # OK, works on sane cases. Now check whether nonexistent headers
4439 # can be detected and how.
4440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441/* end confdefs.h. */
4442#include <ac_nonexistent.h>
4443_ACEOF
4444if ac_fn_c_try_cpp "$LINENO"; then :
4445 # Broken: success on invalid input.
4446continue
4447else
4448 # Passes both tests.
4449ac_preproc_ok=:
4450break
4451fi
4452rm -f conftest.err conftest.i conftest.$ac_ext
4453
4454done
4455# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4456rm -f conftest.i conftest.err conftest.$ac_ext
4457if $ac_preproc_ok; then :
4458
4459else
4460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4462as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4463See \`config.log' for more details" "$LINENO" 5; }
4464fi
4465
4466ac_ext=c
4467ac_cpp='$CPP $CPPFLAGS'
4468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4470ac_compiler_gnu=$ac_cv_c_compiler_gnu
4471
4472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4473$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4474if ${ac_cv_path_GREP+:} false; then :
4475 $as_echo_n "(cached) " >&6
4476else
4477 if test -z "$GREP"; then
4478 ac_path_GREP_found=false
4479 # Loop through the user's path and test for each of PROGNAME-LIST
4480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4482do
4483 IFS=$as_save_IFS
4484 test -z "$as_dir" && as_dir=.
4485 for ac_prog in grep ggrep; do
4486 for ac_exec_ext in '' $ac_executable_extensions; do
4487 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4488 as_fn_executable_p "$ac_path_GREP" || continue
4489# Check for GNU ac_path_GREP and select it if it is found.
4490 # Check for GNU $ac_path_GREP
4491case `"$ac_path_GREP" --version 2>&1` in
4492*GNU*)
4493 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4494*)
4495 ac_count=0
4496 $as_echo_n 0123456789 >"conftest.in"
4497 while :
4498 do
4499 cat "conftest.in" "conftest.in" >"conftest.tmp"
4500 mv "conftest.tmp" "conftest.in"
4501 cp "conftest.in" "conftest.nl"
4502 $as_echo 'GREP' >> "conftest.nl"
4503 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4504 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4505 as_fn_arith $ac_count + 1 && ac_count=$as_val
4506 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4507 # Best one so far, save it but keep looking for a better one
4508 ac_cv_path_GREP="$ac_path_GREP"
4509 ac_path_GREP_max=$ac_count
4510 fi
4511 # 10*(2^10) chars as input seems more than enough
4512 test $ac_count -gt 10 && break
4513 done
4514 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4515esac
4516
4517 $ac_path_GREP_found && break 3
4518 done
4519 done
4520 done
4521IFS=$as_save_IFS
4522 if test -z "$ac_cv_path_GREP"; then
4523 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4524 fi
4525else
4526 ac_cv_path_GREP=$GREP
4527fi
4528
4529fi
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4531$as_echo "$ac_cv_path_GREP" >&6; }
4532 GREP="$ac_cv_path_GREP"
4533
4534
Łukasz Langaa785c872016-09-09 17:37:37 -07004535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4536$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4537if ${ac_cv_path_SED+:} false; then :
4538 $as_echo_n "(cached) " >&6
4539else
4540 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4541 for ac_i in 1 2 3 4 5 6 7; do
4542 ac_script="$ac_script$as_nl$ac_script"
4543 done
4544 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4545 { ac_script=; unset ac_script;}
4546 if test -z "$SED"; then
4547 ac_path_SED_found=false
4548 # Loop through the user's path and test for each of PROGNAME-LIST
4549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in $PATH
4551do
4552 IFS=$as_save_IFS
4553 test -z "$as_dir" && as_dir=.
4554 for ac_prog in sed gsed; do
4555 for ac_exec_ext in '' $ac_executable_extensions; do
4556 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4557 as_fn_executable_p "$ac_path_SED" || continue
4558# Check for GNU ac_path_SED and select it if it is found.
4559 # Check for GNU $ac_path_SED
4560case `"$ac_path_SED" --version 2>&1` in
4561*GNU*)
4562 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4563*)
4564 ac_count=0
4565 $as_echo_n 0123456789 >"conftest.in"
4566 while :
4567 do
4568 cat "conftest.in" "conftest.in" >"conftest.tmp"
4569 mv "conftest.tmp" "conftest.in"
4570 cp "conftest.in" "conftest.nl"
4571 $as_echo '' >> "conftest.nl"
4572 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4573 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4574 as_fn_arith $ac_count + 1 && ac_count=$as_val
4575 if test $ac_count -gt ${ac_path_SED_max-0}; then
4576 # Best one so far, save it but keep looking for a better one
4577 ac_cv_path_SED="$ac_path_SED"
4578 ac_path_SED_max=$ac_count
4579 fi
4580 # 10*(2^10) chars as input seems more than enough
4581 test $ac_count -gt 10 && break
4582 done
4583 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4584esac
4585
4586 $ac_path_SED_found && break 3
4587 done
4588 done
4589 done
4590IFS=$as_save_IFS
4591 if test -z "$ac_cv_path_SED"; then
4592 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4593 fi
4594else
4595 ac_cv_path_SED=$SED
4596fi
4597
4598fi
4599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4600$as_echo "$ac_cv_path_SED" >&6; }
4601 SED="$ac_cv_path_SED"
4602 rm -f conftest.sed
4603
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004604
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004605
4606
Matthias Kloseb9621712010-04-24 17:59:49 +00004607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4608$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004610# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004611if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004612 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613
4614 case $withval in
4615 no) with_cxx_main=no
4616 MAINCC='$(CC)';;
4617 yes) with_cxx_main=yes
4618 MAINCC='$(CXX)';;
4619 *) with_cxx_main=yes
4620 MAINCC=$withval
4621 if test -z "$CXX"
4622 then
4623 CXX=$withval
4624 fi;;
4625 esac
4626else
4627
4628 with_cxx_main=no
4629 MAINCC='$(CC)'
4630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004631fi
4632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4634$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004635
4636preset_cxx="$CXX"
4637if test -z "$CXX"
4638then
4639 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 gcc) if test -n "$ac_tool_prefix"; then
4641 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4642set dummy ${ac_tool_prefix}g++; ac_word=$2
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4644$as_echo_n "checking for $ac_word... " >&6; }
4645if ${ac_cv_path_CXX+:} false; then :
4646 $as_echo_n "(cached) " >&6
4647else
4648 case $CXX in
4649 [\\/]* | ?:[\\/]*)
4650 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4651 ;;
4652 *)
4653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in notfound
4655do
4656 IFS=$as_save_IFS
4657 test -z "$as_dir" && as_dir=.
4658 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004660 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662 break 2
4663 fi
4664done
4665 done
4666IFS=$as_save_IFS
4667
4668 ;;
4669esac
4670fi
4671CXX=$ac_cv_path_CXX
4672if test -n "$CXX"; then
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4674$as_echo "$CXX" >&6; }
4675else
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677$as_echo "no" >&6; }
4678fi
4679
4680
4681fi
4682if test -z "$ac_cv_path_CXX"; then
4683 ac_pt_CXX=$CXX
4684 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004685set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688if ${ac_cv_path_ac_pt_CXX+:} false; then :
4689 $as_echo_n "(cached) " >&6
4690else
4691 case $ac_pt_CXX in
4692 [\\/]* | ?:[\\/]*)
4693 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4694 ;;
4695 *)
4696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in notfound
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004703 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705 break 2
4706 fi
4707done
4708 done
4709IFS=$as_save_IFS
4710
4711 ;;
4712esac
4713fi
4714ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4715if test -n "$ac_pt_CXX"; then
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4717$as_echo "$ac_pt_CXX" >&6; }
4718else
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722
4723 if test "x$ac_pt_CXX" = x; then
4724 CXX="g++"
4725 else
4726 case $cross_compiling:$ac_tool_warned in
4727yes:)
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4730ac_tool_warned=yes ;;
4731esac
4732 CXX=$ac_pt_CXX
4733 fi
4734else
4735 CXX="$ac_cv_path_CXX"
4736fi
4737 ;;
4738 cc) if test -n "$ac_tool_prefix"; then
4739 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4740set dummy ${ac_tool_prefix}c++; ac_word=$2
4741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004743if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004744 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745else
4746 case $CXX in
4747 [\\/]* | ?:[\\/]*)
4748 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4749 ;;
4750 *)
4751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4752for as_dir in notfound
4753do
4754 IFS=$as_save_IFS
4755 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760 break 2
4761 fi
4762done
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004764IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 ;;
4767esac
4768fi
4769CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004770if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4772$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004773else
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4775$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004777
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778
4779fi
4780if test -z "$ac_cv_path_CXX"; then
4781 ac_pt_CXX=$CXX
4782 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004786if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004791 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 +00004792 ;;
4793 *)
4794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in notfound
4796do
4797 IFS=$as_save_IFS
4798 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 break 2
4804 fi
4805done
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809 ;;
4810esac
4811fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4813if test -n "$ac_pt_CXX"; then
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4815$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816else
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004820
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821 if test "x$ac_pt_CXX" = x; then
4822 CXX="c++"
4823 else
4824 case $cross_compiling:$ac_tool_warned in
4825yes:)
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4828ac_tool_warned=yes ;;
4829esac
4830 CXX=$ac_pt_CXX
4831 fi
4832else
4833 CXX="$ac_cv_path_CXX"
4834fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836 clang|*/clang) if test -n "$ac_tool_prefix"; then
4837 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4838set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840$as_echo_n "checking for $ac_word... " >&6; }
4841if ${ac_cv_path_CXX+:} false; then :
4842 $as_echo_n "(cached) " >&6
4843else
4844 case $CXX in
4845 [\\/]* | ?:[\\/]*)
4846 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4847 ;;
4848 *)
4849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850for as_dir in notfound
4851do
4852 IFS=$as_save_IFS
4853 test -z "$as_dir" && as_dir=.
4854 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004856 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4858 break 2
4859 fi
4860done
4861 done
4862IFS=$as_save_IFS
4863
Ned Deilycbfb9a52012-06-23 16:02:19 -07004864 ;;
4865esac
4866fi
4867CXX=$ac_cv_path_CXX
4868if test -n "$CXX"; then
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4870$as_echo "$CXX" >&6; }
4871else
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876
4877fi
4878if test -z "$ac_cv_path_CXX"; then
4879 ac_pt_CXX=$CXX
4880 # Extract the first word of "clang++", so it can be a program name with args.
4881set dummy clang++; ac_word=$2
4882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4883$as_echo_n "checking for $ac_word... " >&6; }
4884if ${ac_cv_path_ac_pt_CXX+:} false; then :
4885 $as_echo_n "(cached) " >&6
4886else
4887 case $ac_pt_CXX in
4888 [\\/]* | ?:[\\/]*)
4889 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4890 ;;
4891 *)
4892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4893for as_dir in notfound
4894do
4895 IFS=$as_save_IFS
4896 test -z "$as_dir" && as_dir=.
4897 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004899 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4901 break 2
4902 fi
4903done
4904 done
4905IFS=$as_save_IFS
4906
4907 ;;
4908esac
4909fi
4910ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4911if test -n "$ac_pt_CXX"; then
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4913$as_echo "$ac_pt_CXX" >&6; }
4914else
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4916$as_echo "no" >&6; }
4917fi
4918
4919 if test "x$ac_pt_CXX" = x; then
4920 CXX="clang++"
4921 else
4922 case $cross_compiling:$ac_tool_warned in
4923yes:)
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4925$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4926ac_tool_warned=yes ;;
4927esac
4928 CXX=$ac_pt_CXX
4929 fi
4930else
4931 CXX="$ac_cv_path_CXX"
4932fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004933 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004934 icc|*/icc) if test -n "$ac_tool_prefix"; then
4935 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4936set dummy ${ac_tool_prefix}icpc; ac_word=$2
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4938$as_echo_n "checking for $ac_word... " >&6; }
4939if ${ac_cv_path_CXX+:} false; then :
4940 $as_echo_n "(cached) " >&6
4941else
4942 case $CXX in
4943 [\\/]* | ?:[\\/]*)
4944 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4945 ;;
4946 *)
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948for as_dir in notfound
4949do
4950 IFS=$as_save_IFS
4951 test -z "$as_dir" && as_dir=.
4952 for ac_exec_ext in '' $ac_executable_extensions; do
4953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956 break 2
4957 fi
4958done
4959 done
4960IFS=$as_save_IFS
4961
4962 ;;
4963esac
4964fi
4965CXX=$ac_cv_path_CXX
4966if test -n "$CXX"; then
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4968$as_echo "$CXX" >&6; }
4969else
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971$as_echo "no" >&6; }
4972fi
4973
4974
4975fi
4976if test -z "$ac_cv_path_CXX"; then
4977 ac_pt_CXX=$CXX
4978 # Extract the first word of "icpc", so it can be a program name with args.
4979set dummy icpc; ac_word=$2
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981$as_echo_n "checking for $ac_word... " >&6; }
4982if ${ac_cv_path_ac_pt_CXX+:} false; then :
4983 $as_echo_n "(cached) " >&6
4984else
4985 case $ac_pt_CXX in
4986 [\\/]* | ?:[\\/]*)
4987 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4988 ;;
4989 *)
4990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in notfound
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
4995 for ac_exec_ext in '' $ac_executable_extensions; do
4996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4997 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999 break 2
5000 fi
5001done
5002 done
5003IFS=$as_save_IFS
5004
5005 ;;
5006esac
5007fi
5008ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5009if test -n "$ac_pt_CXX"; then
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5011$as_echo "$ac_pt_CXX" >&6; }
5012else
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014$as_echo "no" >&6; }
5015fi
5016
5017 if test "x$ac_pt_CXX" = x; then
5018 CXX="icpc"
5019 else
5020 case $cross_compiling:$ac_tool_warned in
5021yes:)
5022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5024ac_tool_warned=yes ;;
5025esac
5026 CXX=$ac_pt_CXX
5027 fi
5028else
5029 CXX="$ac_cv_path_CXX"
5030fi
5031 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005032 esac
5033 if test "$CXX" = "notfound"
5034 then
5035 CXX=""
5036 fi
5037fi
5038if test -z "$CXX"
5039then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005040 if test -n "$ac_tool_prefix"; then
5041 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5042 do
5043 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005047if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049else
5050 if test -n "$CXX"; then
5051 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5052else
5053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005060 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005062 break 2
5063 fi
5064done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005067
5068fi
5069fi
5070CXX=$ac_cv_prog_CXX
5071if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5073$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005074else
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077fi
5078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005079
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 test -n "$CXX" && break
5081 done
5082fi
5083if test -z "$CXX"; then
5084 ac_ct_CXX=$CXX
5085 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5086do
5087 # Extract the first word of "$ac_prog", so it can be a program name with args.
5088set dummy $ac_prog; ac_word=$2
5089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090$as_echo_n "checking for $ac_word... " >&6; }
5091if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5092 $as_echo_n "(cached) " >&6
5093else
5094 if test -n "$ac_ct_CXX"; then
5095 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5096else
5097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100 IFS=$as_save_IFS
5101 test -z "$as_dir" && as_dir=.
5102 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 ac_cv_prog_ac_ct_CXX="$ac_prog"
5105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106 break 2
5107 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005109 done
5110IFS=$as_save_IFS
5111
5112fi
5113fi
5114ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5115if test -n "$ac_ct_CXX"; then
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5117$as_echo "$ac_ct_CXX" >&6; }
5118else
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120$as_echo "no" >&6; }
5121fi
5122
5123
5124 test -n "$ac_ct_CXX" && break
5125done
5126
5127 if test "x$ac_ct_CXX" = x; then
5128 CXX="notfound"
5129 else
5130 case $cross_compiling:$ac_tool_warned in
5131yes:)
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5134ac_tool_warned=yes ;;
5135esac
5136 CXX=$ac_ct_CXX
5137 fi
5138fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005139
5140 if test "$CXX" = "notfound"
5141 then
5142 CXX=""
5143 fi
5144fi
5145if test "$preset_cxx" != "$CXX"
5146then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005147 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005148
5149 By default, distutils will build C++ extension modules with \"$CXX\".
5150 If this is not intended, then set CXX on the configure command line.
5151 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005152$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005153
5154 By default, distutils will build C++ extension modules with \"$CXX\".
5155 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005156 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005157fi
5158
5159
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005160MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5161
5162
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5164$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5165cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005166#undef bfin
5167#undef cris
5168#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005169#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005170#undef hppa
5171#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005172#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005173#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005174#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005175#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005176#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005177#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005178 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005179#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005180# if defined(__x86_64__) && defined(__LP64__)
5181 x86_64-linux-gnu
5182# elif defined(__x86_64__) && defined(__ILP32__)
5183 x86_64-linux-gnux32
5184# elif defined(__i386__)
5185 i386-linux-gnu
5186# elif defined(__aarch64__) && defined(__AARCH64EL__)
5187# if defined(__ILP32__)
5188 aarch64_ilp32-linux-gnu
5189# else
5190 aarch64-linux-gnu
5191# endif
5192# elif defined(__aarch64__) && defined(__AARCH64EB__)
5193# if defined(__ILP32__)
5194 aarch64_be_ilp32-linux-gnu
5195# else
5196 aarch64_be-linux-gnu
5197# endif
5198# elif defined(__alpha__)
5199 alpha-linux-gnu
5200# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5201# if defined(__ARMEL__)
5202 arm-linux-gnueabihf
5203# else
5204 armeb-linux-gnueabihf
5205# endif
5206# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5207# if defined(__ARMEL__)
5208 arm-linux-gnueabi
5209# else
5210 armeb-linux-gnueabi
5211# endif
5212# elif defined(__hppa__)
5213 hppa-linux-gnu
5214# elif defined(__ia64__)
5215 ia64-linux-gnu
5216# elif defined(__m68k__) && !defined(__mcoldfire__)
5217 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005218# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5219# if _MIPS_SIM == _ABIO32
5220 mipsisa32r6el-linux-gnu
5221# elif _MIPS_SIM == _ABIN32
5222 mipsisa64r6el-linux-gnuabin32
5223# elif _MIPS_SIM == _ABI64
5224 mipsisa64r6el-linux-gnuabi64
5225# else
5226# error unknown platform triplet
5227# endif
5228# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5229# if _MIPS_SIM == _ABIO32
5230 mipsisa32r6-linux-gnu
5231# elif _MIPS_SIM == _ABIN32
5232 mipsisa64r6-linux-gnuabin32
5233# elif _MIPS_SIM == _ABI64
5234 mipsisa64r6-linux-gnuabi64
5235# else
5236# error unknown platform triplet
5237# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005238# elif defined(__mips_hard_float) && defined(_MIPSEL)
5239# if _MIPS_SIM == _ABIO32
5240 mipsel-linux-gnu
5241# elif _MIPS_SIM == _ABIN32
5242 mips64el-linux-gnuabin32
5243# elif _MIPS_SIM == _ABI64
5244 mips64el-linux-gnuabi64
5245# else
5246# error unknown platform triplet
5247# endif
5248# elif defined(__mips_hard_float)
5249# if _MIPS_SIM == _ABIO32
5250 mips-linux-gnu
5251# elif _MIPS_SIM == _ABIN32
5252 mips64-linux-gnuabin32
5253# elif _MIPS_SIM == _ABI64
5254 mips64-linux-gnuabi64
5255# else
5256# error unknown platform triplet
5257# endif
5258# elif defined(__or1k__)
5259 or1k-linux-gnu
5260# elif defined(__powerpc__) && defined(__SPE__)
5261 powerpc-linux-gnuspe
5262# elif defined(__powerpc64__)
5263# if defined(__LITTLE_ENDIAN__)
5264 powerpc64le-linux-gnu
5265# else
5266 powerpc64-linux-gnu
5267# endif
5268# elif defined(__powerpc__)
5269 powerpc-linux-gnu
5270# elif defined(__s390x__)
5271 s390x-linux-gnu
5272# elif defined(__s390__)
5273 s390-linux-gnu
5274# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5275 sh4-linux-gnu
5276# elif defined(__sparc__) && defined(__arch64__)
5277 sparc64-linux-gnu
5278# elif defined(__sparc__)
5279 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005280# elif defined(__riscv)
5281# if __riscv_xlen == 32
5282 riscv32-linux-gnu
5283# elif __riscv_xlen == 64
5284 riscv64-linux-gnu
5285# else
5286# error unknown platform triplet
5287# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005288# else
5289# error unknown platform triplet
5290# endif
5291#elif defined(__FreeBSD_kernel__)
5292# if defined(__LP64__)
5293 x86_64-kfreebsd-gnu
5294# elif defined(__i386__)
5295 i386-kfreebsd-gnu
5296# else
5297# error unknown platform triplet
5298# endif
5299#elif defined(__gnu_hurd__)
5300 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005301#elif defined(__APPLE__)
5302 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005303#elif defined(__VXWORKS__)
5304 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305#else
5306# error unknown platform triplet
5307#endif
5308
5309EOF
5310
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005311if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5314$as_echo "$PLATFORM_TRIPLET" >&6; }
5315else
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5317$as_echo "none" >&6; }
5318fi
5319rm -f conftest.c conftest.out
5320
5321if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5322 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5323 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5324 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005325elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5326 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328
doko@ubuntu.com55532312016-06-14 08:55:19 +02005329if test x$MULTIARCH != x; then
5330 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5331fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005332
5333
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5335$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5336save_LDFLAGS="$LDFLAGS"
5337LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005338
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5340/* end confdefs.h. */
5341
5342int
5343main ()
5344{
5345
5346 ;
5347 return 0;
5348}
5349_ACEOF
5350if ac_fn_c_try_link "$LINENO"; then :
5351 NO_AS_NEEDED="-Wl,--no-as-needed"
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5353$as_echo "yes" >&6; }
5354else
5355 NO_AS_NEEDED=""
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357$as_echo "no" >&6; }
5358fi
5359rm -f core conftest.err conftest.$ac_objext \
5360 conftest$ac_exeext conftest.$ac_ext
5361LDFLAGS="$save_LDFLAGS"
5362
5363
5364
5365# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5368$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005369if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371else
5372 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5373 then ac_cv_path_EGREP="$GREP -E"
5374 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 # Loop through the user's path and test for each of PROGNAME-LIST
5378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5380do
5381 IFS=$as_save_IFS
5382 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 for ac_prog in egrep; do
5384 for ac_exec_ext in '' $ac_executable_extensions; do
5385 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005386 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005387# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 # Check for GNU $ac_path_EGREP
5389case `"$ac_path_EGREP" --version 2>&1` in
5390*GNU*)
5391 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5392*)
5393 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 while :
5396 do
5397 cat "conftest.in" "conftest.in" >"conftest.tmp"
5398 mv "conftest.tmp" "conftest.in"
5399 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5402 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5405 # Best one so far, save it but keep looking for a better one
5406 ac_cv_path_EGREP="$ac_path_EGREP"
5407 ac_path_EGREP_max=$ac_count
5408 fi
5409 # 10*(2^10) chars as input seems more than enough
5410 test $ac_count -gt 10 && break
5411 done
5412 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5413esac
5414
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $ac_path_EGREP_found && break 3
5416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005421 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 +00005422 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423else
5424 ac_cv_path_EGREP=$EGREP
5425fi
5426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 fi
5428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5430$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005432
5433
Matthias Kloseb9621712010-04-24 17:59:49 +00005434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5435$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005436if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 $as_echo_n "(cached) " >&6
5438else
5439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005441#include <stdlib.h>
5442#include <stdarg.h>
5443#include <string.h>
5444#include <float.h>
5445
5446int
5447main ()
5448{
5449
5450 ;
5451 return 0;
5452}
5453_ACEOF
5454if ac_fn_c_try_compile "$LINENO"; then :
5455 ac_cv_header_stdc=yes
5456else
5457 ac_cv_header_stdc=no
5458fi
5459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5460
5461if test $ac_cv_header_stdc = yes; then
5462 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005466
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005471else
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005473fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005474rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
Matthias Kloseb9621712010-04-24 17:59:49 +00005476fi
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5481/* end confdefs.h. */
5482#include <stdlib.h>
5483
5484_ACEOF
5485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5486 $EGREP "free" >/dev/null 2>&1; then :
5487
5488else
5489 ac_cv_header_stdc=no
5490fi
5491rm -f conftest*
5492
5493fi
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5497 if test "$cross_compiling" = yes; then :
5498 :
5499else
5500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5501/* end confdefs.h. */
5502#include <ctype.h>
5503#include <stdlib.h>
5504#if ((' ' & 0x0FF) == 0x020)
5505# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5506# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5507#else
5508# define ISLOWER(c) \
5509 (('a' <= (c) && (c) <= 'i') \
5510 || ('j' <= (c) && (c) <= 'r') \
5511 || ('s' <= (c) && (c) <= 'z'))
5512# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5513#endif
5514
5515#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5516int
5517main ()
5518{
5519 int i;
5520 for (i = 0; i < 256; i++)
5521 if (XOR (islower (i), ISLOWER (i))
5522 || toupper (i) != TOUPPER (i))
5523 return 2;
5524 return 0;
5525}
5526_ACEOF
5527if ac_fn_c_try_run "$LINENO"; then :
5528
5529else
5530 ac_cv_header_stdc=no
5531fi
5532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5533 conftest.$ac_objext conftest.beam conftest.$ac_ext
5534fi
5535
5536fi
5537fi
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5539$as_echo "$ac_cv_header_stdc" >&6; }
5540if test $ac_cv_header_stdc = yes; then
5541
5542$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5543
5544fi
5545
5546# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5547for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5548 inttypes.h stdint.h unistd.h
5549do :
5550 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5551ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5552"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005553if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 cat >>confdefs.h <<_ACEOF
5555#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5556_ACEOF
5557
5558fi
5559
5560done
5561
5562
5563
5564 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 +02005565if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 MINIX=yes
5567else
5568 MINIX=
5569fi
5570
5571
5572 if test "$MINIX" = yes; then
5573
5574$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5575
5576
5577$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5578
5579
5580$as_echo "#define _MINIX 1" >>confdefs.h
5581
5582 fi
5583
5584
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5586$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005587if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 $as_echo_n "(cached) " >&6
5589else
5590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5591/* end confdefs.h. */
5592
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005593# define __EXTENSIONS__ 1
5594 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005595int
5596main ()
5597{
5598
5599 ;
5600 return 0;
5601}
5602_ACEOF
5603if ac_fn_c_try_compile "$LINENO"; then :
5604 ac_cv_safe_to_define___extensions__=yes
5605else
5606 ac_cv_safe_to_define___extensions__=no
5607fi
5608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5609fi
5610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5611$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5612 test $ac_cv_safe_to_define___extensions__ = yes &&
5613 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5614
5615 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5616
5617 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5618
5619 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5620
5621 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5622
5623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5626$as_echo_n "checking for the Android API level... " >&6; }
5627cat >> conftest.c <<EOF
5628#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005629android_api = __ANDROID_API__
5630arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005631#else
5632#error not Android
5633#endif
5634EOF
5635
5636if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005637 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5638 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5640$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005641 if test -z "$ANDROID_API_LEVEL"; then
5642 echo 'Fatal: you must define __ANDROID_API__'
5643 exit 1
5644 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005645
5646cat >>confdefs.h <<_ACEOF
5647#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5648_ACEOF
5649
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005650
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5652$as_echo_n "checking for the Android arm ABI... " >&6; }
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5654$as_echo "$_arm_arch" >&6; }
5655 if test "$_arm_arch" = 7; then
5656 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5657 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5658 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659else
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5661$as_echo "not Android" >&6; }
5662fi
5663rm -f conftest.c conftest.out
5664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665# Check for unsupported systems
5666case $ac_sys_system/$ac_sys_release in
5667atheos*|Linux*/1*)
5668 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5669 echo See README for details.
5670 exit 1;;
5671esac
5672
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5675$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676
5677# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005678if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 withval=$with_suffix;
5680 case $withval in
5681 no) EXEEXT=;;
5682 yes) EXEEXT=.exe;;
5683 *) EXEEXT=$withval;;
5684 esac
5685fi
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5688$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690# Test whether we're running on a non-case-sensitive system, in which
5691# case we give a warning if no ext is given
5692
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5694$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695if test ! -d CaseSensitiveTestDir; then
5696mkdir CaseSensitiveTestDir
5697fi
5698
5699if test -d casesensitivetestdir
5700then
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5702$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 BUILDEXEEXT=.exe
5704else
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 BUILDEXEEXT=$EXEEXT
5708fi
5709rmdir CaseSensitiveTestDir
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711case $ac_sys_system in
5712hp*|HP*)
5713 case $CC in
5714 cc|*/cc) CC="$CC -Ae";;
5715 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716esac
5717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5720$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721if test -z "$LIBRARY"
5722then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005723 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5726$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728# LDLIBRARY is the name of the library to link against (as opposed to the
5729# name of the library into which to insert object files). BLDLIBRARY is also
5730# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5731# is blank as the main program is not linked directly against LDLIBRARY.
5732# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5733# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5734# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5735# DLLLIBRARY is the shared (i.e., DLL) library.
5736#
5737# RUNSHARED is used to run shared python without installed libraries
5738#
5739# INSTSONAME is the name of the shared library that will be use to install
5740# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005741#
5742# LDVERSION is the shared library version number, normally the Python version
5743# with the ABI build flags appended.
5744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745
5746
5747
5748
5749
5750
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752LDLIBRARY="$LIBRARY"
5753BLDLIBRARY='$(LDLIBRARY)'
5754INSTSONAME='$(LDLIBRARY)'
5755DLLLIBRARY=''
5756LDLIBRARYDIR=''
5757RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005758LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# LINKCC is the command that links the python executable -- default is $(CC).
5761# If CXX is set, and if it is needed to link a main function that was
5762# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5763# python might then depend on the C++ runtime
5764# This is altered for AIX in order to build the export list before
5765# linking.
5766
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5768$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769if test -z "$LINKCC"
5770then
5771 LINKCC='$(PURIFY) $(MAINCC)'
5772 case $ac_sys_system in
5773 AIX*)
5774 exp_extra="\"\""
5775 if test $ac_sys_release -ge 5 -o \
5776 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5777 exp_extra="."
5778 fi
5779 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780 QNX*)
5781 # qcc must be used because the other compilers do not
5782 # support -N.
5783 LINKCC=qcc;;
5784 esac
5785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5787$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788
5789# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5790# make sure we default having it set to "no": this is used by
5791# distutils.unixccompiler to know if it should add --enable-new-dtags
5792# to linker command lines, and failing to detect GNU ld simply results
5793# in the same bahaviour as before.
5794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5796$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797ac_prog=ld
5798if test "$GCC" = yes; then
5799 ac_prog=`$CC -print-prog-name=ld`
5800fi
5801case `"$ac_prog" -V 2>&1 < /dev/null` in
5802 *GNU*)
5803 GNULD=yes;;
5804 *)
5805 GNULD=no;;
5806esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5808$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5811$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005813if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814 enableval=$enable_shared;
5815fi
5816
5817
5818if test -z "$enable_shared"
5819then
5820 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005821 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 enable_shared="yes";;
5823 *)
5824 enable_shared="no";;
5825 esac
5826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5828$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
Matthias Kloseb9621712010-04-24 17:59:49 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5831$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005833if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834 enableval=$enable_profiling;
5835fi
5836
5837if test "x$enable_profiling" = xyes; then
5838 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005839 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841/* end confdefs.h. */
5842int main() { return 0; }
5843_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844if ac_fn_c_try_link "$LINENO"; then :
5845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005847 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005849rm -f core conftest.err conftest.$ac_objext \
5850 conftest$ac_exeext conftest.$ac_ext
5851 CC="$ac_save_cc"
5852else
5853 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5856$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857
doko@ubuntu.comba015832012-06-30 16:52:05 +02005858if test "x$enable_profiling" = xyes; then
5859 BASECFLAGS="-pg $BASECFLAGS"
5860 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861fi
5862
Matthias Kloseb9621712010-04-24 17:59:49 +00005863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5864$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865
5866# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5867# library that we build, but we do not want to link against it (we
5868# will find it with a -framework option). For this reason there is an
5869# extra variable BLDLIBRARY against which Python and the extension
5870# modules are linked, BLDLIBRARY. This is normally the same as
5871# LDLIBRARY, but empty for MacOSX framework builds.
5872if test "$enable_framework"
5873then
5874 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005875 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 BLDLIBRARY=''
5877else
5878 BLDLIBRARY='$(LDLIBRARY)'
5879fi
5880
5881# Other platforms follow
5882if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005883 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887 case $ac_sys_system in
5888 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 LDLIBRARY='libpython$(LDVERSION).dll.a'
5890 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 ;;
5892 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005893 LDLIBRARY='libpython$(LDVERSION).so'
5894 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005895 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005897 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005898 then
5899 PY3LIBRARY=libpython3.so
5900 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005902 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).so'
5904 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005907 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005908 then
5909 PY3LIBRARY=libpython3.so
5910 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
5912 hp*|HP*)
5913 case `uname -m` in
5914 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
5917 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 ;;
5920 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).dylib'
5926 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005929 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005931 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005932 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
5934 esac
5935else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005936 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 case $ac_sys_system in
5938 CYGWIN*)
5939 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ;;
5942 esac
5943fi
5944
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005945if test "$cross_compiling" = yes; then
5946 RUNSHARED=
5947fi
5948
Matthias Kloseb9621712010-04-24 17:59:49 +00005949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5950$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005953if test -n "$ac_tool_prefix"; then
5954 for ac_prog in ar aal
5955 do
5956 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5957set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005960if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962else
5963 if test -n "$AR"; then
5964 ac_cv_prog_AR="$AR" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969 IFS=$as_save_IFS
5970 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005973 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 break 2
5976 fi
5977done
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979IFS=$as_save_IFS
5980
5981fi
5982fi
5983AR=$ac_cv_prog_AR
5984if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5986$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987else
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990fi
5991
5992
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005993 test -n "$AR" && break
5994 done
5995fi
5996if test -z "$AR"; then
5997 ac_ct_AR=$AR
5998 for ac_prog in ar aal
5999do
6000 # Extract the first word of "$ac_prog", so it can be a program name with args.
6001set dummy $ac_prog; ac_word=$2
6002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6003$as_echo_n "checking for $ac_word... " >&6; }
6004if ${ac_cv_prog_ac_ct_AR+:} false; then :
6005 $as_echo_n "(cached) " >&6
6006else
6007 if test -n "$ac_ct_AR"; then
6008 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6009else
6010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6011for as_dir in $PATH
6012do
6013 IFS=$as_save_IFS
6014 test -z "$as_dir" && as_dir=.
6015 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006017 ac_cv_prog_ac_ct_AR="$ac_prog"
6018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6019 break 2
6020 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006022 done
6023IFS=$as_save_IFS
6024
6025fi
6026fi
6027ac_ct_AR=$ac_cv_prog_ac_ct_AR
6028if test -n "$ac_ct_AR"; then
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6030$as_echo "$ac_ct_AR" >&6; }
6031else
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033$as_echo "no" >&6; }
6034fi
6035
6036
6037 test -n "$ac_ct_AR" && break
6038done
6039
6040 if test "x$ac_ct_AR" = x; then
6041 AR="ar"
6042 else
6043 case $cross_compiling:$ac_tool_warned in
6044yes:)
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6047ac_tool_warned=yes ;;
6048esac
6049 AR=$ac_ct_AR
6050 fi
6051fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052
6053
6054# tweak ARFLAGS only if the user didn't set it on the command line
6055
6056if test -z "$ARFLAGS"
6057then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006058 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059fi
6060
doko@ubuntu.com58844492012-06-30 18:25:32 +02006061if test -n "$ac_tool_prefix"; then
6062 for ac_prog in readelf
6063 do
6064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
6068if ${ac_cv_prog_READELF+:} false; then :
6069 $as_echo_n "(cached) " >&6
6070else
6071 if test -n "$READELF"; then
6072 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6073else
6074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077 IFS=$as_save_IFS
6078 test -z "$as_dir" && as_dir=.
6079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006081 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6083 break 2
6084 fi
6085done
6086 done
6087IFS=$as_save_IFS
6088
6089fi
6090fi
6091READELF=$ac_cv_prog_READELF
6092if test -n "$READELF"; then
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6094$as_echo "$READELF" >&6; }
6095else
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
6098fi
6099
6100
6101 test -n "$READELF" && break
6102 done
6103fi
6104if test -z "$READELF"; then
6105 ac_ct_READELF=$READELF
6106 for ac_prog in readelf
6107do
6108 # Extract the first word of "$ac_prog", so it can be a program name with args.
6109set dummy $ac_prog; ac_word=$2
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6113 $as_echo_n "(cached) " >&6
6114else
6115 if test -n "$ac_ct_READELF"; then
6116 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6117else
6118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
6123 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006125 ac_cv_prog_ac_ct_READELF="$ac_prog"
6126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127 break 2
6128 fi
6129done
6130 done
6131IFS=$as_save_IFS
6132
6133fi
6134fi
6135ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6136if test -n "$ac_ct_READELF"; then
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6138$as_echo "$ac_ct_READELF" >&6; }
6139else
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145 test -n "$ac_ct_READELF" && break
6146done
6147
6148 if test "x$ac_ct_READELF" = x; then
6149 READELF=":"
6150 else
6151 case $cross_compiling:$ac_tool_warned in
6152yes:)
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6155ac_tool_warned=yes ;;
6156esac
6157 READELF=$ac_ct_READELF
6158 fi
6159fi
6160
6161if test "$cross_compiling" = yes; then
6162 case "$READELF" in
6163 readelf|:)
6164 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6165 ;;
6166 esac
6167fi
6168
6169
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006172hp*|HP*)
6173 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174 if test -z "$INSTALL"
6175 then
6176 INSTALL="${srcdir}/install-sh -c"
6177 fi
6178esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179# Find a good install program. We prefer a C program (faster),
6180# so one script is as good as another. But avoid the broken or
6181# incompatible versions:
6182# SysV /etc/install, /usr/sbin/install
6183# SunOS /usr/etc/install
6184# IRIX /sbin/install
6185# AIX /bin/install
6186# AmigaOS /C/install, which installs bootblocks on floppy discs
6187# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6188# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6189# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6190# OS/2's system install, which has a completely different semantic
6191# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006192# Reject install programs that cannot install multiple files.
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6194$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006196if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198else
6199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6200for as_dir in $PATH
6201do
6202 IFS=$as_save_IFS
6203 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 # Account for people who put trailing slashes in PATH elements.
6205case $as_dir/ in #((
6206 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006209 /usr/ucb/* ) ;;
6210 *)
6211 # OSF1 and SCO ODT 3.0 have their own names for install.
6212 # Don't use installbsd from OSF since it installs stuff as root
6213 # by default.
6214 for ac_prog in ginstall scoinst install; do
6215 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006216 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217 if test $ac_prog = install &&
6218 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6219 # AIX install. It has an incompatible calling convention.
6220 :
6221 elif test $ac_prog = install &&
6222 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6223 # program-specific install script used by HP pwplus--don't use.
6224 :
6225 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 rm -rf conftest.one conftest.two conftest.dir
6227 echo one > conftest.one
6228 echo two > conftest.two
6229 mkdir conftest.dir
6230 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6231 test -s conftest.one && test -s conftest.two &&
6232 test -s conftest.dir/conftest.one &&
6233 test -s conftest.dir/conftest.two
6234 then
6235 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6236 break 3
6237 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238 fi
6239 fi
6240 done
6241 done
6242 ;;
6243esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006244
6245 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246IFS=$as_save_IFS
6247
Matthias Kloseb9621712010-04-24 17:59:49 +00006248rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249
6250fi
6251 if test "${ac_cv_path_install+set}" = set; then
6252 INSTALL=$ac_cv_path_install
6253 else
6254 # As a last resort, use the slow shell script. Don't cache a
6255 # value for INSTALL within a source directory, because that will
6256 # break other packages using the cache if that directory is
6257 # removed, or if the value is a relative name.
6258 INSTALL=$ac_install_sh
6259 fi
6260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6262$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263
6264# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6265# It thinks the first close brace ends the variable substitution.
6266test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6267
6268test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6269
6270test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6271
Matthias Klose93a0ef12012-03-15 18:08:34 +01006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6273$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6274if test -z "$MKDIR_P"; then
6275 if ${ac_cv_path_mkdir+:} false; then :
6276 $as_echo_n "(cached) " >&6
6277else
6278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6280do
6281 IFS=$as_save_IFS
6282 test -z "$as_dir" && as_dir=.
6283 for ac_prog in mkdir gmkdir; do
6284 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006285 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006286 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6287 'mkdir (GNU coreutils) '* | \
6288 'mkdir (coreutils) '* | \
6289 'mkdir (fileutils) '4.1*)
6290 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6291 break 3;;
6292 esac
6293 done
6294 done
6295 done
6296IFS=$as_save_IFS
6297
6298fi
6299
6300 test -d ./--version && rmdir ./--version
6301 if test "${ac_cv_path_mkdir+set}" = set; then
6302 MKDIR_P="$ac_cv_path_mkdir -p"
6303 else
6304 # As a last resort, use the slow shell script. Don't cache a
6305 # value for MKDIR_P within a source directory, because that will
6306 # break other packages using the cache if that directory is
6307 # removed, or if the value is a relative name.
6308 MKDIR_P="$ac_install_sh -d"
6309 fi
6310fi
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6312$as_echo "$MKDIR_P" >&6; }
6313
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315# Not every filesystem supports hard links
6316
6317if test -z "$LN" ; then
6318 case $ac_sys_system in
6319 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 *) LN=ln;;
6321 esac
6322fi
6323
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006324# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006325
6326ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006327
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6330$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331
6332# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006333if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334 withval=$with_pydebug;
6335if test "$withval" != no
6336then
6337
Matthias Kloseb9621712010-04-24 17:59:49 +00006338$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6341$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006343 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006344else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346fi
6347else
Matthias Kloseb9621712010-04-24 17:59:49 +00006348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350fi
6351
6352
Victor Stinnerf4e47032019-04-25 00:56:28 +02006353# Check for --with-trace-refs
6354# --with-trace-refs
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6356$as_echo_n "checking for --with-trace-refs... " >&6; }
6357
6358# Check whether --with-trace-refs was given.
6359if test "${with_trace_refs+set}" = set; then :
6360 withval=$with_trace_refs;
6361else
6362 with_trace_refs=no
6363fi
6364
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6366$as_echo "$with_trace_refs" >&6; }
6367
6368if test "$with_trace_refs" = "yes"
6369then
6370
6371$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6372
6373fi
6374
6375# Check for --with-assertions.
6376# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006377assertions='false'
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6379$as_echo_n "checking for --with-assertions... " >&6; }
6380
6381# Check whether --with-assertions was given.
6382if test "${with_assertions+set}" = set; then :
6383 withval=$with_assertions;
6384if test "$withval" != no
6385then
6386 assertions='true'
6387fi
6388fi
6389
6390if test "$assertions" = 'true'; then
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6392$as_echo "yes" >&6; }
6393elif test "$Py_DEBUG" = 'true'; then
6394 assertions='true'
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6396$as_echo "implied by --with-pydebug" >&6; }
6397else
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399$as_echo "no" >&6; }
6400fi
6401
Brett Cannon63d98bc2016-09-06 17:12:40 -07006402# Enable optimization flags
6403
6404
6405Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6407$as_echo_n "checking for --enable-optimizations... " >&6; }
6408# Check whether --enable-optimizations was given.
6409if test "${enable_optimizations+set}" = set; then :
6410 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006411if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006412then
6413 Py_OPT='true'
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6415$as_echo "yes" >&6; };
6416else
6417 Py_OPT='false'
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; };
6420fi
6421else
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006427 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6428 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006429 # 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 +00006430 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006431 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006432 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006433 DEF_MAKE_RULE="build_all"
6434else
6435 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006436 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006437 DEF_MAKE_RULE="all"
6438fi
6439
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006440
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6442$as_echo_n "checking PROFILE_TASK... " >&6; }
6443if test -z "$PROFILE_TASK"
6444then
6445 PROFILE_TASK='-m test --pgo'
6446fi
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6448$as_echo "$PROFILE_TASK" >&6; }
6449
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006450# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6451# normal names in the default $PATH (ie: Ubuntu). They exist under the
6452# non-suffixed name in their versioned llvm directory.
6453
6454llvm_bin_dir=''
6455llvm_path="${PATH}"
6456if test "${CC}" = "clang"
6457then
6458 clang_bin=`which clang`
6459 # Some systems install clang elsewhere as a symlink to the real path
6460 # which is where the related llvm tools are located.
6461 if test -L "${clang_bin}"
6462 then
6463 clang_dir=`dirname "${clang_bin}"`
6464 clang_bin=`readlink "${clang_bin}"`
6465 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6466 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6467 fi
6468fi
6469
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006470# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6472$as_echo_n "checking for --with-lto... " >&6; }
6473
6474# Check whether --with-lto was given.
6475if test "${with_lto+set}" = set; then :
6476 withval=$with_lto;
6477if test "$withval" != no
6478then
6479 Py_LTO='true'
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6481$as_echo "yes" >&6; };
6482else
6483 Py_LTO='false'
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485$as_echo "no" >&6; };
6486fi
6487else
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492if test "$Py_LTO" = 'true' ; then
6493 case $CC in
6494 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006495
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006496 if test -n "$ac_tool_prefix"; then
6497 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6498set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if ${ac_cv_path_LLVM_AR+:} false; then :
6502 $as_echo_n "(cached) " >&6
6503else
6504 case $LLVM_AR in
6505 [\\/]* | ?:[\\/]*)
6506 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6507 ;;
6508 *)
6509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in ${llvm_path}
6511do
6512 IFS=$as_save_IFS
6513 test -z "$as_dir" && as_dir=.
6514 for ac_exec_ext in '' $ac_executable_extensions; do
6515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6516 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518 break 2
6519 fi
6520done
6521 done
6522IFS=$as_save_IFS
6523
6524 ;;
6525esac
6526fi
6527LLVM_AR=$ac_cv_path_LLVM_AR
6528if test -n "$LLVM_AR"; then
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6530$as_echo "$LLVM_AR" >&6; }
6531else
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006537fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006538if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006539 ac_pt_LLVM_AR=$LLVM_AR
6540 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006541set dummy llvm-ar; ac_word=$2
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6543$as_echo_n "checking for $ac_word... " >&6; }
6544if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6545 $as_echo_n "(cached) " >&6
6546else
6547 case $ac_pt_LLVM_AR in
6548 [\\/]* | ?:[\\/]*)
6549 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6550 ;;
6551 *)
6552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in ${llvm_path}
6554do
6555 IFS=$as_save_IFS
6556 test -z "$as_dir" && as_dir=.
6557 for ac_exec_ext in '' $ac_executable_extensions; do
6558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6559 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6561 break 2
6562 fi
6563done
6564 done
6565IFS=$as_save_IFS
6566
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006567 ;;
6568esac
6569fi
6570ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6571if test -n "$ac_pt_LLVM_AR"; then
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6573$as_echo "$ac_pt_LLVM_AR" >&6; }
6574else
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006579 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006580 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006581 else
6582 case $cross_compiling:$ac_tool_warned in
6583yes:)
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6586ac_tool_warned=yes ;;
6587esac
6588 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006589 fi
6590else
6591 LLVM_AR="$ac_cv_path_LLVM_AR"
6592fi
6593
6594
6595 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6596 then
6597 LLVM_AR_FOUND="found"
6598 else
6599 LLVM_AR_FOUND="not-found"
6600 fi
6601 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6602 then
6603 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6604 if test -n "${found_llvm_ar}"
6605 then
6606 LLVM_AR='/usr/bin/xcrun llvm-ar'
6607 LLVM_AR_FOUND=found
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6609$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6610 fi
6611 fi
6612 if test $LLVM_AR_FOUND = not-found
6613 then
6614 LLVM_PROFR_ERR=yes
6615 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6616 else
6617 LLVM_AR_ERR=no
6618 fi
6619 AR="${LLVM_AR}"
6620 case $ac_sys_system in
6621 Darwin*)
6622 # Any changes made here should be reflected in the GCC+Darwin case below
6623 LTOFLAGS="-flto -Wl,-export_dynamic"
6624 ;;
6625 *)
6626 LTOFLAGS="-flto"
6627 ;;
6628 esac
6629 ;;
6630 *gcc*)
6631 case $ac_sys_system in
6632 Darwin*)
6633 LTOFLAGS="-flto -Wl,-export_dynamic"
6634 ;;
6635 *)
6636 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6637 ;;
6638 esac
6639 ;;
6640 esac
6641
6642 if test "$ac_cv_prog_cc_g" = "yes"
6643 then
6644 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6645 # to get debug symbols.
6646 LTOFLAGS="$LTOFLAGS -g"
6647 fi
6648
stratakisf92c7aa2018-12-04 15:54:01 +01006649 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006650 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006651fi
6652
6653# Enable PGO flags.
6654
6655
6656
6657
6658
6659
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006660if test -n "$ac_tool_prefix"; then
6661 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6662set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664$as_echo_n "checking for $ac_word... " >&6; }
6665if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667else
6668 case $LLVM_PROFDATA in
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006680 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682 break 2
6683 fi
6684done
6685 done
6686IFS=$as_save_IFS
6687
Gregory P. Smith799520c2016-09-07 16:10:00 -07006688 ;;
6689esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006690fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006691LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6692if test -n "$LLVM_PROFDATA"; then
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6694$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695else
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6697$as_echo "no" >&6; }
6698fi
6699
6700
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006701fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006702if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006703 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6704 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006705set dummy llvm-profdata; ac_word=$2
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6709 $as_echo_n "(cached) " >&6
6710else
6711 case $ac_pt_LLVM_PROFDATA in
6712 [\\/]* | ?:[\\/]*)
6713 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6714 ;;
6715 *)
6716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in ${llvm_path}
6718do
6719 IFS=$as_save_IFS
6720 test -z "$as_dir" && as_dir=.
6721 for ac_exec_ext in '' $ac_executable_extensions; do
6722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725 break 2
6726 fi
6727done
6728 done
6729IFS=$as_save_IFS
6730
Gregory P. Smith799520c2016-09-07 16:10:00 -07006731 ;;
6732esac
6733fi
6734ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6735if test -n "$ac_pt_LLVM_PROFDATA"; then
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6737$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6738else
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740$as_echo "no" >&6; }
6741fi
6742
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006743 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006745 else
6746 case $cross_compiling:$ac_tool_warned in
6747yes:)
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6750ac_tool_warned=yes ;;
6751esac
6752 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753 fi
6754else
6755 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6756fi
6757
6758
6759if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6760then
6761 LLVM_PROF_FOUND="found"
6762else
6763 LLVM_PROF_FOUND="not-found"
6764fi
6765if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6766then
6767 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6768 if test -n "${found_llvm_profdata}"
6769 then
6770 # llvm-profdata isn't directly in $PATH in some cases.
6771 # https://apple.stackexchange.com/questions/197053/
6772 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6773 LLVM_PROF_FOUND=found
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6775$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6776 fi
6777fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006778LLVM_PROF_ERR=no
6779case $CC in
6780 *clang*)
6781 # Any changes made here should be reflected in the GCC+Darwin case below
6782 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6783 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006784 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6786 if test $LLVM_PROF_FOUND = not-found
6787 then
6788 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006789 if test "${REQUIRE_PGO}" = "yes"
6790 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006791 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 -07006792 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006793 fi
6794 ;;
6795 *gcc*)
6796 case $ac_sys_system in
6797 Darwin*)
6798 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6799 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 then
6804 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006805 if test "${REQUIRE_PGO}" = "yes"
6806 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006807 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 -07006808 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809 fi
6810 ;;
6811 *)
6812 PGO_PROF_GEN_FLAG="-fprofile-generate"
6813 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6814 LLVM_PROF_MERGER="true"
6815 LLVM_PROF_FILE=""
6816 ;;
6817 esac
6818 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006819 *icc*)
6820 PGO_PROF_GEN_FLAG="-prof-gen"
6821 PGO_PROF_USE_FLAG="-prof-use"
6822 LLVM_PROF_MERGER="true"
6823 LLVM_PROF_FILE=""
6824 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825esac
6826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6828# merged with this chunk of code?
6829
6830# Optimizer/debugger flags
6831# ------------------------
6832# (The following bit of code is complicated enough - please keep things
6833# indented properly. Just pretend you're editing Python code. ;-)
6834
6835# There are two parallel sets of case statements below, one that checks to
6836# see if OPT was set and one that does BASECFLAGS setting based upon
6837# compiler and platform. BASECFLAGS tweaks need to be made even if the
6838# user set OPT.
6839
Victor Stinner23a683a2019-04-12 21:27:37 +02006840case $CC in
6841 *clang*)
6842 cc_is_clang=1
6843 ;;
6844 *)
6845 if $CC --version 2>&1 | grep -q clang
6846 then
6847 cc_is_clang=1
6848 else
6849 cc_is_clang=
6850 fi
6851esac
6852
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853# tweak OPT based on compiler and platform, only if the user didn't set
6854# it on the command line
6855
Victor Stinner9ed34a82017-05-02 22:35:58 +02006856
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006857if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858then
6859 case $GCC in
6860 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6862 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6863 WRAP="-fwrapv"
6864 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006865
Victor Stinner35f3d242017-04-21 12:35:24 +02006866 if test -n "${cc_is_clang}"
6867 then
6868 # Clang also needs -fwrapv
6869 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006870 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6871 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006872 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006873 fi
6874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875 case $ac_cv_prog_cc_g in
6876 yes)
6877 if test "$Py_DEBUG" = 'true' ; then
6878 # Optimization messes up debuggers, so turn it off for
6879 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006880 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006881 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006882 else
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006884 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 else
Victor Stinner28205b22017-04-21 11:24:34 +02006886 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 fi
6888 ;;
6889 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006890 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 ;;
6892 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894 case $ac_sys_system in
6895 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6896 ;;
6897 esac
6898 ;;
6899
6900 *)
6901 OPT="-O"
6902 ;;
6903 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904fi
6905
6906
6907
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006908
stratakiscf10a752018-12-19 18:19:01 +01006909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910# The -arch flags for universal builds on OSX
6911UNIVERSAL_ARCH_FLAGS=
6912
6913
6914# tweak BASECFLAGS based on compiler and platform
6915case $GCC in
6916yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006917 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006918
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6920$as_echo_n "checking for -Wextra... " >&6; }
6921 ac_save_cc="$CC"
6922 CC="$CC -Wextra -Werror"
6923 if ${ac_cv_extra_warnings+:} false; then :
6924 $as_echo_n "(cached) " >&6
6925else
6926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927/* end confdefs.h. */
6928
6929
6930int
6931main ()
6932{
6933
6934 ;
6935 return 0;
6936}
6937
6938_ACEOF
6939if ac_fn_c_try_compile "$LINENO"; then :
6940
6941 ac_cv_extra_warnings=yes
6942
6943else
6944
6945 ac_cv_extra_warnings=no
6946
6947fi
6948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6949fi
6950
6951 CC="$ac_save_cc"
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6953$as_echo "$ac_cv_extra_warnings" >&6; }
6954
6955 if test $ac_cv_extra_warnings = yes
6956 then
6957 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6958 fi
6959
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960 # Python doesn't violate C99 aliasing rules, but older versions of
6961 # GCC produce warnings for legal Python code. Enable
6962 # -fno-strict-aliasing on versions of GCC that support but produce
6963 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6965$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966 ac_save_cc="$CC"
6967 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006969 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006971else
Matthias Kloseb9621712010-04-24 17:59:49 +00006972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006974
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006976int
6977main ()
6978{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006979
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006980 ;
6981 return 0;
6982}
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006985if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
6987 CC="$ac_save_cc -fstrict-aliasing"
6988 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990/* end confdefs.h. */
6991
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006992 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993int
6994main ()
6995{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006996double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997 ;
6998 return 0;
6999}
Matthias Kloseb159a552010-04-25 21:00:44 +00007000
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007002if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007003
7004 ac_cv_no_strict_aliasing=no
7005
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006else
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
7008 ac_cv_no_strict_aliasing=yes
7009
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007010fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007012
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013else
Matthias Kloseb159a552010-04-25 21:00:44 +00007014
7015 ac_cv_no_strict_aliasing=no
7016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007019fi
7020
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7024$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007026 then
7027 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7028 fi
7029
Zachary Ware5af85642015-12-21 12:09:17 -06007030 # ICC doesn't recognize the option, but only emits a warning
7031 ## XXX does it emit an unused result warning and can it be disabled?
7032 case "$CC" in
7033 *icc*)
7034 ac_cv_disable_unused_result_warning=no
7035 ;;
7036 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7038$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7039 ac_save_cc="$CC"
7040 CC="$CC -Wunused-result -Werror"
7041 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007042 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007043 $as_echo_n "(cached) " >&6
7044else
7045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7046/* end confdefs.h. */
7047
7048
7049int
7050main ()
7051{
7052
7053 ;
7054 return 0;
7055}
7056
7057_ACEOF
7058if ac_fn_c_try_compile "$LINENO"; then :
7059
7060 ac_cv_disable_unused_result_warning=yes
7061
7062else
7063
7064 ac_cv_disable_unused_result_warning=no
7065
7066fi
7067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7068fi
7069
7070 CFLAGS="$save_CFLAGS"
7071 CC="$ac_save_cc"
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7073$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007074 ;;
7075 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007076
7077 if test $ac_cv_disable_unused_result_warning = yes
7078 then
7079 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007080 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7081 fi
7082
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7084$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7085 ac_save_cc="$CC"
7086 CC="$CC -Wunused-parameter -Werror"
7087 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7088 $as_echo_n "(cached) " >&6
7089else
7090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091/* end confdefs.h. */
7092
7093
7094int
7095main ()
7096{
7097
7098 ;
7099 return 0;
7100}
7101
7102_ACEOF
7103if ac_fn_c_try_compile "$LINENO"; then :
7104
7105 ac_cv_disable_unused_parameter_warning=yes
7106
7107else
7108
7109 ac_cv_disable_unused_parameter_warning=no
7110
7111fi
7112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7113fi
7114
7115 CC="$ac_save_cc"
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7117$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7118
7119 if test $ac_cv_disable_unused_parameter_warning = yes
7120 then
7121 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7122 fi
7123
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7125$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7126 ac_save_cc="$CC"
7127 CC="$CC -Wmissing-field-initializers -Werror"
7128 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7129 $as_echo_n "(cached) " >&6
7130else
7131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7132/* end confdefs.h. */
7133
7134
7135int
7136main ()
7137{
7138
7139 ;
7140 return 0;
7141}
7142
7143_ACEOF
7144if ac_fn_c_try_compile "$LINENO"; then :
7145
7146 ac_cv_disable_missing_field_initializers=yes
7147
7148else
7149
7150 ac_cv_disable_missing_field_initializers=no
7151
7152fi
7153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7154fi
7155
7156 CC="$ac_save_cc"
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7158$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7159
7160 if test $ac_cv_disable_missing_field_initializers = yes
7161 then
7162 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007163 fi
7164
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7166$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7167 ac_save_cc="$CC"
7168 CC="$CC -Wsign-compare"
7169 save_CFLAGS="$CFLAGS"
7170 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7171 $as_echo_n "(cached) " >&6
7172else
7173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7174/* end confdefs.h. */
7175
7176
7177int
7178main ()
7179{
7180
7181 ;
7182 return 0;
7183}
7184
7185_ACEOF
7186if ac_fn_c_try_compile "$LINENO"; then :
7187
7188 ac_cv_enable_sign_compare_warning=yes
7189
7190else
7191
7192 ac_cv_enable_sign_compare_warning=no
7193
7194fi
7195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7196fi
7197
7198 CFLAGS="$save_CFLAGS"
7199 CC="$ac_save_cc"
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7201$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7202
7203 if test $ac_cv_enable_sign_compare_warning = yes
7204 then
7205 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7206 fi
7207
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7209$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7210 ac_save_cc="$CC"
7211 CC="$CC -Wunreachable-code"
7212 save_CFLAGS="$CFLAGS"
7213 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7214 $as_echo_n "(cached) " >&6
7215else
7216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7217/* end confdefs.h. */
7218
7219
7220int
7221main ()
7222{
7223
7224 ;
7225 return 0;
7226}
7227
7228_ACEOF
7229if ac_fn_c_try_compile "$LINENO"; then :
7230
7231 ac_cv_enable_unreachable_code_warning=yes
7232
7233else
7234
7235 ac_cv_enable_unreachable_code_warning=no
7236
7237fi
7238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7239fi
7240
7241 CFLAGS="$save_CFLAGS"
7242 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007243
7244 # Don't enable unreachable code warning in debug mode, since it usually
7245 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007246 # Issue #24324: Unfortunately, the unreachable code warning does not work
7247 # correctly on gcc and has been silently removed from the compiler.
7248 # It is supported on clang but on OS X systems gcc may be an alias
7249 # for clang. Try to determine if the compiler is not really gcc and,
7250 # if so, only then enable the warning.
7251 if test $ac_cv_enable_unreachable_code_warning = yes && \
7252 test "$Py_DEBUG" != "true" && \
7253 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007254 then
7255 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007256 else
7257 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007258 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7260$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007261
INADA Naokie3364842018-06-05 20:40:53 +09007262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7263$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7264 ac_save_cc="$CC"
7265 CC="$CC -Werror -Wstrict-prototypes"
7266 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7267 $as_echo_n "(cached) " >&6
7268else
7269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7270/* end confdefs.h. */
7271
7272
7273int
7274main ()
7275{
7276
7277 ;
7278 return 0;
7279}
7280
7281_ACEOF
7282if ac_fn_c_try_compile "$LINENO"; then :
7283
7284 ac_cv_enable_strict_prototypes_warning=yes
7285
7286else
7287
7288 ac_cv_enable_strict_prototypes_warning=no
7289
7290fi
7291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7292fi
7293
7294 CC="$ac_save_cc"
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7296$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7297
7298 if test $ac_cv_enable_strict_prototypes_warning = yes
7299 then
7300 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7301 fi
7302
Victor Stinner193ee0a2017-02-06 14:24:00 +01007303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7304$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7305 ac_save_cc="$CC"
7306 CC="$CC -Werror=implicit-function-declaration"
7307 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7308 $as_echo_n "(cached) " >&6
7309else
7310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7311/* end confdefs.h. */
7312
7313
7314int
7315main ()
7316{
7317
7318 ;
7319 return 0;
7320}
7321
7322_ACEOF
7323if ac_fn_c_try_compile "$LINENO"; then :
7324
7325 ac_cv_enable_implicit_function_declaration_error=yes
7326
7327else
7328
7329 ac_cv_enable_implicit_function_declaration_error=no
7330
7331fi
7332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7333fi
7334
7335 CC="$ac_save_cc"
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7337$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7338
7339 if test $ac_cv_enable_implicit_function_declaration_error = yes
7340 then
7341 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7342 fi
7343
Vinay Sajip0b60f642019-10-15 08:26:12 +01007344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7345$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7346 ac_save_cc="$CC"
7347 CC="$CC -fvisibility=hidden"
7348 if ${ac_cv_enable_visibility+:} false; then :
7349 $as_echo_n "(cached) " >&6
7350else
7351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7352/* end confdefs.h. */
7353
7354
7355int
7356main ()
7357{
7358
7359 ;
7360 return 0;
7361}
7362
7363_ACEOF
7364if ac_fn_c_try_compile "$LINENO"; then :
7365
7366 ac_cv_enable_visibility=yes
7367
7368else
7369
7370 ac_cv_enable_visibility=no
7371
7372fi
7373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374fi
7375
7376 CC="$ac_save_cc"
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7378$as_echo "$ac_cv_enable_visibility" >&6; }
7379
7380 if test $ac_cv_enable_visibility = yes
7381 then
7382 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7383 fi
7384
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007385 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7386 # support. Without this, treatment of subnormals doesn't follow
7387 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007388 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007389 alpha*)
7390 BASECFLAGS="$BASECFLAGS -mieee"
7391 ;;
7392 esac
7393
7394 case $ac_sys_system in
7395 SCO_SV*)
7396 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7397 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007398
Ned Deily87adb6e2013-10-18 21:09:56 -07007399 Darwin*)
7400 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7401 # used to be here, but non-Apple gcc doesn't accept them.
7402 if test "${CC}" = gcc
7403 then
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007405$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007406 case "${UNIVERSALSDK}" in
7407 */MacOSX10.4u.sdk)
7408 # Build using 10.4 SDK, force usage of gcc when the
7409 # compiler is gcc, otherwise the user will get very
7410 # confusing error messages when building on OSX 10.6
7411 CC=gcc-4.0
7412 CPP=cpp-4.0
7413 ;;
7414 esac
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007416$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007417 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418
Ned Deily87adb6e2013-10-18 21:09:56 -07007419 if test "${enable_universalsdk}"
7420 then
7421 case "$UNIVERSAL_ARCHS" in
7422 32-bit)
7423 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7424 LIPO_32BIT_FLAGS=""
7425 ARCH_RUN_32BIT=""
7426 ;;
7427 64-bit)
7428 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7429 LIPO_32BIT_FLAGS=""
7430 ARCH_RUN_32BIT="true"
7431 ;;
7432 all)
7433 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7434 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7435 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7436 ;;
7437 intel)
7438 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7439 LIPO_32BIT_FLAGS="-extract i386"
7440 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7441 ;;
7442 intel-32)
7443 UNIVERSAL_ARCH_FLAGS="-arch i386"
7444 LIPO_32BIT_FLAGS=""
7445 ARCH_RUN_32BIT=""
7446 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007447 intel-64)
7448 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7449 LIPO_32BIT_FLAGS=""
7450 ARCH_RUN_32BIT="true"
7451 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007452 3-way)
7453 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7454 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7455 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7456 ;;
7457 *)
7458 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7459 ;;
7460 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461
Ned Deily87adb6e2013-10-18 21:09:56 -07007462 if test "${UNIVERSALSDK}" != "/"
7463 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007464 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7465 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007466 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007467 else
7468 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7469 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007470 fi
7471 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472
Ned Deily87adb6e2013-10-18 21:09:56 -07007473 # Calculate an appropriate deployment target for this build:
7474 # The deployment target value is used explicitly to enable certain
7475 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007476 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007477 # component of the string returned by distutils.get_platform().
7478 #
7479 # Use the value from:
7480 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7481 # 2. the operating system version of the build machine if >= 10.6
7482 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7483 # below to pick either 10.3, 10.4, or 10.5 as the target.
7484 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485
Ned Deily87adb6e2013-10-18 21:09:56 -07007486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7487$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007488 cur_target_major=`sw_vers -productVersion | \
7489 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7490 cur_target_minor=`sw_vers -productVersion | \
7491 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7492 cur_target="${cur_target_major}.${cur_target_minor}"
7493 if test ${cur_target_major} -eq 10 && \
7494 test ${cur_target_minor} -ge 3 && \
7495 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007496 then
Ned Deily36820b62014-06-25 13:44:22 -07007497 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 cur_target=10.3
7499 if test ${enable_universalsdk}
7500 then
7501 case "$UNIVERSAL_ARCHS" in
7502 all|3-way|intel|64-bit)
7503 # These configurations were first supported in 10.5
7504 cur_target='10.5'
7505 ;;
7506 esac
7507 else
7508 if test `/usr/bin/arch` = "i386"
7509 then
7510 # 10.4 was the first release to support Intel archs
7511 cur_target="10.4"
7512 fi
7513 fi
7514 fi
7515 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007516
Ned Deily87adb6e2013-10-18 21:09:56 -07007517 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7518 # environment with a value that is the same as what we'll use
7519 # in the Makefile to ensure that we'll get the same compiler
7520 # environment during configure and build time.
7521 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7522 export MACOSX_DEPLOYMENT_TARGET
7523 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7525$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007526
Ned Deily87adb6e2013-10-18 21:09:56 -07007527 # end of Darwin* tests
7528 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529 esac
7530 ;;
7531
7532*)
7533 case $ac_sys_system in
7534 OpenUNIX*|UnixWare*)
7535 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7536 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537 SCO_SV*)
7538 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7539 ;;
7540 esac
7541 ;;
7542esac
7543
Zachary Ware5af85642015-12-21 12:09:17 -06007544# ICC needs -fp-model strict or floats behave badly
7545case "$CC" in
7546*icc*)
7547 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7548 ;;
7549esac
7550
T. Woutersddbfa2c2017-05-23 01:30:49 +02007551if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552 :
7553else
7554 OPT="-DNDEBUG $OPT"
7555fi
7556
7557if test "$ac_arch_flags"
7558then
7559 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7560fi
7561
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562# On some compilers, pthreads are available without further options
7563# (e.g. MacOS X). On some of these systems, the compiler will not
7564# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7565# So we have to see first whether pthreads are available without
7566# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7568$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007569if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007570 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571else
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573 ac_cv_pthread_is_default=no
7574else
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576/* end confdefs.h. */
7577
Stefan Krah7dba5942012-11-22 22:49:11 +01007578#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579#include <pthread.h>
7580
7581void* routine(void* p){return NULL;}
7582
7583int main(){
7584 pthread_t p;
7585 if(pthread_create(&p,NULL,routine,NULL)!=0)
7586 return 1;
7587 (void)pthread_detach(p);
7588 return 0;
7589}
7590
7591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007592if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593
7594 ac_cv_pthread_is_default=yes
7595 ac_cv_kthread=no
7596 ac_cv_pthread=no
7597
7598else
Matthias Kloseb9621712010-04-24 17:59:49 +00007599 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7602 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603fi
7604
7605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606fi
7607
Matthias Kloseb9621712010-04-24 17:59:49 +00007608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7609$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610
7611
7612if test $ac_cv_pthread_is_default = yes
7613then
7614 ac_cv_kpthread=no
7615else
7616# -Kpthread, if available, provides the right #defines
7617# and linker options to make pthread_create available
7618# Some compilers won't report that they do not support -Kpthread,
7619# so we need to run a program to see whether it really made the
7620# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7622$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007623if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625else
7626 ac_save_cc="$CC"
7627CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007628if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629 ac_cv_kpthread=no
7630else
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632/* end confdefs.h. */
7633
Stefan Krah7dba5942012-11-22 22:49:11 +01007634#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635#include <pthread.h>
7636
7637void* routine(void* p){return NULL;}
7638
7639int main(){
7640 pthread_t p;
7641 if(pthread_create(&p,NULL,routine,NULL)!=0)
7642 return 1;
7643 (void)pthread_detach(p);
7644 return 0;
7645}
7646
7647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007648if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649 ac_cv_kpthread=yes
7650else
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7654 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655fi
7656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657CC="$ac_save_cc"
7658fi
7659
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7661$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662fi
7663
7664if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7665then
7666# -Kthread, if available, provides the right #defines
7667# and linker options to make pthread_create available
7668# Some compilers won't report that they do not support -Kthread,
7669# so we need to run a program to see whether it really made the
7670# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7672$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007673if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675else
7676 ac_save_cc="$CC"
7677CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007678if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679 ac_cv_kthread=no
7680else
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682/* end confdefs.h. */
7683
Stefan Krah7dba5942012-11-22 22:49:11 +01007684#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685#include <pthread.h>
7686
7687void* routine(void* p){return NULL;}
7688
7689int main(){
7690 pthread_t p;
7691 if(pthread_create(&p,NULL,routine,NULL)!=0)
7692 return 1;
7693 (void)pthread_detach(p);
7694 return 0;
7695}
7696
7697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007698if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699 ac_cv_kthread=yes
7700else
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7704 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705fi
7706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707CC="$ac_save_cc"
7708fi
7709
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7711$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712fi
7713
7714if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7715then
7716# -pthread, if available, provides the right #defines
7717# and linker options to make pthread_create available
7718# Some compilers won't report that they do not support -pthread,
7719# so we need to run a program to see whether it really made the
7720# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7722$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007723if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725else
7726 ac_save_cc="$CC"
7727CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007728if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729 ac_cv_pthread=no
7730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732/* end confdefs.h. */
7733
Stefan Krah7dba5942012-11-22 22:49:11 +01007734#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735#include <pthread.h>
7736
7737void* routine(void* p){return NULL;}
7738
7739int main(){
7740 pthread_t p;
7741 if(pthread_create(&p,NULL,routine,NULL)!=0)
7742 return 1;
7743 (void)pthread_detach(p);
7744 return 0;
7745}
7746
7747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007748if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749 ac_cv_pthread=yes
7750else
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7754 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755fi
7756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757CC="$ac_save_cc"
7758fi
7759
Matthias Kloseb9621712010-04-24 17:59:49 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7761$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762fi
7763
7764# If we have set a CC compiler flag for thread support then
7765# check if it works for CXX, too.
7766ac_cv_cxx_thread=no
7767if test ! -z "$CXX"
7768then
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7770$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771ac_save_cxx="$CXX"
7772
7773if test "$ac_cv_kpthread" = "yes"
7774then
7775 CXX="$CXX -Kpthread"
7776 ac_cv_cxx_thread=yes
7777elif test "$ac_cv_kthread" = "yes"
7778then
7779 CXX="$CXX -Kthread"
7780 ac_cv_cxx_thread=yes
7781elif test "$ac_cv_pthread" = "yes"
7782then
7783 CXX="$CXX -pthread"
7784 ac_cv_cxx_thread=yes
7785fi
7786
7787if test $ac_cv_cxx_thread = yes
7788then
7789 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7790 $CXX -c conftest.$ac_ext 2>&5
7791 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7792 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7793 then
7794 ac_cv_cxx_thread=yes
7795 else
7796 ac_cv_cxx_thread=no
7797 fi
7798 rm -fr conftest*
7799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7801$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802fi
7803CXX="$ac_save_cxx"
7804
7805
7806# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7808$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007809if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811else
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813/* end confdefs.h. */
7814#include <stdlib.h>
7815#include <stdarg.h>
7816#include <string.h>
7817#include <float.h>
7818
7819int
7820main ()
7821{
7822
7823 ;
7824 return 0;
7825}
7826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007827if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007828 ac_cv_header_stdc=yes
7829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007831fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7833
7834if test $ac_cv_header_stdc = yes; then
7835 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
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 <string.h>
7839
7840_ACEOF
7841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 $EGREP "memchr" >/dev/null 2>&1; then :
7843
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844else
7845 ac_cv_header_stdc=no
7846fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007847rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007848
7849fi
7850
7851if test $ac_cv_header_stdc = yes; then
7852 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007854/* end confdefs.h. */
7855#include <stdlib.h>
7856
7857_ACEOF
7858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 $EGREP "free" >/dev/null 2>&1; then :
7860
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861else
7862 ac_cv_header_stdc=no
7863fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007864rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865
7866fi
7867
7868if test $ac_cv_header_stdc = yes; then
7869 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007871 :
7872else
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007874/* end confdefs.h. */
7875#include <ctype.h>
7876#include <stdlib.h>
7877#if ((' ' & 0x0FF) == 0x020)
7878# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7879# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7880#else
7881# define ISLOWER(c) \
7882 (('a' <= (c) && (c) <= 'i') \
7883 || ('j' <= (c) && (c) <= 'r') \
7884 || ('s' <= (c) && (c) <= 'z'))
7885# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7886#endif
7887
7888#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7889int
7890main ()
7891{
7892 int i;
7893 for (i = 0; i < 256; i++)
7894 if (XOR (islower (i), ISLOWER (i))
7895 || toupper (i) != TOUPPER (i))
7896 return 2;
7897 return 0;
7898}
7899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007900if ac_fn_c_try_run "$LINENO"; then :
7901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007902else
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007907fi
7908
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007909fi
7910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7912$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007913if test $ac_cv_header_stdc = yes; then
7914
Matthias Kloseb9621712010-04-24 17:59:49 +00007915$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007916
7917fi
7918
stratakise768c862018-01-23 16:11:24 +01007919for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007920fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007921ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007922sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007923utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007924poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007925sys/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 +01007926sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007927sys/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 +01007928sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007929sys/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 -07007930libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007931linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007932sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007933do :
7934 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7935ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007936if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007938#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007939_ACEOF
7940
7941fi
7942
Guido van Rossum627b2d71993-12-24 10:39:16 +00007943done
7944
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007945ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007946for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7949$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007950if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007952else
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007955#include <sys/types.h>
7956#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958int
7959main ()
7960{
7961if ((DIR *) 0)
7962return 0;
7963 ;
7964 return 0;
7965}
7966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007969else
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007974eval ac_res=\$$as_ac_Header
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7976$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007977if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007980_ACEOF
7981
7982ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007983fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007984
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007985done
7986# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7987if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7989$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007990if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007992else
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997/* Override any GCC internal prototype to avoid an error.
7998 Use char because int might match the return type of a GCC
7999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008000#ifdef __cplusplus
8001extern "C"
8002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008003char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008004int
8005main ()
8006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008008 ;
8009 return 0;
8010}
8011_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012for ac_lib in '' dir; do
8013 if test -z "$ac_lib"; then
8014 ac_res="none required"
8015 else
8016 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008017 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008022rm -f core conftest.err conftest.$ac_objext \
8023 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008024 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027done
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030else
8031 ac_cv_search_opendir=no
8032fi
8033rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008034LIBS=$ac_func_search_save_LIBS
8035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8037$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008039if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008043
Michael W. Hudson54241132001-12-07 15:38:26 +00008044else
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8046$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008047if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008049else
8050 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054/* Override any GCC internal prototype to avoid an error.
8055 Use char because int might match the return type of a GCC
8056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008057#ifdef __cplusplus
8058extern "C"
8059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008060char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008061int
8062main ()
8063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ;
8066 return 0;
8067}
8068_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069for ac_lib in '' x; do
8070 if test -z "$ac_lib"; then
8071 ac_res="none required"
8072 else
8073 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008074 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008079rm -f core conftest.err conftest.$ac_objext \
8080 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008081 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008084done
Victor Stinnere0be4232011-10-25 13:06:09 +02008085if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087else
8088 ac_cv_search_opendir=no
8089fi
8090rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008091LIBS=$ac_func_search_save_LIBS
8092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8094$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008096if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008099fi
8100
8101fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008102
Matthias Kloseb9621712010-04-24 17:59:49 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8104$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008105if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008107else
Matthias Kloseb9621712010-04-24 17:59:49 +00008108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008109/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008110#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008111int
8112main ()
8113{
8114return makedev(0, 0);
8115 ;
8116 return 0;
8117}
8118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008120 ac_cv_header_sys_types_h_makedev=yes
8121else
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124rm -f core conftest.err conftest.$ac_objext \
8125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008126
8127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8129$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008130
8131if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008132ac_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 +02008133if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008136
8137fi
8138
8139
8140
8141 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 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 +02008143if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008146
8147fi
8148
8149
8150 fi
8151fi
8152
Michael W. Hudson54241132001-12-07 15:38:26 +00008153
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008154# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8155# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8156SAVE_CFLAGS=$CFLAGS
8157CFLAGS="-std=c99 $CFLAGS"
8158for ac_header in bluetooth/bluetooth.h
8159do :
8160 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8161if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8162 cat >>confdefs.h <<_ACEOF
8163#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8164_ACEOF
8165
8166fi
8167
8168done
8169
8170CFLAGS=$SAVE_CFLAGS
8171
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008172# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8173for ac_header in net/if.h
8174do :
8175 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8176#ifdef STDC_HEADERS
8177# include <stdlib.h>
8178# include <stddef.h>
8179#else
8180# ifdef HAVE_STDLIB_H
8181# include <stdlib.h>
8182# endif
8183#endif
8184#ifdef HAVE_SYS_SOCKET_H
8185# include <sys/socket.h>
8186#endif
8187
8188"
Victor Stinnere0be4232011-10-25 13:06:09 +02008189if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008190 cat >>confdefs.h <<_ACEOF
8191#define HAVE_NET_IF_H 1
8192_ACEOF
8193
8194fi
8195
8196done
8197
8198
Martin v. Löwis11017b12006-01-14 18:12:57 +00008199# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008200for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008201do :
8202 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 +00008203#ifdef HAVE_ASM_TYPES_H
8204#include <asm/types.h>
8205#endif
8206#ifdef HAVE_SYS_SOCKET_H
8207#include <sys/socket.h>
8208#endif
8209
Matthias Kloseb9621712010-04-24 17:59:49 +00008210"
Victor Stinnere0be4232011-10-25 13:06:09 +02008211if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008212 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008213#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008214_ACEOF
8215
8216fi
8217
8218done
8219
8220
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008221# On Linux, qrtr.h requires asm/types.h
8222for ac_header in linux/qrtr.h
8223do :
8224 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8225#ifdef HAVE_ASM_TYPES_H
8226#include <asm/types.h>
8227#endif
8228#ifdef HAVE_SYS_SOCKET_H
8229#include <sys/socket.h>
8230#endif
8231
8232"
8233if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8234 cat >>confdefs.h <<_ACEOF
8235#define HAVE_LINUX_QRTR_H 1
8236_ACEOF
8237
8238fi
8239
8240done
8241
8242
caaveryeffc12f2017-09-06 18:18:10 -04008243for ac_header in linux/vm_sockets.h
8244do :
8245 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8246#ifdef HAVE_SYS_SOCKET_H
8247#include <sys/socket.h>
8248#endif
8249
8250"
8251if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8252 cat >>confdefs.h <<_ACEOF
8253#define HAVE_LINUX_VM_SOCKETS_H 1
8254_ACEOF
8255
8256fi
8257
8258done
8259
8260
Charles-François Natali47413c12011-10-06 19:47:44 +02008261# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008262for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008263do :
8264 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8265ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8266#ifdef HAVE_SYS_SOCKET_H
8267#include <sys/socket.h>
8268#endif
8269
8270"
8271if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8272 cat >>confdefs.h <<_ACEOF
8273#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8274_ACEOF
8275
8276fi
8277
8278done
8279
8280
Guido van Rossum627b2d71993-12-24 10:39:16 +00008281# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008282was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8284$as_echo_n "checking for clock_t in time.h... " >&6; }
8285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008286/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008287#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
8289_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008292 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008293else
Martin v. Löwis11437992002-04-12 09:54:03 +00008294
8295
Matthias Kloseb9621712010-04-24 17:59:49 +00008296$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008297
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008298
Guido van Rossum627b2d71993-12-24 10:39:16 +00008299fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008300rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8303$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008304
Matthias Kloseb9621712010-04-24 17:59:49 +00008305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8306$as_echo_n "checking for makedev... " >&6; }
8307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008308/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008309
Jesus Cea740f53a2010-04-28 11:35:30 +00008310#if defined(MAJOR_IN_MKDEV)
8311#include <sys/mkdev.h>
8312#elif defined(MAJOR_IN_SYSMACROS)
8313#include <sys/sysmacros.h>
8314#else
8315#include <sys/types.h>
8316#endif
8317
Neal Norwitz11690112002-07-30 01:08:28 +00008318int
8319main ()
8320{
Jesus Cea740f53a2010-04-28 11:35:30 +00008321
8322 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008323 ;
8324 return 0;
8325}
Matthias Kloseb159a552010-04-25 21:00:44 +00008326
Neal Norwitz11690112002-07-30 01:08:28 +00008327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008328if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008329 ac_cv_has_makedev=yes
8330else
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008333rm -f core conftest.err conftest.$ac_objext \
8334 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8336$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008337if test "$ac_cv_has_makedev" = "yes"; then
8338
Matthias Kloseb9621712010-04-24 17:59:49 +00008339$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008340
8341fi
8342
Christian Heimes985ecdc2013-11-20 11:46:18 +01008343# byte swapping
8344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8345$as_echo_n "checking for le64toh... " >&6; }
8346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347/* end confdefs.h. */
8348
8349#ifdef HAVE_ENDIAN_H
8350#include <endian.h>
8351#elif defined(HAVE_SYS_ENDIAN_H)
8352#include <sys/endian.h>
8353#endif
8354
8355int
8356main ()
8357{
8358
8359 le64toh(1)
8360 ;
8361 return 0;
8362}
8363
8364_ACEOF
8365if ac_fn_c_try_link "$LINENO"; then :
8366 ac_cv_has_le64toh=yes
8367else
8368 ac_cv_has_le64toh=no
8369fi
8370rm -f core conftest.err conftest.$ac_objext \
8371 conftest$ac_exeext conftest.$ac_ext
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8373$as_echo "$ac_cv_has_le64toh" >&6; }
8374if test "$ac_cv_has_le64toh" = "yes"; then
8375
8376$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8377
8378fi
8379
Martin v. Löwis399a6892002-10-04 10:22:02 +00008380use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008381# Don't use largefile support for GNU/Hurd
8382case $ac_sys_system in GNU*)
8383 use_lfs=no
8384esac
8385
Martin v. Löwis399a6892002-10-04 10:22:02 +00008386if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008387# Two defines needed to enable largefile support on various platforms
8388# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008389case $ac_sys_system/$ac_sys_release in
8390AIX*)
8391
8392$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8393
8394 ;;
8395esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008398
8399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008401
Martin v. Löwis399a6892002-10-04 10:22:02 +00008402fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008403
Guido van Rossum84e7b241996-08-19 21:59:00 +00008404# Add some code to confdefs.h so that the test for off_t works on SCO
8405cat >> confdefs.h <<\EOF
8406#if defined(SCO_DS)
8407#undef _OFF_T
8408#endif
8409EOF
8410
Guido van Rossumef2255b2000-03-10 22:30:29 +00008411# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008412ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008413if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008414
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008415else
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
8417cat >>confdefs.h <<_ACEOF
8418#define mode_t int
8419_ACEOF
8420
8421fi
8422
Matthias Kloseb9621712010-04-24 17:59:49 +00008423ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008424if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008426else
Martin v. Löwis11437992002-04-12 09:54:03 +00008427
8428cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008430_ACEOF
8431
8432fi
8433
Matthias Kloseb9621712010-04-24 17:59:49 +00008434ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008435if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008437else
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
8439cat >>confdefs.h <<_ACEOF
8440#define pid_t int
8441_ACEOF
8442
8443fi
8444
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008447#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008448_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008451if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008452
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008453else
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
8455cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008457_ACEOF
8458
8459fi
8460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8462$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008467/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008468#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008469
8470_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008473 ac_cv_type_uid_t=yes
8474else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008475 ac_cv_type_uid_t=no
8476fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008477rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008478
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8481$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008482if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008485
8486
Matthias Kloseb9621712010-04-24 17:59:49 +00008487$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008488
8489fi
8490
Mark Dickinson983bc162012-12-02 12:11:38 +00008491
Matthias Kloseb9621712010-04-24 17:59:49 +00008492ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008493if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494
Matthias Kloseb9621712010-04-24 17:59:49 +00008495$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008496
8497fi
8498
Stefan Krah1919b7e2012-03-21 18:25:23 +01008499ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8500if test "x$ac_cv_type___uint128_t" = xyes; then :
8501
8502$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8503
8504fi
8505
Jack Jansendd19cf82001-12-06 22:36:17 +00008506
Michael W. Hudson54241132001-12-07 15:38:26 +00008507# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008508# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509# The cast to long int works around a bug in the HP C Compiler
8510# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8511# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8512# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8514$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008515if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008517else
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 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 +00008519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 if test "$ac_cv_type_int" = yes; then
8522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008524as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008525See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526 else
8527 ac_cv_sizeof_int=0
8528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8533$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534
8535
8536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008538#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008539_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008540
8541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542# The cast to long int works around a bug in the HP C Compiler
8543# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8544# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8545# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8547$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008548if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 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 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553else
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 if test "$ac_cv_type_long" = yes; then
8555 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8556$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008557as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008558See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559 else
8560 ac_cv_sizeof_long=0
8561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8566$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567
8568
8569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008571#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008572_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008573
8574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575# The cast to long int works around a bug in the HP C Compiler
8576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8578# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8580$as_echo_n "checking size of long long... " >&6; }
8581if ${ac_cv_sizeof_long_long+:} false; then :
8582 $as_echo_n "(cached) " >&6
8583else
8584 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8585
8586else
8587 if test "$ac_cv_type_long_long" = yes; then
8588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8590as_fn_error 77 "cannot compute sizeof (long long)
8591See \`config.log' for more details" "$LINENO" 5; }
8592 else
8593 ac_cv_sizeof_long_long=0
8594 fi
8595fi
8596
8597fi
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8599$as_echo "$ac_cv_sizeof_long_long" >&6; }
8600
8601
8602
8603cat >>confdefs.h <<_ACEOF
8604#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8605_ACEOF
8606
8607
8608# The cast to long int works around a bug in the HP C Compiler
8609# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8610# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8611# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8613$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008614if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 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 +00008618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 if test "$ac_cv_type_void_p" = yes; then
8621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008623as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008624See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625 else
8626 ac_cv_sizeof_void_p=0
8627 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8632$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633
8634
8635
Martin v. Löwis11437992002-04-12 09:54:03 +00008636cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008637#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008638_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008639
8640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641# The cast to long int works around a bug in the HP C Compiler
8642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8644# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8646$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008647if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008649else
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 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 +00008651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652else
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 if test "$ac_cv_type_short" = yes; then
8654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008656as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008657See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658 else
8659 ac_cv_sizeof_short=0
8660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008662
Martin v. Löwis11437992002-04-12 09:54:03 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8665$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666
8667
8668
Martin v. Löwis11437992002-04-12 09:54:03 +00008669cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008670#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008671_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008672
8673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674# The cast to long int works around a bug in the HP C Compiler
8675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8677# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8679$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008680if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008682else
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 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 +00008684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 if test "$ac_cv_type_float" = yes; then
8687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008689as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008690See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691 else
8692 ac_cv_sizeof_float=0
8693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695
Martin v. Löwis11437992002-04-12 09:54:03 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8698$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699
8700
8701
Martin v. Löwis11437992002-04-12 09:54:03 +00008702cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008703#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008704_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008705
8706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707# The cast to long int works around a bug in the HP C Compiler
8708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8710# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8712$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008713if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008715else
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 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 +00008717
Martin v. Löwis11437992002-04-12 09:54:03 +00008718else
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 if test "$ac_cv_type_double" = yes; then
8720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008722as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008723See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724 else
8725 ac_cv_sizeof_double=0
8726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728
Martin v. Löwis11437992002-04-12 09:54:03 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8731$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732
8733
8734
Martin v. Löwis11437992002-04-12 09:54:03 +00008735cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008736#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008737_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008738
8739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008740# The cast to long int works around a bug in the HP C Compiler
8741# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8742# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8743# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8745$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008746if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 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 +00008750
Martin v. Löwis11437992002-04-12 09:54:03 +00008751else
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 if test "$ac_cv_type_fpos_t" = yes; then
8753 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008755as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008756See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757 else
8758 ac_cv_sizeof_fpos_t=0
8759 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008761
Martin v. Löwis11437992002-04-12 09:54:03 +00008762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8764$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765
8766
8767
Martin v. Löwis11437992002-04-12 09:54:03 +00008768cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008769#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008770_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008771
Michael W. Hudson54241132001-12-07 15:38:26 +00008772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773# The cast to long int works around a bug in the HP C Compiler
8774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8778$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008779if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008781else
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 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 +00008783
Martin v. Löwis18e16552006-02-15 17:27:45 +00008784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 if test "$ac_cv_type_size_t" = yes; then
8786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008788as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008789See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008790 else
8791 ac_cv_sizeof_size_t=0
8792 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794
Martin v. Löwis18e16552006-02-15 17:27:45 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8797$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798
8799
8800
Martin v. Löwis18e16552006-02-15 17:27:45 +00008801cat >>confdefs.h <<_ACEOF
8802#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8803_ACEOF
8804
8805
Christian Heimes400adb02008-02-01 08:12:03 +00008806# The cast to long int works around a bug in the HP C Compiler
8807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8809# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8811$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008812if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 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 +00008816
Christian Heimes400adb02008-02-01 08:12:03 +00008817else
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 if test "$ac_cv_type_pid_t" = yes; then
8819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008821as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008822See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008823 else
8824 ac_cv_sizeof_pid_t=0
8825 fi
8826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827
Christian Heimes400adb02008-02-01 08:12:03 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8830$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008831
8832
8833
8834cat >>confdefs.h <<_ACEOF
8835#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8836_ACEOF
8837
8838
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008839# The cast to long int works around a bug in the HP C Compiler
8840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8842# This bug is HP SR number 8606223364.
8843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8844$as_echo_n "checking size of uintptr_t... " >&6; }
8845if ${ac_cv_sizeof_uintptr_t+:} false; then :
8846 $as_echo_n "(cached) " >&6
8847else
8848 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8849
8850else
8851 if test "$ac_cv_type_uintptr_t" = yes; then
8852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8854as_fn_error 77 "cannot compute sizeof (uintptr_t)
8855See \`config.log' for more details" "$LINENO" 5; }
8856 else
8857 ac_cv_sizeof_uintptr_t=0
8858 fi
8859fi
8860
8861fi
8862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8863$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8864
8865
8866
8867cat >>confdefs.h <<_ACEOF
8868#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8869_ACEOF
8870
8871
Michael W. Hudson54241132001-12-07 15:38:26 +00008872
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873
Eitan Adler3055c942018-05-15 22:58:09 -07008874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8875$as_echo_n "checking for long double... " >&6; }
8876if ${ac_cv_type_long_double+:} false; then :
8877 $as_echo_n "(cached) " >&6
8878else
8879 if test "$GCC" = yes; then
8880 ac_cv_type_long_double=yes
8881 else
8882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8883/* end confdefs.h. */
8884/* The Stardent Vistra knows sizeof (long double), but does
8885 not support it. */
8886 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008887int
8888main ()
8889{
Eitan Adler3055c942018-05-15 22:58:09 -07008890static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8891 sizeof (double) <= sizeof (long double))];
8892test_array [0] = 0;
8893return test_array [0];
8894
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895 ;
8896 return 0;
8897}
8898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008899if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008900 ac_cv_type_long_double=yes
8901else
8902 ac_cv_type_long_double=no
8903fi
8904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8905 fi
8906fi
8907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8908$as_echo "$ac_cv_type_long_double" >&6; }
8909 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008910
Matthias Kloseb9621712010-04-24 17:59:49 +00008911$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008912
Eitan Adler3055c942018-05-15 22:58:09 -07008913 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008914
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008915# The cast to long int works around a bug in the HP C Compiler
8916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8918# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8920$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008921if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008923else
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 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 +00008925
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008926else
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 if test "$ac_cv_type_long_double" = yes; then
8928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008930as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008931See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008932 else
8933 ac_cv_sizeof_long_double=0
8934 fi
8935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008936
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8939$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008940
8941
8942
8943cat >>confdefs.h <<_ACEOF
8944#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8945_ACEOF
8946
8947
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949# The cast to long int works around a bug in the HP C Compiler
8950# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8951# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8952# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8954$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008955if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008957else
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 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 +00008959
Thomas Woutersb2137042007-02-01 18:02:27 +00008960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 if test "$ac_cv_type__Bool" = yes; then
8962 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008964as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008965See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966 else
8967 ac_cv_sizeof__Bool=0
8968 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970
Thomas Woutersb2137042007-02-01 18:02:27 +00008971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8973$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974
8975
8976
Thomas Woutersb2137042007-02-01 18:02:27 +00008977cat >>confdefs.h <<_ACEOF
8978#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8979_ACEOF
8980
8981
Thomas Woutersb2137042007-02-01 18:02:27 +00008982
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008983# The cast to long int works around a bug in the HP C Compiler
8984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8988$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008989if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991else
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008993#ifdef HAVE_SYS_TYPES_H
8994#include <sys/types.h>
8995#endif
8996
Matthias Kloseb9621712010-04-24 17:59:49 +00008997"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 if test "$ac_cv_type_off_t" = yes; then
9001 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009003as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009004See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005 else
9006 ac_cv_sizeof_off_t=0
9007 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9012$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009014
9015
Martin v. Löwis11437992002-04-12 09:54:03 +00009016cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009017#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009019
Michael W. Hudson54241132001-12-07 15:38:26 +00009020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9023$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009024if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009025 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009026
Matthias Kloseb9621712010-04-24 17:59:49 +00009027$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9030$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9033$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009034fi
9035
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036# The cast to long int works around a bug in the HP C Compiler
9037# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9038# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9039# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9041$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009042if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009044else
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046#ifdef HAVE_SYS_TYPES_H
9047#include <sys/types.h>
9048#endif
9049#ifdef HAVE_TIME_H
9050#include <time.h>
9051#endif
9052
Matthias Kloseb9621712010-04-24 17:59:49 +00009053"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009054
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009055else
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 if test "$ac_cv_type_time_t" = yes; then
9057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009059as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009060See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009061 else
9062 ac_cv_sizeof_time_t=0
9063 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9068$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009070
9071
Martin v. Löwis11437992002-04-12 09:54:03 +00009072cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009073#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009074_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009075
Michael W. Hudson54241132001-12-07 15:38:26 +00009076
9077
Trent Mick635f6fb2000-08-23 21:33:05 +00009078# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009079ac_save_cc="$CC"
9080if test "$ac_cv_kpthread" = "yes"
9081then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009082elif test "$ac_cv_kthread" = "yes"
9083then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009084elif test "$ac_cv_pthread" = "yes"
9085then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009086fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9089$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009090have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009092/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009093
9094 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009095int
9096main ()
9097{
Guido van Rossum12580492000-09-24 16:47:19 +00009098pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 ;
9100 return 0;
9101}
Matthias Kloseb159a552010-04-25 21:00:44 +00009102
Martin v. Löwis11437992002-04-12 09:54:03 +00009103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009104if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009105 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9109$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009110if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009112# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9113# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9114# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9116$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009117if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009119else
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009121#ifdef HAVE_PTHREAD_H
9122#include <pthread.h>
9123#endif
9124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009127else
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 if test "$ac_cv_type_pthread_t" = yes; then
9129 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009131as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009132See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009133 else
9134 ac_cv_sizeof_pthread_t=0
9135 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009137
Trent Mick635f6fb2000-08-23 21:33:05 +00009138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9140$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009141
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009142
9143
Martin v. Löwis11437992002-04-12 09:54:03 +00009144cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009145#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009146_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009148
Trent Mick635f6fb2000-08-23 21:33:05 +00009149fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009150
9151# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9152# This checking will be unnecessary after removing deprecated TLS API.
9153# The cast to long int works around a bug in the HP C Compiler
9154# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9155# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9156# This bug is HP SR number 8606223364.
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9158$as_echo_n "checking size of pthread_key_t... " >&6; }
9159if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9160 $as_echo_n "(cached) " >&6
9161else
9162 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9163"; then :
9164
9165else
9166 if test "$ac_cv_type_pthread_key_t" = yes; then
9167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9169as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9170See \`config.log' for more details" "$LINENO" 5; }
9171 else
9172 ac_cv_sizeof_pthread_key_t=0
9173 fi
9174fi
9175
9176fi
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9178$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9179
9180
9181
9182cat >>confdefs.h <<_ACEOF
9183#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9184_ACEOF
9185
9186
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9188$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9189if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9191/* end confdefs.h. */
9192#include <pthread.h>
9193int
9194main ()
9195{
9196pthread_key_t k; k * 1;
9197 ;
9198 return 0;
9199}
9200_ACEOF
9201if ac_fn_c_try_compile "$LINENO"; then :
9202 ac_pthread_key_t_is_arithmetic_type=yes
9203else
9204 ac_pthread_key_t_is_arithmetic_type=no
9205
9206fi
9207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9209$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9210 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9211
9212$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9213
9214 fi
9215else
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217$as_echo "no" >&6; }
9218fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009219CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009220
Michael W. Hudson54241132001-12-07 15:38:26 +00009221
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009222case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009223 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009224 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9225 ;;
9226 Darwin/*)
9227 OTHER_LIBTOOL_OPT=""
9228 ;;
9229esac
9230
9231
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009232
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009233case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009234 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009235 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9236 if test "${enable_universalsdk}"; then
9237 :
9238 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009239 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009240 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009241 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009242 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009243 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009244 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009245 if test ${gcc_version} '<' 4.0
9246 then
9247 LIBTOOL_CRUFT="-lcc_dynamic"
9248 else
9249 LIBTOOL_CRUFT=""
9250 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009252 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009253else
Matthias Kloseb9621712010-04-24 17:59:49 +00009254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009256
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009257 #include <unistd.h>
9258 int main(int argc, char*argv[])
9259 {
9260 if (sizeof(long) == 4) {
9261 return 0;
9262 } else {
9263 return 1;
9264 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009265 }
9266
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009268if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269 ac_osx_32bit=yes
9270else
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9274 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009275fi
9276
9277
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009278 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009279 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009280 i386)
9281 MACOSX_DEFAULT_ARCH="i386"
9282 ;;
9283 ppc)
9284 MACOSX_DEFAULT_ARCH="ppc"
9285 ;;
9286 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009287 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009288 ;;
9289 esac
9290 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009291 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009292 i386)
9293 MACOSX_DEFAULT_ARCH="x86_64"
9294 ;;
9295 ppc)
9296 MACOSX_DEFAULT_ARCH="ppc64"
9297 ;;
9298 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009299 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009300 ;;
9301 esac
9302
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009303 fi
9304
9305 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009306 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009307 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009308esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9310$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009311if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009312then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009313 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009315 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009316
Matthias Kloseb9621712010-04-24 17:59:49 +00009317$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9320$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009321 if test $enable_shared = "yes"
9322 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009323 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 +00009324 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009325else
Matthias Kloseb9621712010-04-24 17:59:49 +00009326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9327$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009328fi
9329
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9331$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009332case $ac_sys_system/$ac_sys_release in
9333 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009336
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9338$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009339 ;;
9340 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9342$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009343 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009344esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009345
Guido van Rossum0a516c91994-09-12 10:58:40 +00009346# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009347
Michael W. Hudson54241132001-12-07 15:38:26 +00009348
9349
9350
9351
Benjamin Peterson99f03762010-04-11 22:15:28 +00009352
Thomas Wouters477c8d52006-05-27 19:21:47 +00009353
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009354# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9355# -- usually .so, .sl on HP-UX, .dll on Cygwin
9356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9357$as_echo_n "checking the extension of shared libraries... " >&6; }
9358if test -z "$SHLIB_SUFFIX"; then
9359 case $ac_sys_system in
9360 hp*|HP*)
9361 case `uname -m` in
9362 ia64) SHLIB_SUFFIX=.so;;
9363 *) SHLIB_SUFFIX=.sl;;
9364 esac
9365 ;;
9366 CYGWIN*) SHLIB_SUFFIX=.dll;;
9367 *) SHLIB_SUFFIX=.so;;
9368 esac
9369fi
9370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9371$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009372
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009374# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009375# (Shared libraries in this instance are shared modules to be loaded into
9376# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9378$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009379if test -z "$LDSHARED"
9380then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009381 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009382 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009383 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009384 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009385 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009387 if test "$GCC" = "yes" ; then
9388 LDSHARED='$(CC) -shared'
9389 LDCXXSHARED='$(CXX) -shared'
9390 else
9391 LDSHARED='$(CC) -G'
9392 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009393 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009394 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009395 if test "$GCC" = "yes" ; then
9396 LDSHARED='$(CC) -shared'
9397 LDCXXSHARED='$(CXX) -shared'
9398 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009399 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009400 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009401 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009402 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009403 LDSHARED='$(CC) -bundle'
9404 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009405 if test "$enable_framework" ; then
9406 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009407 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9408 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009409 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009410 else
9411 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009412 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009413 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009414 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009415 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009416 LDSHARED='$(CC) -bundle'
9417 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009418 if test "$enable_framework" ; then
9419 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009420 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9421 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009422 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009423 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009424 # No framework, use the Python app as bundle-loader
9425 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009426 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009427 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009428 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009429 Darwin/*)
9430 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9431 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009432
Ned Deily36820b62014-06-25 13:44:22 -07009433 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9434 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9435 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9436 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9437 if test ${dep_target_major} -eq 10 && \
9438 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009439 then
Ned Deily36820b62014-06-25 13:44:22 -07009440 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009441 LDSHARED='$(CC) -bundle'
9442 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009443 if test "$enable_framework" ; then
9444 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009445 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9446 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009447 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009448 else
9449 # No framework, use the Python app as bundle-loader
9450 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9451 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009452 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009453 fi
Ned Deily36820b62014-06-25 13:44:22 -07009454 else
9455 # building for OS X 10.3 and later
9456 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9457 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9458 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009459 fi
9460 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009461 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009462 LDSHARED='$(CC) -shared'
9463 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009464 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009465 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009466 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009467 LDSHARED='$(CC) -shared'
9468 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009469 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009470 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009471 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009472 OpenBSD*)
9473 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9474 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009475 LDSHARED='$(CC) -shared $(CCSHARED)'
9476 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009477 else
9478 case `uname -r` in
9479 [01].* | 2.[0-7] | 2.[0-7].*)
9480 LDSHARED="ld -Bshareable ${LDFLAGS}"
9481 ;;
9482 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009483 LDSHARED='$(CC) -shared $(CCSHARED)'
9484 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009485 ;;
9486 esac
9487 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009488 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009489 LDSHARED='$(CC) -shared'
9490 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009491 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009492 if test "$GCC" = "yes" ; then
9493 LDSHARED='$(CC) -shared'
9494 LDCXXSHARED='$(CXX) -shared'
9495 else
9496 LDSHARED='$(CC) -G'
9497 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009498 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009499 SCO_SV*)
9500 LDSHARED='$(CC) -Wl,-G,-Bexport'
9501 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9502 CYGWIN*)
9503 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9504 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009505 *) LDSHARED="ld";;
9506 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9509$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009510LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009511BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009512# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009513# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9515$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009516if test -z "$CCSHARED"
9517then
Guido van Rossum07397971997-04-29 21:49:50 +00009518 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009519 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009520 then CCSHARED="-fPIC";
9521 elif test `uname -p` = sparc;
9522 then CCSHARED="-xcode=pic32";
9523 else CCSHARED="-Kpic";
9524 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009525 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009526 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009527 else CCSHARED="+z";
9528 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009529 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009530 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009531 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009532 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009533 if test "$GCC" = "yes"
9534 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009535 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009536 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009537 SCO_SV*)
9538 if test "$GCC" = "yes"
9539 then CCSHARED="-fPIC"
9540 else CCSHARED="-Kpic -belf"
9541 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009542 VxWorks*)
9543 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009544 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9547$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009548# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009549# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9551$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009552if test -z "$LINKFORSHARED"
9553then
Guido van Rossum07397971997-04-29 21:49:50 +00009554 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009555 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009556 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009557 LINKFORSHARED="-Wl,-E -Wl,+s";;
9558# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009559 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009560 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009561 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009563 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009564
9565 # Issue #18075: the default maximum stack size (8MBytes) is too
9566 # small for the default recursion limit. Increase the stack size
9567 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009568 # Note: This matches the value of THREAD_STACK_SIZE in
9569 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009570 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9571
Jack Jansene578a632001-08-15 01:27:14 +00009572 if test "$enable_framework"
9573 then
Jack Jansenda49e192005-01-07 13:08:22 +00009574 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009575 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009576 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009577 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009578 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009579 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009580 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009581 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9582 then
9583 LINKFORSHARED="-Wl,--export-dynamic"
9584 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009585 SunOS/5*) case $CC in
9586 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009587 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009588 then
9589 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009590 fi;;
9591 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009592 CYGWIN*)
9593 if test $enable_shared = "no"
9594 then
9595 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9596 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009597 QNX*)
9598 # -Wl,-E causes the symbols to be added to the dynamic
9599 # symbol table so that they can be found when a module
9600 # is loaded. -N 2048K causes the stack size to be set
9601 # to 2048 kilobytes so that the stack doesn't overflow
9602 # when running test_compile.py.
9603 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009604 VxWorks*)
9605 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009606 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9609$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009610
Michael W. Hudson54241132001-12-07 15:38:26 +00009611
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009612
Matthias Kloseb9621712010-04-24 17:59:49 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9614$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009615if test ! "$LIBRARY" = "$LDLIBRARY"
9616then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009617 case $ac_sys_system in
9618 CYGWIN*)
9619 # Cygwin needs CCSHARED when building extension DLLs
9620 # but not when building the interpreter DLL.
9621 CFLAGSFORSHARED='';;
9622 *)
9623 CFLAGSFORSHARED='$(CCSHARED)'
9624 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9627$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009628
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009629# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9630# library (with --enable-shared).
9631# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009632# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9633# if it is not required, since it creates a dependency of the shared library
9634# to LIBS. This, in turn, means that applications linking the shared libpython
9635# don't need to link LIBS explicitly. The default should be only changed
9636# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009637
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9639$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009640case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009641 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009642 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009643esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9645$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009646
9647
Guido van Rossum627b2d71993-12-24 10:39:16 +00009648# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9650$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009651if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009652 $as_echo_n "(cached) " >&6
9653else
9654 ac_check_lib_save_LIBS=$LIBS
9655LIBS="-lsendfile $LIBS"
9656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9657/* end confdefs.h. */
9658
9659/* Override any GCC internal prototype to avoid an error.
9660 Use char because int might match the return type of a GCC
9661 builtin and then its argument prototype would still apply. */
9662#ifdef __cplusplus
9663extern "C"
9664#endif
9665char sendfile ();
9666int
9667main ()
9668{
9669return sendfile ();
9670 ;
9671 return 0;
9672}
9673_ACEOF
9674if ac_fn_c_try_link "$LINENO"; then :
9675 ac_cv_lib_sendfile_sendfile=yes
9676else
9677 ac_cv_lib_sendfile_sendfile=no
9678fi
9679rm -f core conftest.err conftest.$ac_objext \
9680 conftest$ac_exeext conftest.$ac_ext
9681LIBS=$ac_check_lib_save_LIBS
9682fi
9683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9684$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009686 cat >>confdefs.h <<_ACEOF
9687#define HAVE_LIBSENDFILE 1
9688_ACEOF
9689
9690 LIBS="-lsendfile $LIBS"
9691
9692fi
9693
Matthias Kloseb9621712010-04-24 17:59:49 +00009694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9695$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009696if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698else
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009700LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704/* Override any GCC internal prototype to avoid an error.
9705 Use char because int might match the return type of a GCC
9706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707#ifdef __cplusplus
9708extern "C"
9709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009710char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ;
9716 return 0;
9717}
9718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009721else
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009724rm -f core conftest.err conftest.$ac_objext \
9725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9729$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009730if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 cat >>confdefs.h <<_ACEOF
9732#define HAVE_LIBDL 1
9733_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009734
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009735 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009736
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009737fi
9738 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9740$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009741if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009743else
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009745LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009749/* Override any GCC internal prototype to avoid an error.
9750 Use char because int might match the return type of a GCC
9751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752#ifdef __cplusplus
9753extern "C"
9754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009755char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009756int
9757main ()
9758{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009764if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009766else
Matthias Kloseb9621712010-04-24 17:59:49 +00009767 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009769rm -f core conftest.err conftest.$ac_objext \
9770 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009771LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9774$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009775if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 cat >>confdefs.h <<_ACEOF
9777#define HAVE_LIBDLD 1
9778_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009779
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009780 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009781
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009782fi
9783 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009784
Michael Felt0d3ccb42017-12-30 22:39:20 +01009785# checks for uuid.h location
9786for ac_header in uuid/uuid.h uuid.h
9787do :
9788 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9789ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9790if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9791 cat >>confdefs.h <<_ACEOF
9792#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9793_ACEOF
9794
9795fi
9796
9797done
9798
9799
Berker Peksag9a10ff42017-11-08 23:09:16 +03009800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9801$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9803/* end confdefs.h. */
9804#include <uuid/uuid.h>
9805int
9806main ()
9807{
9808
9809#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009810void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009811#endif
9812
9813 ;
9814 return 0;
9815}
9816_ACEOF
9817if ac_fn_c_try_compile "$LINENO"; then :
9818
9819$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9820
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9822$as_echo "yes" >&6; }
9823else
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9825$as_echo "no" >&6; }
9826
9827fi
9828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9829
Michael Felt0d3ccb42017-12-30 22:39:20 +01009830# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009831# FreeBSD and OpenBSD provides support as well
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9833$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9835/* end confdefs.h. */
9836#include <uuid.h>
9837int
9838main ()
9839{
9840
9841#ifndef uuid_create
9842void *x = uuid_create
9843#endif
9844
9845 ;
9846 return 0;
9847}
9848_ACEOF
9849if ac_fn_c_try_compile "$LINENO"; then :
9850
9851$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9852
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9854$as_echo "yes" >&6; }
9855else
9856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9857$as_echo "no" >&6; }
9858
9859fi
9860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9861
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009862# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9863# stream in big-endian byte-order
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9865$as_echo_n "checking for uuid_enc_be... " >&6; }
9866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9867/* end confdefs.h. */
9868#include <uuid.h>
9869int
9870main ()
9871{
9872
9873#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009874void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009875#endif
9876
9877 ;
9878 return 0;
9879}
9880_ACEOF
9881if ac_fn_c_try_compile "$LINENO"; then :
9882
9883$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9884
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9886$as_echo "yes" >&6; }
9887else
9888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9889$as_echo "no" >&6; }
9890
9891fi
9892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9893
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009894# 'Real Time' functions on Solaris
9895# posix4 on Solaris 2.6
9896# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009898$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009899if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009900 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009901else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009902 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906/* Override any GCC internal prototype to avoid an error.
9907 Use char because int might match the return type of a GCC
9908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009909#ifdef __cplusplus
9910extern "C"
9911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009912char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009913int
9914main ()
9915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009917 ;
9918 return 0;
9919}
9920_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009921for ac_lib in '' pthread rt posix4; do
9922 if test -z "$ac_lib"; then
9923 ac_res="none required"
9924 else
9925 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009926 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009929 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009931rm -f core conftest.err conftest.$ac_objext \
9932 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009933 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936done
Victor Stinnere0be4232011-10-25 13:06:09 +02009937if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939else
9940 ac_cv_search_sem_init=no
9941fi
9942rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009943LIBS=$ac_func_search_save_LIBS
9944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9946$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009947ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009948if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009950
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009951fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009952
Martin v. Löwis519adae2003-09-20 10:47:47 +00009953
Martin v. Löwis19d17342003-06-14 21:03:05 +00009954# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9956$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009957if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009959else
9960 ac_check_lib_save_LIBS=$LIBS
9961LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009963/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965/* Override any GCC internal prototype to avoid an error.
9966 Use char because int might match the return type of a GCC
9967 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009968#ifdef __cplusplus
9969extern "C"
9970#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009971char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009972int
9973main ()
9974{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009976 ;
9977 return 0;
9978}
9979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009980if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009981 ac_cv_lib_intl_textdomain=yes
9982else
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009985rm -f core conftest.err conftest.$ac_objext \
9986 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009987LIBS=$ac_check_lib_save_LIBS
9988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9990$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009991if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009992
Matthias Kloseb9621712010-04-24 17:59:49 +00009993$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009994
Brett Cannonc6d936e2009-06-07 20:09:53 +00009995 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009996fi
9997
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009998
9999# checks for system dependent C++ extensions support
10000case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10002$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010004/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010005
Georg Brandl59e87bd2011-02-15 19:48:59 +000010006 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010007int
10008main ()
10009{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010010loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 ;
10012 return 0;
10013}
Matthias Kloseb159a552010-04-25 21:00:44 +000010014
Martin v. Löwis11437992002-04-12 09:54:03 +000010015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010016if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010017
Matthias Kloseb159a552010-04-25 21:00:44 +000010018
Matthias Kloseb9621712010-04-24 17:59:49 +000010019$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010020
Matthias Kloseb159a552010-04-25 21:00:44 +000010021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010022$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010023
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010024else
Matthias Kloseb159a552010-04-25 21:00:44 +000010025
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010027$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010028
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010030rm -f core conftest.err conftest.$ac_objext \
10031 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010032 *) ;;
10033esac
10034
Christian Heimes985ecdc2013-11-20 11:46:18 +010010035# check for systems that require aligned memory access
10036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10037$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010038if ${ac_cv_aligned_required+:} false; then :
10039 $as_echo_n "(cached) " >&6
10040else
10041 if test "$cross_compiling" = yes; then :
10042 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010043else
10044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10045/* end confdefs.h. */
10046
10047int main()
10048{
10049 char s[16];
10050 int i, *p1, *p2;
10051 for (i=0; i < 16; i++)
10052 s[i] = i;
10053 p1 = (int*)(s+1);
10054 p2 = (int*)(s+2);
10055 if (*p1 == *p2)
10056 return 1;
10057 return 0;
10058}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010059_ACEOF
10060if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010061 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010062else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010063 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010064fi
10065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10066 conftest.$ac_objext conftest.beam conftest.$ac_ext
10067fi
10068
10069
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010070fi
10071
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10073$as_echo "$ac_cv_aligned_required" >&6; }
10074if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010075
10076$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10077
10078fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010079
10080# str, bytes and memoryview hash algorithm
10081
10082
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10084$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10085
10086# Check whether --with-hash_algorithm was given.
10087if test "${with_hash_algorithm+set}" = set; then :
10088 withval=$with_hash_algorithm;
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10090$as_echo "$withval" >&6; }
10091case "$withval" in
10092 siphash24)
10093 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10094
10095 ;;
10096 fnv)
10097 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10098
10099 ;;
10100 *)
10101 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10102 ;;
10103esac
10104
10105else
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10107$as_echo "default" >&6; }
10108fi
10109
10110
Charles-François Natalid30b0222014-05-08 23:08:51 +010010111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10112$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10113
10114# Check whether --with-address_sanitizer was given.
10115if test "${with_address_sanitizer+set}" = set; then :
10116 withval=$with_address_sanitizer;
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10118$as_echo "$withval" >&6; }
10119BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10120LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010121# ASan works by controlling memory allocation, our own malloc interferes.
10122with_pymalloc="no"
10123
10124else
10125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10126$as_echo "no" >&6; }
10127fi
10128
10129
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10131$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10132
10133# Check whether --with-memory_sanitizer was given.
10134if test "${with_memory_sanitizer+set}" = set; then :
10135 withval=$with_memory_sanitizer;
10136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10137$as_echo "$withval" >&6; }
10138BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10139LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10140# MSan works by controlling memory allocation, our own malloc interferes.
10141with_pymalloc="no"
10142
10143else
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10145$as_echo "no" >&6; }
10146fi
10147
10148
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10150$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10151
10152# Check whether --with-undefined_behavior_sanitizer was given.
10153if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10154 withval=$with_undefined_behavior_sanitizer;
10155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10156$as_echo "$withval" >&6; }
10157BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10158LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010159
10160else
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10162$as_echo "no" >&6; }
10163fi
10164
10165
Guido van Rossum70c7f481998-03-26 18:44:10 +000010166# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10168$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010169if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010170 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010171else
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010173LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177/* Override any GCC internal prototype to avoid an error.
10178 Use char because int might match the return type of a GCC
10179 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010180#ifdef __cplusplus
10181extern "C"
10182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010183char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010184int
10185main ()
10186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 ;
10189 return 0;
10190}
10191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010192if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010193 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010194else
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010197rm -f core conftest.err conftest.$ac_objext \
10198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010199LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10202$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010203if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010204 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010205fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010206 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10208$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010209if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010211else
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010213LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217/* Override any GCC internal prototype to avoid an error.
10218 Use char because int might match the return type of a GCC
10219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220#ifdef __cplusplus
10221extern "C"
10222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010223char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010224int
10225main ()
10226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 ;
10229 return 0;
10230}
10231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010234else
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237rm -f core conftest.err conftest.$ac_objext \
10238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010239LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10242$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010243if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010244 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010245fi
10246 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010247
Matthias Kloseb9621712010-04-24 17:59:49 +000010248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10249$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010252if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10255$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010256LIBS="$withval $LIBS"
10257
10258else
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10260$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261fi
10262
Guido van Rossum7f43da71994-08-01 12:15:30 +000010263
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010264
10265
10266
10267
10268
10269
Victor Stinner23a683a2019-04-12 21:27:37 +020010270
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010271if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10272 if test -n "$ac_tool_prefix"; then
10273 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10274set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10276$as_echo_n "checking for $ac_word... " >&6; }
10277if ${ac_cv_path_PKG_CONFIG+:} false; then :
10278 $as_echo_n "(cached) " >&6
10279else
10280 case $PKG_CONFIG in
10281 [\\/]* | ?:[\\/]*)
10282 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10283 ;;
10284 *)
10285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10286for as_dir in $PATH
10287do
10288 IFS=$as_save_IFS
10289 test -z "$as_dir" && as_dir=.
10290 for ac_exec_ext in '' $ac_executable_extensions; do
10291 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10292 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10293 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10294 break 2
10295 fi
10296done
10297 done
10298IFS=$as_save_IFS
10299
10300 ;;
10301esac
10302fi
10303PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10304if test -n "$PKG_CONFIG"; then
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10306$as_echo "$PKG_CONFIG" >&6; }
10307else
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10309$as_echo "no" >&6; }
10310fi
10311
10312
10313fi
10314if test -z "$ac_cv_path_PKG_CONFIG"; then
10315 ac_pt_PKG_CONFIG=$PKG_CONFIG
10316 # Extract the first word of "pkg-config", so it can be a program name with args.
10317set dummy pkg-config; ac_word=$2
10318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10319$as_echo_n "checking for $ac_word... " >&6; }
10320if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10321 $as_echo_n "(cached) " >&6
10322else
10323 case $ac_pt_PKG_CONFIG in
10324 [\\/]* | ?:[\\/]*)
10325 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10326 ;;
10327 *)
10328 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10329for as_dir in $PATH
10330do
10331 IFS=$as_save_IFS
10332 test -z "$as_dir" && as_dir=.
10333 for ac_exec_ext in '' $ac_executable_extensions; do
10334 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10335 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10336 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10337 break 2
10338 fi
10339done
10340 done
10341IFS=$as_save_IFS
10342
10343 ;;
10344esac
10345fi
10346ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10347if test -n "$ac_pt_PKG_CONFIG"; then
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10349$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10350else
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10352$as_echo "no" >&6; }
10353fi
10354
10355 if test "x$ac_pt_PKG_CONFIG" = x; then
10356 PKG_CONFIG=""
10357 else
10358 case $cross_compiling:$ac_tool_warned in
10359yes:)
10360{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10361$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10362ac_tool_warned=yes ;;
10363esac
10364 PKG_CONFIG=$ac_pt_PKG_CONFIG
10365 fi
10366else
10367 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10368fi
10369
10370fi
10371if test -n "$PKG_CONFIG"; then
10372 _pkg_min_version=0.9.0
10373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10374$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10375 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10377$as_echo "yes" >&6; }
10378 else
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380$as_echo "no" >&6; }
10381 PKG_CONFIG=""
10382 fi
10383fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010384
10385# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10387$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010388
10389# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010390if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010391 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010392else
10393 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010394fi
10395
10396
Matthias Kloseb9621712010-04-24 17:59:49 +000010397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10398$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010399
10400# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10402$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010403
10404# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010405if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010406 withval=$with_system_ffi;
10407fi
10408
10409
Zachary Waref40d4dd2016-09-17 01:25:24 -050010410if test "$ac_sys_system" = "Darwin"
10411then
10412 case "$with_system_ffi" in
10413 "")
10414 with_system_ffi="no"
10415 ;;
10416 yes|no)
10417 ;;
10418 *)
10419 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10420 ;;
10421 esac
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10423$as_echo "$with_system_ffi" >&6; }
10424else
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10426$as_echo "yes" >&6; }
10427 if test "$with_system_ffi" != ""
10428 then
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10430$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10431 fi
10432 with_system_ffi="yes"
10433fi
Zachary Ware935043d2016-09-09 17:01:21 -070010434
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010435if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010436 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10437else
10438 LIBFFI_INCLUDEDIR=""
10439fi
10440
10441
Stefan Krah60187b52012-03-23 19:06:27 +010010442# Check for use of the system libmpdec library
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10444$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10445
10446# Check whether --with-system_libmpdec was given.
10447if test "${with_system_libmpdec+set}" = set; then :
10448 withval=$with_system_libmpdec;
10449else
10450 with_system_libmpdec="no"
10451fi
10452
10453
10454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10455$as_echo "$with_system_libmpdec" >&6; }
10456
Benjamin Peterson076ed002010-10-31 17:11:02 +000010457# Check for support for loadable sqlite extensions
10458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10459$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10460# Check whether --enable-loadable-sqlite-extensions was given.
10461if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10462 enableval=$enable_loadable_sqlite_extensions;
10463else
10464 enable_loadable_sqlite_extensions="no"
10465fi
10466
10467
10468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10469$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10470
Ned Deilyd819b932013-09-06 01:07:05 -070010471# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10472
10473
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10475$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10476
10477# Check whether --with-tcltk-includes was given.
10478if test "${with_tcltk_includes+set}" = set; then :
10479 withval=$with_tcltk_includes;
10480else
10481 with_tcltk_includes="default"
10482fi
10483
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10485$as_echo "$with_tcltk_includes" >&6; }
10486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10487$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10488
10489# Check whether --with-tcltk-libs was given.
10490if test "${with_tcltk_libs+set}" = set; then :
10491 withval=$with_tcltk_libs;
10492else
10493 with_tcltk_libs="default"
10494fi
10495
10496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10497$as_echo "$with_tcltk_libs" >&6; }
10498if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10499then
10500 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10501 then
10502 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10503 fi
10504 TCLTK_INCLUDES=""
10505 TCLTK_LIBS=""
10506else
10507 TCLTK_INCLUDES="$with_tcltk_includes"
10508 TCLTK_LIBS="$with_tcltk_libs"
10509fi
10510
Matthias Klose55708cc2009-04-30 08:06:49 +000010511# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10513$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010514
10515# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010516if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010517 withval=$with_dbmliborder;
10518if test x$with_dbmliborder = xyes
10519then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010520as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010521else
10522 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10523 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10524 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010525 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010526 fi
10527 done
10528fi
10529fi
10530
Matthias Kloseb9621712010-04-24 17:59:49 +000010531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10532$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010533
Martin v. Löwis11437992002-04-12 09:54:03 +000010534# Templates for things AC_DEFINEd more than once.
10535# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010536
10537
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010538if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010539then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010540 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010542
10543 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010544 if test "$ac_sys_system" = "SunOS"; then
10545 CFLAGS="$CFLAGS -D_REENTRANT"
10546 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010547elif test "$ac_cv_kpthread" = "yes"
10548then
10549 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010550 if test "$ac_cv_cxx_thread" = "yes"; then
10551 CXX="$CXX -Kpthread"
10552 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010553 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010554elif test "$ac_cv_kthread" = "yes"
10555then
10556 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010557 if test "$ac_cv_cxx_thread" = "yes"; then
10558 CXX="$CXX -Kthread"
10559 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010560 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010561elif test "$ac_cv_pthread" = "yes"
10562then
10563 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010564 if test "$ac_cv_cxx_thread" = "yes"; then
10565 CXX="$CXX -pthread"
10566 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010567 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010568else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010569 if test ! -z "$withval" -a -d "$withval"
10570 then LDFLAGS="$LDFLAGS -L$withval"
10571 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010572
10573 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010574 # define _POSIX_THREADS in unistd.h. Some apparently don't
10575 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10577$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010579/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010580
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010581#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010582#ifdef _POSIX_THREADS
10583yes
10584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010585
10586_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010587if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010589 unistd_defines_pthreads=yes
10590else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010591 unistd_defines_pthreads=no
10592fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010593rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10596$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010599
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010600 # Just looking for pthread_create in libpthread is not enough:
10601 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10602 # So we really have to include pthread.h, and then link.
10603 _libs=$LIBS
10604 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10606$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010608/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010609
10610#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010611#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010612
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010613void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010614int
10615main ()
10616{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010617
10618pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 ;
10620 return 0;
10621}
10622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010624
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10626$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010627 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010628
Guido van Rossum02a1c402000-02-25 19:26:31 +000010629else
Martin v. Löwis11437992002-04-12 09:54:03 +000010630
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010631 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010633if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010634
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010635 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010636
Guido van Rossumad678af1998-10-02 14:42:15 +000010637else
Guido van Rossumad678af1998-10-02 14:42:15 +000010638
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10640$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010641if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010643else
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010645LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649/* Override any GCC internal prototype to avoid an error.
10650 Use char because int might match the return type of a GCC
10651 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010652#ifdef __cplusplus
10653extern "C"
10654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010655char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010656int
10657main ()
10658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010660 ;
10661 return 0;
10662}
10663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010666else
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010669rm -f core conftest.err conftest.$ac_objext \
10670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010671LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10674$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010675if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010676
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010677 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010678 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010679
Greg Steinadf63d62000-07-05 10:38:09 +000010680else
Greg Steinadf63d62000-07-05 10:38:09 +000010681
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10683$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010684if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010686else
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010688LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692/* Override any GCC internal prototype to avoid an error.
10693 Use char because int might match the return type of a GCC
10694 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010695#ifdef __cplusplus
10696extern "C"
10697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010698char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010699int
10700main ()
10701{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 ;
10704 return 0;
10705}
10706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010707if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010708 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010709else
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010712rm -f core conftest.err conftest.$ac_objext \
10713 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010714LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10717$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010718if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010719
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010720 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010721 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010722
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010723else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10726$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010727if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010729else
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010731LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735/* Override any GCC internal prototype to avoid an error.
10736 Use char because int might match the return type of a GCC
10737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010738#ifdef __cplusplus
10739extern "C"
10740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010741char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010742int
10743main ()
10744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010746 ;
10747 return 0;
10748}
10749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010752else
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755rm -f core conftest.err conftest.$ac_objext \
10756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010757LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10760$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010761if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010762
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010763 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010764 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010765
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010766else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010767
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10769$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010770if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010772else
Martin v. Löwis11437992002-04-12 09:54:03 +000010773 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010774LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778/* Override any GCC internal prototype to avoid an error.
10779 Use char because int might match the return type of a GCC
10780 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010781#ifdef __cplusplus
10782extern "C"
10783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010784char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010785int
10786main ()
10787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 ;
10790 return 0;
10791}
10792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010793if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010795else
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010798rm -f core conftest.err conftest.$ac_objext \
10799 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010800LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10803$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010804if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010805
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010806 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010807 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010808
Guido van Rossumb93a8621998-05-07 13:27:32 +000010809else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010810
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010811 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10812
Guido van Rossum2d38f911996-06-26 19:47:01 +000010813fi
10814
Guido van Rossum627b2d71993-12-24 10:39:16 +000010815
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010816fi
10817
Guido van Rossum0be3e491997-05-22 20:33:33 +000010818fi
10819
Guido van Rossum49545951997-12-02 19:28:29 +000010820fi
10821
Guido van Rossumb93a8621998-05-07 13:27:32 +000010822fi
10823
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010825rm -f core conftest.err conftest.$ac_objext \
10826 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10829$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010830if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010832else
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010834LIBS="-lmpc $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 usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010845int
10846main ()
10847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010848return usconfig ();
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_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010855else
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +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 Rossum76be6ed1995-01-02 18:33:54 +000010861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10863$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010864if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010865
Martin v. Löwis130fb172001-07-19 11:00:41 +000010866 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010867
Guido van Rossum627b2d71993-12-24 10:39:16 +000010868fi
10869
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010870
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010871fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010872
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010873if test "$posix_threads" = "yes"; then
10874 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010875
Matthias Kloseb9621712010-04-24 17:59:49 +000010876$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010877
10878 fi
10879
10880 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10881 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010882 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010883$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010884
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010885 ;;
10886 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010887$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010888
10889 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010890 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010891$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010892
10893 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010894 esac
10895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10897$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010898 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010900else
Matthias Kloseb9621712010-04-24 17:59:49 +000010901 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010902 ac_cv_pthread_system_supported=no
10903else
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010906
10907 #include <stdio.h>
10908 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010909 void *foo(void *parm) {
10910 return NULL;
10911 }
10912 main() {
10913 pthread_attr_t attr;
10914 pthread_t id;
10915 if (pthread_attr_init(&attr)) exit(-1);
10916 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10917 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10918 exit(0);
10919 }
10920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010922 ac_cv_pthread_system_supported=yes
10923else
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010928fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930
Guido van Rossum627b2d71993-12-24 10:39:16 +000010931fi
10932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10934$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010935 if test "$ac_cv_pthread_system_supported" = "yes"; then
10936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010938
10939 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 for ac_func in pthread_sigmask
10941do :
10942 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010943if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010944 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010945#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010946_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010947 case $ac_sys_system in
10948 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010951
10952 ;;
10953 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010954fi
10955done
10956
pdoxe14679c2017-10-05 00:01:56 -070010957 for ac_func in pthread_getcpuclockid
10958do :
10959 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10960if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10961 cat >>confdefs.h <<_ACEOF
10962#define HAVE_PTHREAD_GETCPUCLOCKID 1
10963_ACEOF
10964
10965fi
10966done
10967
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010968fi
10969
10970
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10974$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010976if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010978 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010981 ipv6=no
10982 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10984$as_echo "yes" >&6; }
10985 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010986
10987 ipv6=yes
10988 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010990else
Martin v. Löwis11437992002-04-12 09:54:03 +000010991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010993/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010994 /* AF_INET6 available check */
10995#include <sys/types.h>
10996#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010997int
10998main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011000int domain = AF_INET6;
11001 ;
11002 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003}
Martin v. Löwis11437992002-04-12 09:54:03 +000011004_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011005if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11008$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011009 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011011else
Matthias Kloseb159a552010-04-25 21:00:44 +000011012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11014$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011015 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011017fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011019
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011020if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11022$as_echo_n "checking if RFC2553 API is available... " >&6; }
11023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011024/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011025
11026 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011027#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011028int
11029main ()
11030{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011031struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011032 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 ;
11034 return 0;
11035}
Matthias Kloseb159a552010-04-25 21:00:44 +000011036
Martin v. Löwis11437992002-04-12 09:54:03 +000011037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011038if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011039
11040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011041$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011042 ipv6=yes
11043
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011044else
Matthias Kloseb159a552010-04-25 21:00:44 +000011045
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011047$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011048 ipv6=no
11049
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011052fi
11053
11054if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011056
11057fi
11058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011059fi
11060
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061
11062ipv6type=unknown
11063ipv6lib=none
11064ipv6trylibc=no
11065
11066if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11068$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011069 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11070 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071 case $i in
11072 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011074/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011075
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011076#include <netinet/in.h>
11077#ifdef IPV6_INRIA_VERSION
11078yes
11079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011080_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011083 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011084fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011085rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086
11087 ;;
11088 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011090/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092#include <netinet/in.h>
11093#ifdef __KAME__
11094yes
11095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011096_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099 ipv6type=$i;
11100 ipv6lib=inet6
11101 ipv6libdir=/usr/local/v6/lib
11102 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011104rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105
11106 ;;
11107 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011109/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011110
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011111#include <features.h>
11112#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11113yes
11114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011115_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118 ipv6type=$i;
11119 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011121rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011122
11123 ;;
11124 linux-inet6)
11125 if test -d /usr/inet6; then
11126 ipv6type=$i
11127 ipv6lib=inet6
11128 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011129 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011130 fi
11131 ;;
11132 solaris)
11133 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011134 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011135 ipv6type=$i
11136 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011137 fi
11138 fi
11139 ;;
11140 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011142/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011143
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144#include <sys/param.h>
11145#ifdef _TOSHIBA_INET6
11146yes
11147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011148_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011151 ipv6type=$i;
11152 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011153 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011154fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011155rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011156
11157 ;;
11158 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011160/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011161
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011162#include </usr/local/v6/include/sys/v6config.h>
11163#ifdef __V6D__
11164yes
11165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011166_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011169 ipv6type=$i;
11170 ipv6lib=v6;
11171 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011172 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011173fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011174rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011175
11176 ;;
11177 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011179/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011180
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011181#include <sys/param.h>
11182#ifdef _ZETA_MINAMI_INET6
11183yes
11184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011185_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011188 ipv6type=$i;
11189 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011190 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011191fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011192rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011193
11194 ;;
11195 esac
11196 if test "$ipv6type" != "unknown"; then
11197 break
11198 fi
11199 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11201$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011202fi
11203
11204if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11205 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11206 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11207 echo "using lib$ipv6lib"
11208 else
11209 if test $ipv6trylibc = "yes"; then
11210 echo "using libc"
11211 else
11212 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11213 echo "You need to fetch lib$ipv6lib.a from appropriate"
11214 echo 'ipv6 kit and compile beforehand.'
11215 exit 1
11216 fi
11217 fi
11218fi
11219
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11221$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11223/* end confdefs.h. */
11224 /* CAN_RAW_FD_FRAMES available check */
11225#include <linux/can/raw.h>
11226int
11227main ()
11228{
11229int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11230 ;
11231 return 0;
11232}
11233_ACEOF
11234if ac_fn_c_try_compile "$LINENO"; then :
11235
11236
11237$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11238
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11240$as_echo "yes" >&6; }
11241
11242else
11243
11244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11245$as_echo "no" >&6; }
11246
11247fi
11248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11249
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011250# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11252$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011255if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011256 withval=$with_doc_strings;
11257fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011258
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011259
11260if test -z "$with_doc_strings"
11261then with_doc_strings="yes"
11262fi
11263if test "$with_doc_strings" != "no"
11264then
11265
Matthias Kloseb9621712010-04-24 17:59:49 +000011266$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011267
11268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11270$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011271
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011272# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11274$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011277if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011278 withval=$with_pymalloc;
11279fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011280
Neil Schemenauera35c6882001-02-27 04:45:05 +000011281
Neil Schemenauer16c22972002-03-22 15:34:49 +000011282if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011283then
11284 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011285fi
11286if test "$with_pymalloc" != "no"
11287then
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011290
11291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11293$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011294
Nick Coghlan6ea41862017-06-11 13:16:15 +100011295# Check for --with-c-locale-coercion
11296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11297$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11298
11299# Check whether --with-c-locale-coercion was given.
11300if test "${with_c_locale_coercion+set}" = set; then :
11301 withval=$with_c_locale_coercion;
11302fi
11303
11304
11305if test -z "$with_c_locale_coercion"
11306then
11307 with_c_locale_coercion="yes"
11308fi
11309if test "$with_c_locale_coercion" != "no"
11310then
11311
11312$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11313
11314fi
11315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11316$as_echo "$with_c_locale_coercion" >&6; }
11317
Benjamin Peterson05159c42009-12-03 03:01:27 +000011318# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11320$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011321
11322# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011323if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011324 withval=$with_valgrind;
11325else
11326 with_valgrind=no
11327fi
11328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11330$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011331if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011332 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 +020011333if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011336
11337else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011338 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011339
11340fi
11341
11342
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011343 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011344fi
11345
Łukasz Langaa785c872016-09-09 17:37:37 -070011346# Check for DTrace support
11347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11348$as_echo_n "checking for --with-dtrace... " >&6; }
11349
11350# Check whether --with-dtrace was given.
11351if test "${with_dtrace+set}" = set; then :
11352 withval=$with_dtrace;
11353else
11354 with_dtrace=no
11355fi
11356
11357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11358$as_echo "$with_dtrace" >&6; }
11359
11360
11361
11362
11363
11364DTRACE=
11365DFLAGS=
11366DTRACE_HEADERS=
11367DTRACE_OBJS=
11368
11369if test "$with_dtrace" = "yes"
11370then
11371 # Extract the first word of "dtrace", so it can be a program name with args.
11372set dummy dtrace; ac_word=$2
11373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11374$as_echo_n "checking for $ac_word... " >&6; }
11375if ${ac_cv_path_DTRACE+:} false; then :
11376 $as_echo_n "(cached) " >&6
11377else
11378 case $DTRACE in
11379 [\\/]* | ?:[\\/]*)
11380 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11381 ;;
11382 *)
11383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11384for as_dir in $PATH
11385do
11386 IFS=$as_save_IFS
11387 test -z "$as_dir" && as_dir=.
11388 for ac_exec_ext in '' $ac_executable_extensions; do
11389 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11390 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11392 break 2
11393 fi
11394done
11395 done
11396IFS=$as_save_IFS
11397
11398 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11399 ;;
11400esac
11401fi
11402DTRACE=$ac_cv_path_DTRACE
11403if test -n "$DTRACE"; then
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11405$as_echo "$DTRACE" >&6; }
11406else
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409fi
11410
11411
11412 if test "$DTRACE" = "not found"; then
11413 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11414 fi
11415
11416$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11417
11418 DTRACE_HEADERS="Include/pydtrace_probes.h"
11419
11420 # On OS X, DTrace providers do not need to be explicitly compiled and
11421 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11422 # generation flag '-G'. We check for presence of this flag, rather than
11423 # hardcoding support by OS, in the interest of robustness.
11424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11425$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11426if ${ac_cv_dtrace_link+:} false; then :
11427 $as_echo_n "(cached) " >&6
11428else
11429 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011430 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011431 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11432 ac_cv_dtrace_link=yes
11433
11434fi
11435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11436$as_echo "$ac_cv_dtrace_link" >&6; }
11437 if test "$ac_cv_dtrace_link" = "yes"; then
11438 DTRACE_OBJS="Python/pydtrace.o"
11439 fi
11440fi
11441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011442# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011443
Guido van Rossum98935bf2001-09-05 19:13:16 +000011444DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011445
Guido van Rossume97ee181999-12-20 21:27:22 +000011446# the dlopen() function means we might want to use dynload_shlib.o. some
11447# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011448for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011449do :
11450 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011451if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011454_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011455
Guido van Rossume97ee181999-12-20 21:27:22 +000011456fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011457done
Guido van Rossume97ee181999-12-20 21:27:22 +000011458
Michael W. Hudson54241132001-12-07 15:38:26 +000011459
Guido van Rossume97ee181999-12-20 21:27:22 +000011460# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11461# loading of modules.
11462
Matthias Kloseb9621712010-04-24 17:59:49 +000011463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11464$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011465if test -z "$DYNLOADFILE"
11466then
11467 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011468 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11469 if test "$ac_cv_func_dlopen" = yes
11470 then DYNLOADFILE="dynload_shlib.o"
11471 else DYNLOADFILE="dynload_aix.o"
11472 fi
11473 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011474 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011475 *)
11476 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11477 # out any dynamic loading
11478 if test "$ac_cv_func_dlopen" = yes
11479 then DYNLOADFILE="dynload_shlib.o"
11480 else DYNLOADFILE="dynload_stub.o"
11481 fi
11482 ;;
11483 esac
11484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11486$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011487if test "$DYNLOADFILE" != "dynload_stub.o"
11488then
Martin v. Löwis11437992002-04-12 09:54:03 +000011489
Matthias Kloseb9621712010-04-24 17:59:49 +000011490$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011491
11492fi
11493
Neil Schemenauer4e425612001-06-19 15:44:15 +000011494# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11495
Michael W. Hudson54241132001-12-07 15:38:26 +000011496
Matthias Kloseb9621712010-04-24 17:59:49 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11498$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011499if test -z "$MACHDEP_OBJS"
11500then
Jack Jansene578a632001-08-15 01:27:14 +000011501 MACHDEP_OBJS=$extra_machdep_objs
11502else
11503 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011504fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011505if test -z "$MACHDEP_OBJS"; then
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11507$as_echo "none" >&6; }
11508else
11509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11510$as_echo "$MACHDEP_OBJS" >&6; }
11511fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011512
Guido van Rossum627b2d71993-12-24 10:39:16 +000011513# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011514for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011515 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11516 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011517 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011518 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011519 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011520 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011521 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011522 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011523 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011524 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011525 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011526 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011527 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11528 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011529 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011530 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011531 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011532 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11533 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011534 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011535 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011536 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011537 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011538 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011539do :
11540 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11541ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011542if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011544#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011545_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011546
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011547fi
11548done
11549
Michael W. Hudson54241132001-12-07 15:38:26 +000011550
Benjamin Peterson40caa052018-09-12 15:52:40 -070011551# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11552# links. Some libc implementations have a stub lchmod implementation that always
11553# returns an error.
11554if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011555 for ac_func in lchmod
11556do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011557 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11558if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011559 cat >>confdefs.h <<_ACEOF
11560#define HAVE_LCHMOD 1
11561_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011562
11563fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011564done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011565
11566fi
11567
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011568ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11569 #include <dirent.h>
11570"
11571if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11572
11573$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11574
11575fi
11576
11577
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011578# For some functions, having a definition is not sufficient, since
11579# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11581$as_echo_n "checking for chroot... " >&6; }
11582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011583/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011584#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011585int
11586main ()
11587{
11588void *x=chroot
11589 ;
11590 return 0;
11591}
11592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011596
Matthias Kloseb159a552010-04-25 21:00:44 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011599else
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011602
11603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11606$as_echo_n "checking for link... " >&6; }
11607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011608/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011609#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011610int
11611main ()
11612{
11613void *x=link
11614 ;
11615 return 0;
11616}
11617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011619
Matthias Kloseb9621712010-04-24 17:59:49 +000011620$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011621
Matthias Kloseb159a552010-04-25 21:00:44 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011623$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11626$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011627
11628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11631$as_echo_n "checking for symlink... " >&6; }
11632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011633/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011634#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011635int
11636main ()
11637{
11638void *x=symlink
11639 ;
11640 return 0;
11641}
11642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011646
Matthias Kloseb159a552010-04-25 21:00:44 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011648$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011652
11653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11656$as_echo_n "checking for fchdir... " >&6; }
11657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011658/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011659#include <unistd.h>
11660int
11661main ()
11662{
11663void *x=fchdir
11664 ;
11665 return 0;
11666}
11667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011671
Matthias Kloseb159a552010-04-25 21:00:44 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011673$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011674else
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11676$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011677
11678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11681$as_echo_n "checking for fsync... " >&6; }
11682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011683/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011684#include <unistd.h>
11685int
11686main ()
11687{
11688void *x=fsync
11689 ;
11690 return 0;
11691}
11692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011694
Matthias Kloseb9621712010-04-24 17:59:49 +000011695$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011696
Matthias Kloseb159a552010-04-25 21:00:44 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011698$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11701$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011702
11703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11706$as_echo_n "checking for fdatasync... " >&6; }
11707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011708/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011709#include <unistd.h>
11710int
11711main ()
11712{
11713void *x=fdatasync
11714 ;
11715 return 0;
11716}
11717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011718if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011721
Matthias Kloseb159a552010-04-25 21:00:44 +000011722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011723$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011727
11728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11731$as_echo_n "checking for epoll... " >&6; }
11732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011733/* end confdefs.h. */
11734#include <sys/epoll.h>
11735int
11736main ()
11737{
11738void *x=epoll_create
11739 ;
11740 return 0;
11741}
11742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011743if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011746
Matthias Kloseb159a552010-04-25 21:00:44 +000011747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011748$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011752
11753fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11756$as_echo_n "checking for epoll_create1... " >&6; }
11757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11758/* end confdefs.h. */
11759#include <sys/epoll.h>
11760int
11761main ()
11762{
11763void *x=epoll_create1
11764 ;
11765 return 0;
11766}
11767_ACEOF
11768if ac_fn_c_try_compile "$LINENO"; then :
11769
11770$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11771
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11773$as_echo "yes" >&6; }
11774else
11775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11776$as_echo "no" >&6; }
11777
11778fi
11779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11781$as_echo_n "checking for kqueue... " >&6; }
11782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011783/* end confdefs.h. */
11784
11785#include <sys/types.h>
11786#include <sys/event.h>
11787
11788int
11789main ()
11790{
11791int x=kqueue()
11792 ;
11793 return 0;
11794}
11795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011796if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011797
Matthias Kloseb9621712010-04-24 17:59:49 +000011798$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011799
Matthias Kloseb159a552010-04-25 21:00:44 +000011800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011801$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11804$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011805
11806fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11809$as_echo_n "checking for prlimit... " >&6; }
11810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11811/* end confdefs.h. */
11812
11813#include <sys/time.h>
11814#include <sys/resource.h>
11815
11816int
11817main ()
11818{
11819void *x=prlimit
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824if ac_fn_c_try_compile "$LINENO"; then :
11825
11826$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11827
11828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11829$as_echo "yes" >&6; }
11830else
11831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11832$as_echo "no" >&6; }
11833
11834fi
11835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11836
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11838$as_echo_n "checking for memfd_create... " >&6; }
11839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11840/* end confdefs.h. */
11841
11842#ifdef HAVE_SYS_MMAN_H
11843#include <sys/mman.h>
11844#endif
11845#ifdef HAVE_SYS_MEMFD_H
11846#include <sys/memfd.h>
11847#endif
11848
11849int
11850main ()
11851{
11852void *x=memfd_create
11853 ;
11854 return 0;
11855}
11856_ACEOF
11857if ac_fn_c_try_compile "$LINENO"; then :
11858
11859$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11860
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11862$as_echo "yes" >&6; }
11863else
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11865$as_echo "no" >&6; }
11866
11867fi
11868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11869
Martin v. Löwisd5843682002-11-21 20:41:28 +000011870# On some systems (eg. FreeBSD 5), we would find a definition of the
11871# functions ctermid_r, setgroups in the library, but no prototype
11872# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11873# address to avoid compiler warnings and potential miscompilations
11874# because of the missing prototypes.
11875
Matthias Kloseb9621712010-04-24 17:59:49 +000011876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11877$as_echo_n "checking for ctermid_r... " >&6; }
11878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011879/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011880
Martin v. Löwisd5843682002-11-21 20:41:28 +000011881#include <stdio.h>
11882
Martin v. Löwisd5843682002-11-21 20:41:28 +000011883int
11884main ()
11885{
11886void* p = ctermid_r
11887 ;
11888 return 0;
11889}
11890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011892
Matthias Kloseb9621712010-04-24 17:59:49 +000011893$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011894
Matthias Kloseb159a552010-04-25 21:00:44 +000011895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011896$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011897else
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11899$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011900
11901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11903
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11905$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011906if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011907 $as_echo_n "(cached) " >&6
11908else
11909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011910/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011911#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011912int
11913main ()
11914{
11915void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011916
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011917 ;
11918 return 0;
11919}
11920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011921if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011922 ac_cv_flock_decl=yes
11923else
11924 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011925
11926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011928
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011929fi
11930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11931$as_echo "$ac_cv_flock_decl" >&6; }
11932if test "x${ac_cv_flock_decl}" = xyes; then
11933 for ac_func in flock
11934do :
11935 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011936if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011937 cat >>confdefs.h <<_ACEOF
11938#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011939_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011940
Antoine Pitroua3000072010-09-07 14:52:42 +000011941else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011943$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011944if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011945 $as_echo_n "(cached) " >&6
11946else
11947 ac_check_lib_save_LIBS=$LIBS
11948LIBS="-lbsd $LIBS"
11949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11950/* end confdefs.h. */
11951
11952/* Override any GCC internal prototype to avoid an error.
11953 Use char because int might match the return type of a GCC
11954 builtin and then its argument prototype would still apply. */
11955#ifdef __cplusplus
11956extern "C"
11957#endif
11958char flock ();
11959int
11960main ()
11961{
11962return flock ();
11963 ;
11964 return 0;
11965}
11966_ACEOF
11967if ac_fn_c_try_link "$LINENO"; then :
11968 ac_cv_lib_bsd_flock=yes
11969else
11970 ac_cv_lib_bsd_flock=no
11971fi
11972rm -f core conftest.err conftest.$ac_objext \
11973 conftest$ac_exeext conftest.$ac_ext
11974LIBS=$ac_check_lib_save_LIBS
11975fi
11976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11977$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011978if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011979 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011980
11981
11982$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11983
11984
11985fi
11986
11987
11988fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011989done
11990
Antoine Pitroua3000072010-09-07 14:52:42 +000011991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011992
Matthias Kloseb9621712010-04-24 17:59:49 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11994$as_echo_n "checking for getpagesize... " >&6; }
11995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011996/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011997
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011998#include <unistd.h>
11999
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012000int
12001main ()
12002{
12003void* p = getpagesize
12004 ;
12005 return 0;
12006}
12007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012008if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012009
Matthias Kloseb9621712010-04-24 17:59:49 +000012010$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012011
Matthias Kloseb159a552010-04-25 21:00:44 +000012012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012013$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012014else
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12016$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012017
12018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012020
Victor Stinner984890f2011-11-24 13:53:38 +010012021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12022$as_echo_n "checking for broken unsetenv... " >&6; }
12023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12024/* end confdefs.h. */
12025
12026#include <stdlib.h>
12027
12028int
12029main ()
12030{
12031int res = unsetenv("DUMMY")
12032 ;
12033 return 0;
12034}
12035_ACEOF
12036if ac_fn_c_try_compile "$LINENO"; then :
12037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12038$as_echo "no" >&6; }
12039else
12040
12041$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12042
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12044$as_echo "yes" >&6; }
12045
12046fi
12047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12048
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012049for ac_prog in true
12050do
12051 # Extract the first word of "$ac_prog", so it can be a program name with args.
12052set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12054$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012055if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012057else
12058 if test -n "$TRUE"; then
12059 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12060else
12061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12062for as_dir in $PATH
12063do
12064 IFS=$as_save_IFS
12065 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012066 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012068 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 $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 +000012070 break 2
12071 fi
12072done
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012074IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012075
12076fi
12077fi
12078TRUE=$ac_cv_prog_TRUE
12079if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12081$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012082else
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12084$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012085fi
12086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012088 test -n "$TRUE" && break
12089done
12090test -n "$TRUE" || TRUE="/bin/true"
12091
12092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12094$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012095if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012097else
12098 ac_check_lib_save_LIBS=$LIBS
12099LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012101/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012103/* Override any GCC internal prototype to avoid an error.
12104 Use char because int might match the return type of a GCC
12105 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012106#ifdef __cplusplus
12107extern "C"
12108#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012109char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012110int
12111main ()
12112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012113return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012114 ;
12115 return 0;
12116}
12117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012118if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012119 ac_cv_lib_c_inet_aton=yes
12120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012123rm -f core conftest.err conftest.$ac_objext \
12124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012125LIBS=$ac_check_lib_save_LIBS
12126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12128$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012129if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012130 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12133$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012134if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012136else
12137 ac_check_lib_save_LIBS=$LIBS
12138LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012140/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142/* Override any GCC internal prototype to avoid an error.
12143 Use char because int might match the return type of a GCC
12144 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012145#ifdef __cplusplus
12146extern "C"
12147#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012148char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012149int
12150main ()
12151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012153 ;
12154 return 0;
12155}
12156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012158 ac_cv_lib_resolv_inet_aton=yes
12159else
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012162rm -f core conftest.err conftest.$ac_objext \
12163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012164LIBS=$ac_check_lib_save_LIBS
12165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12167$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012168if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012169 cat >>confdefs.h <<_ACEOF
12170#define HAVE_LIBRESOLV 1
12171_ACEOF
12172
12173 LIBS="-lresolv $LIBS"
12174
12175fi
12176
12177
12178fi
12179
12180
Christian Heimesd0764e22007-12-04 15:00:33 +000012181# On Tru64, chflags seems to be present, but calling it will
12182# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12184$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012185if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012187else
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012189 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012190else
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012192/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012193
Christian Heimesd0764e22007-12-04 15:00:33 +000012194#include <sys/stat.h>
12195#include <unistd.h>
12196int main(int argc, char*argv[])
12197{
12198 if(chflags(argv[0], 0) != 0)
12199 return 1;
12200 return 0;
12201}
Ned Deily3eb67d52011-06-28 00:00:28 -070012202
Christian Heimesd0764e22007-12-04 15:00:33 +000012203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012204if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012205 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012206else
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012211fi
12212
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012213
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12216$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012217if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012219if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012220 ac_cv_have_chflags="yes"
12221else
12222 ac_cv_have_chflags="no"
12223fi
12224
12225fi
12226if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012227
Matthias Kloseb9621712010-04-24 17:59:49 +000012228$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012229
12230fi
12231
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12233$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012234if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012236else
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012238 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012239else
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012241/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012242
Christian Heimesd0764e22007-12-04 15:00:33 +000012243#include <sys/stat.h>
12244#include <unistd.h>
12245int main(int argc, char*argv[])
12246{
12247 if(lchflags(argv[0], 0) != 0)
12248 return 1;
12249 return 0;
12250}
Ned Deily3eb67d52011-06-28 00:00:28 -070012251
Christian Heimesd0764e22007-12-04 15:00:33 +000012252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012253if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012254 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012255else
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12259 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012260fi
12261
12262
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12265$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012266if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012268if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012269 ac_cv_have_lchflags="yes"
12270else
12271 ac_cv_have_lchflags="no"
12272fi
12273
12274fi
12275if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012278
12279fi
12280
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012281case $ac_sys_system/$ac_sys_release in
12282Darwin/*)
12283 _CUR_CFLAGS="${CFLAGS}"
12284 _CUR_LDFLAGS="${LDFLAGS}"
12285 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12286 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12287 ;;
12288esac
12289
Matthias Kloseb9621712010-04-24 17:59:49 +000012290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12291$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012292if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012294else
12295 ac_check_lib_save_LIBS=$LIBS
12296LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012298/* end confdefs.h. */
12299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300/* Override any GCC internal prototype to avoid an error.
12301 Use char because int might match the return type of a GCC
12302 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012303#ifdef __cplusplus
12304extern "C"
12305#endif
12306char inflateCopy ();
12307int
12308main ()
12309{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012310return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012311 ;
12312 return 0;
12313}
12314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012316 ac_cv_lib_z_inflateCopy=yes
12317else
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012320rm -f core conftest.err conftest.$ac_objext \
12321 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012322LIBS=$ac_check_lib_save_LIBS
12323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12325$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012326if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012329
12330fi
12331
12332
12333case $ac_sys_system/$ac_sys_release in
12334Darwin/*)
12335 CFLAGS="${_CUR_CFLAGS}"
12336 LDFLAGS="${_CUR_LDFLAGS}"
12337 ;;
12338esac
12339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12341$as_echo_n "checking for hstrerror... " >&6; }
12342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012344
Martin v. Löwise9416172003-05-03 10:12:45 +000012345#include <netdb.h>
12346
Martin v. Löwise9416172003-05-03 10:12:45 +000012347int
12348main ()
12349{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012350void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012351 ;
12352 return 0;
12353}
12354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012355if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012358
Matthias Kloseb159a552010-04-25 21:00:44 +000012359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012360$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012361else
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12363$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012364
12365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012366rm -f core conftest.err conftest.$ac_objext \
12367 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012368
Matthias Kloseb9621712010-04-24 17:59:49 +000012369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12370$as_echo_n "checking for inet_aton... " >&6; }
12371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012372/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012373
Martin v. Löwis86d66262006-02-17 08:40:11 +000012374#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012375#include <sys/socket.h>
12376#include <netinet/in.h>
12377#include <arpa/inet.h>
12378
Martin v. Löwise9416172003-05-03 10:12:45 +000012379int
12380main ()
12381{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012382void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012383 ;
12384 return 0;
12385}
12386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012387if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012388
Matthias Kloseb9621712010-04-24 17:59:49 +000012389$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012390
Matthias Kloseb159a552010-04-25 21:00:44 +000012391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012392$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012393else
Matthias Kloseb9621712010-04-24 17:59:49 +000012394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12395$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012396
12397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012398rm -f core conftest.err conftest.$ac_objext \
12399 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012400
Matthias Kloseb9621712010-04-24 17:59:49 +000012401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12402$as_echo_n "checking for inet_pton... " >&6; }
12403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012404/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012405
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012406#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012407#include <sys/socket.h>
12408#include <netinet/in.h>
12409#include <arpa/inet.h>
12410
Martin v. Löwise9416172003-05-03 10:12:45 +000012411int
12412main ()
12413{
12414void* p = inet_pton
12415 ;
12416 return 0;
12417}
12418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012422
Matthias Kloseb159a552010-04-25 21:00:44 +000012423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012424$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012425else
Matthias Kloseb9621712010-04-24 17:59:49 +000012426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12427$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012428
12429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012431
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012432# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12434$as_echo_n "checking for setgroups... " >&6; }
12435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012437
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012438#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012439#ifdef HAVE_GRP_H
12440#include <grp.h>
12441#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012442
Martin v. Löwisd5843682002-11-21 20:41:28 +000012443int
12444main ()
12445{
12446void* p = setgroups
12447 ;
12448 return 0;
12449}
12450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012452
Matthias Kloseb9621712010-04-24 17:59:49 +000012453$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012454
Matthias Kloseb159a552010-04-25 21:00:44 +000012455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012456$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012457else
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12459$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012460
12461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012463
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012464# check for openpty and forkpty
12465
12466for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012467do :
12468 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012469if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012470 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012471#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012472_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012474else
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12476$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012477if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012479else
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012481LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012485/* Override any GCC internal prototype to avoid an error.
12486 Use char because int might match the return type of a GCC
12487 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012488#ifdef __cplusplus
12489extern "C"
12490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012491char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012492int
12493main ()
12494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012496 ;
12497 return 0;
12498}
12499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012500if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012502else
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012505rm -f core conftest.err conftest.$ac_objext \
12506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012507LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12510$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012511if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012513 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012514else
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12516$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012517if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012519else
12520 ac_check_lib_save_LIBS=$LIBS
12521LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012523/* end confdefs.h. */
12524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525/* Override any GCC internal prototype to avoid an error.
12526 Use char because int might match the return type of a GCC
12527 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012528#ifdef __cplusplus
12529extern "C"
12530#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012531char openpty ();
12532int
12533main ()
12534{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012536 ;
12537 return 0;
12538}
12539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012540if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012541 ac_cv_lib_bsd_openpty=yes
12542else
Matthias Kloseb9621712010-04-24 17:59:49 +000012543 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012545rm -f core conftest.err conftest.$ac_objext \
12546 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012547LIBS=$ac_check_lib_save_LIBS
12548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12550$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012551if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012553 LIBS="$LIBS -lbsd"
12554fi
12555
12556
12557fi
12558
Fred Drake8cef4cf2000-06-28 16:40:38 +000012559
12560fi
12561done
12562
12563for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012564do :
12565 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012566if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012568#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012569_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012570
Fred Drake8cef4cf2000-06-28 16:40:38 +000012571else
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12573$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012574if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012576else
Martin v. Löwis11437992002-04-12 09:54:03 +000012577 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012578LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582/* Override any GCC internal prototype to avoid an error.
12583 Use char because int might match the return type of a GCC
12584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012585#ifdef __cplusplus
12586extern "C"
12587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012588char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012589int
12590main ()
12591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 ;
12594 return 0;
12595}
12596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012598 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012602rm -f core conftest.err conftest.$ac_objext \
12603 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012604LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12607$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012608if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012610 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012611else
Matthias Kloseb9621712010-04-24 17:59:49 +000012612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12613$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012614if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012615 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012616else
12617 ac_check_lib_save_LIBS=$LIBS
12618LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012620/* end confdefs.h. */
12621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012622/* Override any GCC internal prototype to avoid an error.
12623 Use char because int might match the return type of a GCC
12624 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012625#ifdef __cplusplus
12626extern "C"
12627#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012628char forkpty ();
12629int
12630main ()
12631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012633 ;
12634 return 0;
12635}
12636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012638 ac_cv_lib_bsd_forkpty=yes
12639else
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642rm -f core conftest.err conftest.$ac_objext \
12643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012644LIBS=$ac_check_lib_save_LIBS
12645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12647$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012648if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012649 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012650 LIBS="$LIBS -lbsd"
12651fi
12652
12653
12654fi
12655
Fred Drake8cef4cf2000-06-28 16:40:38 +000012656
12657fi
12658done
12659
Jack Jansendd19cf82001-12-06 22:36:17 +000012660
Michael W. Hudson54241132001-12-07 15:38:26 +000012661# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012662for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012663do :
12664 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12665ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012666if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012667 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012668#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012669_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012670
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012671fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012672done
12673
Michael W. Hudson54241132001-12-07 15:38:26 +000012674
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012675ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012676if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012677 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012678
Martin v. Löwis1142de32002-03-29 16:28:31 +000012679else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012680 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012681 *" dup2.$ac_objext "* ) ;;
12682 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012684esac
12685
Martin v. Löwis1142de32002-03-29 16:28:31 +000012686fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012687
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012688ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012689if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012690 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12691
12692else
12693 case " $LIBOBJS " in
12694 *" strdup.$ac_objext "* ) ;;
12695 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12696 ;;
12697esac
12698
12699fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012700
12701
12702for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012703do :
12704 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012705if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012710/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012711#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012712int
12713main ()
12714{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012715getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 ;
12717 return 0;
12718}
12719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012720if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012723
Guido van Rossum627b2d71993-12-24 10:39:16 +000012724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012726
Guido van Rossum627b2d71993-12-24 10:39:16 +000012727fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012728done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012729
Jack Jansen150753c2003-03-29 22:07:47 +000012730for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012731do :
12732 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012733if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012734 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012735#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012739#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012740int
12741main ()
12742{
12743setpgrp(0,0);
12744 ;
12745 return 0;
12746}
12747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012751
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012754
12755fi
12756done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012757
Michael W. Hudson54241132001-12-07 15:38:26 +000012758
Gregory P. Smith387512c2018-12-30 15:42:32 -080012759# We search for both crypt and crypt_r as one or the other may be defined
12760# This gets us our -lcrypt in LIBS when required on the target platform.
12761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12762$as_echo_n "checking for library containing crypt... " >&6; }
12763if ${ac_cv_search_crypt+:} false; then :
12764 $as_echo_n "(cached) " >&6
12765else
12766 ac_func_search_save_LIBS=$LIBS
12767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12768/* end confdefs.h. */
12769
12770/* Override any GCC internal prototype to avoid an error.
12771 Use char because int might match the return type of a GCC
12772 builtin and then its argument prototype would still apply. */
12773#ifdef __cplusplus
12774extern "C"
12775#endif
12776char crypt ();
12777int
12778main ()
12779{
12780return crypt ();
12781 ;
12782 return 0;
12783}
12784_ACEOF
12785for ac_lib in '' crypt; do
12786 if test -z "$ac_lib"; then
12787 ac_res="none required"
12788 else
12789 ac_res=-l$ac_lib
12790 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12791 fi
12792 if ac_fn_c_try_link "$LINENO"; then :
12793 ac_cv_search_crypt=$ac_res
12794fi
12795rm -f core conftest.err conftest.$ac_objext \
12796 conftest$ac_exeext
12797 if ${ac_cv_search_crypt+:} false; then :
12798 break
12799fi
12800done
12801if ${ac_cv_search_crypt+:} false; then :
12802
12803else
12804 ac_cv_search_crypt=no
12805fi
12806rm conftest.$ac_ext
12807LIBS=$ac_func_search_save_LIBS
12808fi
12809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12810$as_echo "$ac_cv_search_crypt" >&6; }
12811ac_res=$ac_cv_search_crypt
12812if test "$ac_res" != no; then :
12813 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12814
12815fi
12816
12817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12818$as_echo_n "checking for library containing crypt_r... " >&6; }
12819if ${ac_cv_search_crypt_r+:} false; then :
12820 $as_echo_n "(cached) " >&6
12821else
12822 ac_func_search_save_LIBS=$LIBS
12823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12824/* end confdefs.h. */
12825
12826/* Override any GCC internal prototype to avoid an error.
12827 Use char because int might match the return type of a GCC
12828 builtin and then its argument prototype would still apply. */
12829#ifdef __cplusplus
12830extern "C"
12831#endif
12832char crypt_r ();
12833int
12834main ()
12835{
12836return crypt_r ();
12837 ;
12838 return 0;
12839}
12840_ACEOF
12841for ac_lib in '' crypt; do
12842 if test -z "$ac_lib"; then
12843 ac_res="none required"
12844 else
12845 ac_res=-l$ac_lib
12846 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12847 fi
12848 if ac_fn_c_try_link "$LINENO"; then :
12849 ac_cv_search_crypt_r=$ac_res
12850fi
12851rm -f core conftest.err conftest.$ac_objext \
12852 conftest$ac_exeext
12853 if ${ac_cv_search_crypt_r+:} false; then :
12854 break
12855fi
12856done
12857if ${ac_cv_search_crypt_r+:} false; then :
12858
12859else
12860 ac_cv_search_crypt_r=no
12861fi
12862rm conftest.$ac_ext
12863LIBS=$ac_func_search_save_LIBS
12864fi
12865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12866$as_echo "$ac_cv_search_crypt_r" >&6; }
12867ac_res=$ac_cv_search_crypt_r
12868if test "$ac_res" != no; then :
12869 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12870
12871fi
12872
12873
12874ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12875if test "x$ac_cv_func_crypt_r" = xyes; then :
12876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12877/* end confdefs.h. */
12878
12879#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12880#include <crypt.h>
12881
12882int
12883main ()
12884{
12885
12886struct crypt_data d;
12887char *r = crypt_r("", "", &d);
12888
12889 ;
12890 return 0;
12891}
12892_ACEOF
12893if ac_fn_c_try_compile "$LINENO"; then :
12894
12895$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12896
12897fi
12898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12899
12900fi
12901
12902
Victor Stinnere0be4232011-10-25 13:06:09 +020012903for ac_func in clock_gettime
12904do :
12905 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12906if test "x$ac_cv_func_clock_gettime" = xyes; then :
12907 cat >>confdefs.h <<_ACEOF
12908#define HAVE_CLOCK_GETTIME 1
12909_ACEOF
12910
12911else
12912
12913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12914$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12915if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12916 $as_echo_n "(cached) " >&6
12917else
12918 ac_check_lib_save_LIBS=$LIBS
12919LIBS="-lrt $LIBS"
12920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12921/* end confdefs.h. */
12922
12923/* Override any GCC internal prototype to avoid an error.
12924 Use char because int might match the return type of a GCC
12925 builtin and then its argument prototype would still apply. */
12926#ifdef __cplusplus
12927extern "C"
12928#endif
12929char clock_gettime ();
12930int
12931main ()
12932{
12933return clock_gettime ();
12934 ;
12935 return 0;
12936}
12937_ACEOF
12938if ac_fn_c_try_link "$LINENO"; then :
12939 ac_cv_lib_rt_clock_gettime=yes
12940else
12941 ac_cv_lib_rt_clock_gettime=no
12942fi
12943rm -f core conftest.err conftest.$ac_objext \
12944 conftest$ac_exeext conftest.$ac_ext
12945LIBS=$ac_check_lib_save_LIBS
12946fi
12947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12948$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12949if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12950
Victor Stinner7efb8332014-08-29 15:41:08 +020012951 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012952 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12953
12954
12955$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12956
12957
12958fi
12959
12960
12961fi
12962done
12963
12964
12965for ac_func in clock_getres
12966do :
12967 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12968if test "x$ac_cv_func_clock_getres" = xyes; then :
12969 cat >>confdefs.h <<_ACEOF
12970#define HAVE_CLOCK_GETRES 1
12971_ACEOF
12972
12973else
12974
12975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12976$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12977if ${ac_cv_lib_rt_clock_getres+:} false; then :
12978 $as_echo_n "(cached) " >&6
12979else
12980 ac_check_lib_save_LIBS=$LIBS
12981LIBS="-lrt $LIBS"
12982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983/* end confdefs.h. */
12984
12985/* Override any GCC internal prototype to avoid an error.
12986 Use char because int might match the return type of a GCC
12987 builtin and then its argument prototype would still apply. */
12988#ifdef __cplusplus
12989extern "C"
12990#endif
12991char clock_getres ();
12992int
12993main ()
12994{
12995return clock_getres ();
12996 ;
12997 return 0;
12998}
12999_ACEOF
13000if ac_fn_c_try_link "$LINENO"; then :
13001 ac_cv_lib_rt_clock_getres=yes
13002else
13003 ac_cv_lib_rt_clock_getres=no
13004fi
13005rm -f core conftest.err conftest.$ac_objext \
13006 conftest$ac_exeext conftest.$ac_ext
13007LIBS=$ac_check_lib_save_LIBS
13008fi
13009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13010$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13011if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13012
13013 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13014
13015
13016fi
13017
13018
13019fi
13020done
13021
13022
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013023for ac_func in clock_settime
13024do :
13025 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13026if test "x$ac_cv_func_clock_settime" = xyes; then :
13027 cat >>confdefs.h <<_ACEOF
13028#define HAVE_CLOCK_SETTIME 1
13029_ACEOF
13030
13031else
13032
13033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13034$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13035if ${ac_cv_lib_rt_clock_settime+:} false; then :
13036 $as_echo_n "(cached) " >&6
13037else
13038 ac_check_lib_save_LIBS=$LIBS
13039LIBS="-lrt $LIBS"
13040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13041/* end confdefs.h. */
13042
13043/* Override any GCC internal prototype to avoid an error.
13044 Use char because int might match the return type of a GCC
13045 builtin and then its argument prototype would still apply. */
13046#ifdef __cplusplus
13047extern "C"
13048#endif
13049char clock_settime ();
13050int
13051main ()
13052{
13053return clock_settime ();
13054 ;
13055 return 0;
13056}
13057_ACEOF
13058if ac_fn_c_try_link "$LINENO"; then :
13059 ac_cv_lib_rt_clock_settime=yes
13060else
13061 ac_cv_lib_rt_clock_settime=no
13062fi
13063rm -f core conftest.err conftest.$ac_objext \
13064 conftest$ac_exeext conftest.$ac_ext
13065LIBS=$ac_check_lib_save_LIBS
13066fi
13067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13068$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13069if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13070
13071 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13072
13073
13074fi
13075
13076
13077fi
13078done
13079
13080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13082$as_echo_n "checking for major... " >&6; }
13083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013084/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013085
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013086#if defined(MAJOR_IN_MKDEV)
13087#include <sys/mkdev.h>
13088#elif defined(MAJOR_IN_SYSMACROS)
13089#include <sys/sysmacros.h>
13090#else
13091#include <sys/types.h>
13092#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013093
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013094int
13095main ()
13096{
13097
13098 makedev(major(0),minor(0));
13099
13100 ;
13101 return 0;
13102}
13103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013104if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013105
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13110$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013111
13112else
Skip Montanaro6dead952003-09-25 14:50:04 +000013113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13115$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013116
13117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013118rm -f core conftest.err conftest.$ac_objext \
13119 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013120
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013121# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013122# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13124$as_echo_n "checking for getaddrinfo... " >&6; }
13125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013126/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013127
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013128#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013129#include <sys/socket.h>
13130#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013131#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013132
Martin v. Löwis11437992002-04-12 09:54:03 +000013133int
13134main ()
13135{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013136getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 ;
13138 return 0;
13139}
13140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013141if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013142 have_getaddrinfo=yes
13143else
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013146rm -f core conftest.err conftest.$ac_objext \
13147 conftest$ac_exeext conftest.$ac_ext
13148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13149$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150if test $have_getaddrinfo = yes
13151then
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13153$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013154 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013156else
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013158
13159if test "${enable_ipv6+set}" = set; then
13160 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13161else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013162 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013163fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013164else
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013166/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167
Stefan Krah19c21392012-11-22 23:47:32 +010013168#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013169#include <sys/types.h>
13170#include <netdb.h>
13171#include <string.h>
13172#include <sys/socket.h>
13173#include <netinet/in.h>
13174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176{
13177 int passive, gaierr, inet4 = 0, inet6 = 0;
13178 struct addrinfo hints, *ai, *aitop;
13179 char straddr[INET6_ADDRSTRLEN], strport[16];
13180
13181 for (passive = 0; passive <= 1; passive++) {
13182 memset(&hints, 0, sizeof(hints));
13183 hints.ai_family = AF_UNSPEC;
13184 hints.ai_flags = passive ? AI_PASSIVE : 0;
13185 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013186 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013187 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13188 (void)gai_strerror(gaierr);
13189 goto bad;
13190 }
13191 for (ai = aitop; ai; ai = ai->ai_next) {
13192 if (ai->ai_addr == NULL ||
13193 ai->ai_addrlen == 0 ||
13194 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13195 straddr, sizeof(straddr), strport, sizeof(strport),
13196 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13197 goto bad;
13198 }
13199 switch (ai->ai_family) {
13200 case AF_INET:
13201 if (strcmp(strport, "54321") != 0) {
13202 goto bad;
13203 }
13204 if (passive) {
13205 if (strcmp(straddr, "0.0.0.0") != 0) {
13206 goto bad;
13207 }
13208 } else {
13209 if (strcmp(straddr, "127.0.0.1") != 0) {
13210 goto bad;
13211 }
13212 }
13213 inet4++;
13214 break;
13215 case AF_INET6:
13216 if (strcmp(strport, "54321") != 0) {
13217 goto bad;
13218 }
13219 if (passive) {
13220 if (strcmp(straddr, "::") != 0) {
13221 goto bad;
13222 }
13223 } else {
13224 if (strcmp(straddr, "::1") != 0) {
13225 goto bad;
13226 }
13227 }
13228 inet6++;
13229 break;
13230 case AF_UNSPEC:
13231 goto bad;
13232 break;
13233 default:
13234 /* another family support? */
13235 break;
13236 }
13237 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013238 freeaddrinfo(aitop);
13239 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013240 }
13241
13242 if (!(inet4 == 0 || inet4 == 2))
13243 goto bad;
13244 if (!(inet6 == 0 || inet6 == 2))
13245 goto bad;
13246
13247 if (aitop)
13248 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013249 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013250
13251 bad:
13252 if (aitop)
13253 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013254 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013255}
13256
Martin v. Löwis11437992002-04-12 09:54:03 +000013257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013258if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013259 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013260else
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13264 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13272$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13273
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013274if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013275then
13276 if test $ipv6 = yes
13277 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013278 echo 'Fatal: You must get working getaddrinfo() function.'
13279 echo ' or you can specify "--disable-ipv6"'.
13280 exit 1
13281 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013282else
Martin v. Löwis11437992002-04-12 09:54:03 +000013283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013285
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013286fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013287
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013288for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013289do :
13290 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013291if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013293#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013294_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013295
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013296fi
13297done
13298
Michael W. Hudson54241132001-12-07 15:38:26 +000013299
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13302$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013303if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305else
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013307/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308#include <sys/types.h>
13309#include <sys/time.h>
13310#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013311
Martin v. Löwis11437992002-04-12 09:54:03 +000013312int
13313main ()
13314{
13315if ((struct tm *) 0)
13316return 0;
13317 ;
13318 return 0;
13319}
13320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013321if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13329$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013330if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333
13334fi
13335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13337$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013338if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013342/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343#include <sys/types.h>
13344#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013345
Martin v. Löwis11437992002-04-12 09:54:03 +000013346int
13347main ()
13348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349struct tm tm;
13350 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013352 ;
13353 return 0;
13354}
13355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013356if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013357 ac_cv_struct_tm=time.h
13358else
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13364$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013365if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368
13369fi
13370
Matthias Kloseb9621712010-04-24 17:59:49 +000013371ac_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 +000013372#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374"
Victor Stinnere0be4232011-10-25 13:06:09 +020013375if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
13377cat >>confdefs.h <<_ACEOF
13378#define HAVE_STRUCT_TM_TM_ZONE 1
13379_ACEOF
13380
13381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013383
Martin v. Löwis11437992002-04-12 09:54:03 +000013384if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013387
13388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13390"
Victor Stinnere0be4232011-10-25 13:06:09 +020013391if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013395fi
13396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013397cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013398#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399_ACEOF
13400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13402$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013403if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013407/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013408#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013409#if !HAVE_DECL_TZNAME
13410extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413int
13414main ()
13415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 ;
13418 return 0;
13419}
13420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013421if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422 ac_cv_var_tzname=yes
13423else
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013426rm -f core conftest.err conftest.$ac_objext \
13427 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13430$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013431 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013434
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013435 fi
13436fi
13437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438ac_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 +020013439if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
13441cat >>confdefs.h <<_ACEOF
13442#define HAVE_STRUCT_STAT_ST_RDEV 1
13443_ACEOF
13444
13445
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013446fi
13447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448ac_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 +020013449if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451cat >>confdefs.h <<_ACEOF
13452#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13453_ACEOF
13454
13455
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013456fi
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458ac_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 +020013459if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013460
13461cat >>confdefs.h <<_ACEOF
13462#define HAVE_STRUCT_STAT_ST_FLAGS 1
13463_ACEOF
13464
13465
13466fi
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468ac_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 +020013469if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013470
13471cat >>confdefs.h <<_ACEOF
13472#define HAVE_STRUCT_STAT_ST_GEN 1
13473_ACEOF
13474
13475
13476fi
13477
Matthias Kloseb9621712010-04-24 17:59:49 +000013478ac_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 +020013479if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013480
13481cat >>confdefs.h <<_ACEOF
13482#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13483_ACEOF
13484
13485
13486fi
13487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488ac_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 +020013489if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013490
Martin v. Löwis11437992002-04-12 09:54:03 +000013491cat >>confdefs.h <<_ACEOF
13492#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13493_ACEOF
13494
13495
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013496fi
13497
Stefan Krah267b6392016-04-26 01:09:18 +020013498ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13499 #include <sys/types.h>
13500 #include <pwd.h>
13501
13502"
13503if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13504
13505cat >>confdefs.h <<_ACEOF
13506#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13507_ACEOF
13508
13509
13510fi
13511ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13512 #include <sys/types.h>
13513 #include <pwd.h>
13514
13515"
13516if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13517
13518cat >>confdefs.h <<_ACEOF
13519#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13520_ACEOF
13521
13522
13523fi
13524
Zachary Ware6a6967e2016-10-01 00:47:27 -050013525# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13526ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13527"
13528if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13529
13530cat >>confdefs.h <<_ACEOF
13531#define HAVE_SIGINFO_T_SI_BAND 1
13532_ACEOF
13533
13534
13535fi
13536
Michael W. Hudson54241132001-12-07 15:38:26 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13539$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013540if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542else
Matthias Kloseb159a552010-04-25 21:00:44 +000013543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013545/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013546#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013547int
13548main ()
13549{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013550return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013551 ;
13552 return 0;
13553}
13554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013555if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556 ac_cv_header_time_altzone=yes
13557else
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013562fi
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13565$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013566if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013567
Matthias Kloseb9621712010-04-24 17:59:49 +000013568$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569
13570fi
13571
Guido van Rossumda88dad1995-01-26 00:46:29 +000013572was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13574$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013576/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013577
13578#include <sys/types.h>
13579#include <sys/select.h>
13580#include <sys/time.h>
13581
Martin v. Löwis11437992002-04-12 09:54:03 +000013582int
13583main ()
13584{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585;
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 ;
13587 return 0;
13588}
13589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013591
13592
Matthias Kloseb9621712010-04-24 17:59:49 +000013593$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013594
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013595 was_it_defined=yes
13596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13600$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13603$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013604if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013605 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013606else
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013608/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013609#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013610int
13611main ()
13612{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013613struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 ;
13615 return 0;
13616}
13617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619 ac_cv_struct_addrinfo=yes
13620else
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13624fi
13625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13627$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013628if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013631
13632fi
13633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13635$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013636if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013640/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013641
13642# include <sys/types.h>
13643# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013644int
13645main ()
13646{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013647struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013648 ;
13649 return 0;
13650}
13651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013653 ac_cv_struct_sockaddr_storage=yes
13654else
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13658fi
13659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13661$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013662if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013665
13666fi
13667
Christian Heimesdffa3942016-09-05 23:54:41 +020013668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13669$as_echo_n "checking for sockaddr_alg... " >&6; }
13670if ${ac_cv_struct_sockaddr_alg+:} false; then :
13671 $as_echo_n "(cached) " >&6
13672else
13673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13674/* end confdefs.h. */
13675
13676# include <sys/types.h>
13677# include <sys/socket.h>
13678# include <linux/if_alg.h>
13679int
13680main ()
13681{
13682struct sockaddr_alg s
13683 ;
13684 return 0;
13685}
13686_ACEOF
13687if ac_fn_c_try_compile "$LINENO"; then :
13688 ac_cv_struct_sockaddr_alg=yes
13689else
13690 ac_cv_struct_sockaddr_alg=no
13691fi
13692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13693fi
13694
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13696$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13697if test $ac_cv_struct_sockaddr_alg = yes; then
13698
13699$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13700
13701fi
13702
Guido van Rossum627b2d71993-12-24 10:39:16 +000013703# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13706$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013707if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013709else
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013712$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013713int
13714main ()
13715{
13716static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013717test_array [0] = 0;
13718return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013719
13720 ;
13721 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013722}
Martin v. Löwis11437992002-04-12 09:54:03 +000013723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013724if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013725 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013726else
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13732$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735
13736fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013737
Matthias Kloseb9621712010-04-24 17:59:49 +000013738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13739$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013740if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013742else
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013744/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013745
Martin v. Löwis11437992002-04-12 09:54:03 +000013746int
13747main ()
13748{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013749
Martin v. Löwis11437992002-04-12 09:54:03 +000013750#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013751 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013753 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755 char const *const *pcpcc;
13756 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 /* NEC SVR4.0.2 mips cc rejects this. */
13758 struct point {int x, y;};
13759 static struct point const zero = {0,0};
13760 /* AIX XL C 1.02.0.0 rejects this.
13761 It does not let you subtract one const X* pointer from another in
13762 an arm of an if-expression whose if-part is not a constant
13763 expression */
13764 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013765 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013767 ++pcpcc;
13768 ppc = (char**) pcpcc;
13769 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013770 { /* SCO 3.2v4 cc rejects this sort of thing. */
13771 char tx;
13772 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 }
13778 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13779 int x[] = {25, 17};
13780 const int *foo = &x[0];
13781 ++foo;
13782 }
13783 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13784 typedef const int *iptr;
13785 iptr p = 0;
13786 ++p;
13787 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013788 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013790 struct s { int j; const int *ap[3]; } bx;
13791 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 }
13793 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13794 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013798#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ;
13801 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013802}
Martin v. Löwis11437992002-04-12 09:54:03 +000013803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013804if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013805 ac_cv_c_const=yes
13806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13812$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013814
Matthias Kloseb9621712010-04-24 17:59:49 +000013815$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013816
13817fi
13818
Michael W. Hudson54241132001-12-07 15:38:26 +000013819
Guido van Rossumda88dad1995-01-26 00:46:29 +000013820works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13822$as_echo_n "checking for working signed char... " >&6; }
13823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013824/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013825
Martin v. Löwis11437992002-04-12 09:54:03 +000013826int
13827main ()
13828{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013829signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 ;
13831 return 0;
13832}
13833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013834if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013835 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013836else
Skip Montanaro6dead952003-09-25 14:50:04 +000013837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013839
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013840
Guido van Rossum7f43da71994-08-01 12:15:30 +000013841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13844$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013845
Guido van Rossumda88dad1995-01-26 00:46:29 +000013846have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13848$as_echo_n "checking for prototypes... " >&6; }
13849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013850/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013851int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013852int
13853main ()
13854{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013855return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 ;
13857 return 0;
13858}
13859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013860if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013863
Matthias Kloseb159a552010-04-25 21:00:44 +000013864 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13868$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013869
Guido van Rossumda88dad1995-01-26 00:46:29 +000013870works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13872$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013874/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013875
13876#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013877int foo(int x, ...) {
13878 va_list va;
13879 va_start(va, x);
13880 va_arg(va, int);
13881 va_arg(va, char *);
13882 va_arg(va, double);
13883 return 0;
13884}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013885
Martin v. Löwis11437992002-04-12 09:54:03 +000013886int
13887main ()
13888{
Guido van Rossum90eea071996-08-30 20:58:57 +000013889return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013890 ;
13891 return 0;
13892}
13893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013895
13896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013899 works=yes
13900
Guido van Rossum627b2d71993-12-24 10:39:16 +000013901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13904$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013905
Martin v. Löwisd6320502004-08-12 13:45:08 +000013906# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13908$as_echo_n "checking for socketpair... " >&6; }
13909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013910/* end confdefs.h. */
13911
13912#include <sys/types.h>
13913#include <sys/socket.h>
13914
13915int
13916main ()
13917{
13918void *x=socketpair
13919 ;
13920 return 0;
13921}
13922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013923if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013924
Matthias Kloseb9621712010-04-24 17:59:49 +000013925$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013926
Matthias Kloseb159a552010-04-25 21:00:44 +000013927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013928$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013929else
Matthias Kloseb9621712010-04-24 17:59:49 +000013930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13931$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013932
13933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013935
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013936# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13938$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013940/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013941#include <sys/types.h>
13942#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013943int
13944main ()
13945{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013946struct sockaddr x;
13947x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013948 ;
13949 return 0;
13950}
13951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013952if ac_fn_c_try_compile "$LINENO"; then :
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13954$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013957
13958else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13960$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013961
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013964
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013965# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
13967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013969if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13974$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013975 OLD_CFLAGS=$CFLAGS
13976 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013978/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013979
13980# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
Martin v. Löwis11437992002-04-12 09:54:03 +000013982int
13983main ()
13984{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013985
13986 char *name;
13987 struct hostent *he, *res;
13988 char buffer[2048];
13989 int buflen = 2048;
13990 int h_errnop;
13991
13992 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013993
13994 ;
13995 return 0;
13996}
13997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013998if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014001
Martin v. Löwis11437992002-04-12 09:54:03 +000014002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014004
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14006$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014008else
Skip Montanaro6dead952003-09-25 14:50:04 +000014009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14011$as_echo "no" >&6; }
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14013$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014015/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014016
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014017# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
Martin v. Löwis11437992002-04-12 09:54:03 +000014019int
14020main ()
14021{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014022
14023 char *name;
14024 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014025 char buffer[2048];
14026 int buflen = 2048;
14027 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014028
Matthias Kloseb159a552010-04-25 21:00:44 +000014029 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014030
14031 ;
14032 return 0;
14033}
14034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014035if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014036
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039
Matthias Kloseb159a552010-04-25 21:00:44 +000014040$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14043$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014045else
Skip Montanaro6dead952003-09-25 14:50:04 +000014046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14048$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14050$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14052/* end confdefs.h. */
14053
14054# include <netdb.h>
14055
14056int
14057main ()
14058{
14059
14060 char *name;
14061 struct hostent *he;
14062 struct hostent_data data;
14063
14064 (void) gethostbyname_r(name, he, &data);
14065
14066 ;
14067 return 0;
14068}
14069_ACEOF
14070if ac_fn_c_try_compile "$LINENO"; then :
14071
14072 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14073
14074
14075$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14076
14077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14078$as_echo "yes" >&6; }
14079
14080else
14081
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14083$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014084
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014087
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014090
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014093 CFLAGS=$OLD_CFLAGS
14094
14095else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 for ac_func in gethostbyname
14098do :
14099 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014100if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014102#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014103_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014104
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014105fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014106done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014107
Michael W. Hudson54241132001-12-07 15:38:26 +000014108
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109fi
14110
Michael W. Hudson54241132001-12-07 15:38:26 +000014111
14112
14113
14114
14115
14116
Guido van Rossum627b2d71993-12-24 10:39:16 +000014117# checks for system services
14118# (none yet)
14119
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014120# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014121ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014122if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014123
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014124else
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14126$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014127if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014129else
Martin v. Löwis11437992002-04-12 09:54:03 +000014130 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014131LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135/* Override any GCC internal prototype to avoid an error.
14136 Use char because int might match the return type of a GCC
14137 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014138#ifdef __cplusplus
14139extern "C"
14140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014141char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014142int
14143main ()
14144{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014145return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014146 ;
14147 return 0;
14148}
14149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014150if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014152else
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014155rm -f core conftest.err conftest.$ac_objext \
14156 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014157LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14160$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014161if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 cat >>confdefs.h <<_ACEOF
14163#define HAVE_LIBIEEE 1
14164_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014165
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014166 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014167
Guido van Rossum627b2d71993-12-24 10:39:16 +000014168fi
14169
Michael W. Hudson54241132001-12-07 15:38:26 +000014170
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014171fi
14172
Michael W. Hudson54241132001-12-07 15:38:26 +000014173
Guido van Rossum7f43da71994-08-01 12:15:30 +000014174# check for --with-libm=...
14175
Guido van Rossum563e7081996-09-10 18:20:48 +000014176case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014177Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014178*) LIBM=-lm
14179esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14181$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014184if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014186if test "$withval" = no
14187then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14189$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014190elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014191then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14193$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014194else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014195fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014196else
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14198$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199fi
14200
Guido van Rossum7f43da71994-08-01 12:15:30 +000014201
14202# check for --with-libc=...
14203
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14205$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014208if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014209 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014210if test "$withval" = no
14211then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14213$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014214elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014215then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14217$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014218else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014219fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014220else
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14222$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014223fi
14224
Guido van Rossum7f43da71994-08-01 12:15:30 +000014225
Stefan Krah1919b7e2012-03-21 18:25:23 +010014226# **************************************
14227# * Check for gcc x64 inline assembler *
14228# **************************************
14229
14230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14231$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14233/* end confdefs.h. */
14234
14235int
14236main ()
14237{
14238
14239 __asm__ __volatile__ ("movq %rcx, %rax");
14240
14241 ;
14242 return 0;
14243}
14244_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014245if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014246 have_gcc_asm_for_x64=yes
14247else
14248 have_gcc_asm_for_x64=no
14249fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014250rm -f core conftest.err conftest.$ac_objext \
14251 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14253$as_echo "$have_gcc_asm_for_x64" >&6; }
14254if test "$have_gcc_asm_for_x64" = yes
14255then
14256
14257$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14258
14259fi
14260
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014261# **************************************************
14262# * Check for various properties of floating point *
14263# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014264
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14266$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14267if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014269else
14270
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014271
14272ax_cv_c_float_words_bigendian=unknown
14273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014274/* end confdefs.h. */
14275
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014276
14277double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14278
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014279
14280_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014281if ac_fn_c_try_compile "$LINENO"; then :
14282
14283
14284if grep noonsees conftest.$ac_objext >/dev/null ; then
14285 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014286fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014287if grep seesnoon conftest.$ac_objext >/dev/null ; then
14288 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14289 ax_cv_c_float_words_bigendian=no
14290 else
14291 ax_cv_c_float_words_bigendian=unknown
14292 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014293fi
14294
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014295
14296fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014298fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14300$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014301
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014302case $ax_cv_c_float_words_bigendian in
14303 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014304
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014305$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14306 ;;
14307 no)
14308 ;;
14309 *)
14310 as_fn_error $? "
14311
14312Unknown float word ordering. You need to manually preset
14313ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14314
14315 " "$LINENO" 5 ;;
14316esac
14317
14318
14319if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014320then
14321
Matthias Kloseb9621712010-04-24 17:59:49 +000014322$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014323
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014324elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014325then
14326
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014327$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14328
14329else
14330 # Some ARM platforms use a mixed-endian representation for doubles.
14331 # While Python doesn't currently have full support for these platforms
14332 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14333 # conversions work.
14334 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14335 # or little, then it must be this?
14336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014338
14339fi
14340
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014341# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014342# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014343# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014344# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014345# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014346# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014347
14348# This inline assembler syntax may also work for suncc and icc,
14349# so we try it on all platforms.
14350
Matthias Kloseb9621712010-04-24 17:59:49 +000014351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14352$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014354/* end confdefs.h. */
14355
14356int
14357main ()
14358{
14359
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014360 unsigned short cw;
14361 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14362 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014363
14364 ;
14365 return 0;
14366}
14367_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014368if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014369 have_gcc_asm_for_x87=yes
14370else
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014372fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014373rm -f core conftest.err conftest.$ac_objext \
14374 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14376$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014377if test "$have_gcc_asm_for_x87" = yes
14378then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014379
Matthias Kloseb9621712010-04-24 17:59:49 +000014380$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014381
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14385$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14387/* end confdefs.h. */
14388
14389int
14390main ()
14391{
14392
14393 unsigned int fpcr;
14394 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14395 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14396
14397 ;
14398 return 0;
14399}
14400_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014401if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014402 have_gcc_asm_for_mc68881=yes
14403else
14404 have_gcc_asm_for_mc68881=no
14405fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014406rm -f core conftest.err conftest.$ac_objext \
14407 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14409$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14410if test "$have_gcc_asm_for_mc68881" = yes
14411then
14412
14413$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14414
14415fi
14416
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014417# Detect whether system arithmetic is subject to x87-style double
14418# rounding issues. The result of this test has little meaning on non
14419# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14420# mode is round-to-nearest and double rounding issues are present, and
14421# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14423$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014424# $BASECFLAGS may affect the result
14425ac_save_cc="$CC"
14426CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014427if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014428 ac_cv_x87_double_rounding=no
14429else
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014431/* end confdefs.h. */
14432
14433#include <stdlib.h>
14434#include <math.h>
14435int main() {
14436 volatile double x, y, z;
14437 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14438 x = 0.99999999999999989; /* 1-2**-53 */
14439 y = 1./x;
14440 if (y != 1.)
14441 exit(0);
14442 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14443 x = 1e16;
14444 y = 2.99999;
14445 z = x + y;
14446 if (z != 1e16+4.)
14447 exit(0);
14448 /* both tests show evidence of double rounding */
14449 exit(1);
14450}
14451
14452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014453if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014454 ac_cv_x87_double_rounding=no
14455else
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14459 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014460fi
14461
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014462CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14464$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014465if test "$ac_cv_x87_double_rounding" = yes
14466then
14467
Matthias Kloseb9621712010-04-24 17:59:49 +000014468$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014469
14470fi
14471
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014472# ************************************
14473# * Check for mathematical functions *
14474# ************************************
14475
14476LIBS_SAVE=$LIBS
14477LIBS="$LIBS $LIBM"
14478
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014479for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14480do :
14481 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14482ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014483if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014484 cat >>confdefs.h <<_ACEOF
14485#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14486_ACEOF
14487
14488fi
14489done
14490
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014491for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014492do :
14493 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14494ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014495if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014496 cat >>confdefs.h <<_ACEOF
14497#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14498_ACEOF
14499
14500fi
14501done
14502
14503ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14504"
Victor Stinnere0be4232011-10-25 13:06:09 +020014505if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014506 ac_have_decl=1
14507else
14508 ac_have_decl=0
14509fi
14510
14511cat >>confdefs.h <<_ACEOF
14512#define HAVE_DECL_ISINF $ac_have_decl
14513_ACEOF
14514ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14515"
Victor Stinnere0be4232011-10-25 13:06:09 +020014516if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014517 ac_have_decl=1
14518else
14519 ac_have_decl=0
14520fi
14521
14522cat >>confdefs.h <<_ACEOF
14523#define HAVE_DECL_ISNAN $ac_have_decl
14524_ACEOF
14525ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14526"
Victor Stinnere0be4232011-10-25 13:06:09 +020014527if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014528 ac_have_decl=1
14529else
14530 ac_have_decl=0
14531fi
14532
14533cat >>confdefs.h <<_ACEOF
14534#define HAVE_DECL_ISFINITE $ac_have_decl
14535_ACEOF
14536
14537
Mark Dickinsona614f042009-11-28 12:48:43 +000014538# For multiprocessing module, check that sem_open
14539# actually works. For FreeBSD versions <= 7.2,
14540# the kernel module that provides POSIX semaphores
14541# isn't loaded by default, so an attempt to call
14542# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14544$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014545if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014547else
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014549 ac_cv_posix_semaphores_enabled=yes
14550else
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014552/* end confdefs.h. */
14553
14554#include <unistd.h>
14555#include <fcntl.h>
14556#include <stdio.h>
14557#include <semaphore.h>
14558#include <sys/stat.h>
14559
14560int main(void) {
14561 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14562 if (a == SEM_FAILED) {
14563 perror("sem_open");
14564 return 1;
14565 }
14566 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014567 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014568 return 0;
14569}
14570
14571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014572if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014573 ac_cv_posix_semaphores_enabled=yes
14574else
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014579fi
14580
14581
Mark Dickinsona614f042009-11-28 12:48:43 +000014582fi
14583
Matthias Kloseb9621712010-04-24 17:59:49 +000014584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14585$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014586if test $ac_cv_posix_semaphores_enabled = no
14587then
14588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014590
14591fi
14592
Mark Dickinson10683072009-04-18 21:18:19 +000014593# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14595$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014596if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014597 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014598else
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014600 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014601else
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014603/* end confdefs.h. */
14604
14605#include <unistd.h>
14606#include <fcntl.h>
14607#include <stdio.h>
14608#include <semaphore.h>
14609#include <sys/stat.h>
14610
14611int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014612 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014613 int count;
14614 int res;
14615 if(a==SEM_FAILED){
14616 perror("sem_open");
14617 return 1;
14618
14619 }
14620 res = sem_getvalue(a, &count);
14621 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014622 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014623 return res==-1 ? 1 : 0;
14624}
14625
Mark Dickinson10683072009-04-18 21:18:19 +000014626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014627if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014628 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014629else
Matthias Kloseb9621712010-04-24 17:59:49 +000014630 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14633 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014634fi
14635
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014636
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014637fi
14638
Matthias Kloseb9621712010-04-24 17:59:49 +000014639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14640$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014641if test $ac_cv_broken_sem_getvalue = yes
14642then
14643
Matthias Kloseb9621712010-04-24 17:59:49 +000014644$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014645
14646fi
14647
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014648ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14649"
14650if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14651 ac_have_decl=1
14652else
14653 ac_have_decl=0
14654fi
14655
14656cat >>confdefs.h <<_ACEOF
14657#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14658_ACEOF
14659ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14660"
14661if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14662 ac_have_decl=1
14663else
14664 ac_have_decl=0
14665fi
14666
14667cat >>confdefs.h <<_ACEOF
14668#define HAVE_DECL_RTLD_NOW $ac_have_decl
14669_ACEOF
14670ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14671"
14672if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14673 ac_have_decl=1
14674else
14675 ac_have_decl=0
14676fi
14677
14678cat >>confdefs.h <<_ACEOF
14679#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14680_ACEOF
14681ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14682"
14683if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14684 ac_have_decl=1
14685else
14686 ac_have_decl=0
14687fi
14688
14689cat >>confdefs.h <<_ACEOF
14690#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14691_ACEOF
14692ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14693"
14694if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14695 ac_have_decl=1
14696else
14697 ac_have_decl=0
14698fi
14699
14700cat >>confdefs.h <<_ACEOF
14701#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14702_ACEOF
14703ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14704"
14705if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14706 ac_have_decl=1
14707else
14708 ac_have_decl=0
14709fi
14710
14711cat >>confdefs.h <<_ACEOF
14712#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14713_ACEOF
14714ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14715"
14716if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14717 ac_have_decl=1
14718else
14719 ac_have_decl=0
14720fi
14721
14722cat >>confdefs.h <<_ACEOF
14723#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14724_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014725ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14726"
14727if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14728 ac_have_decl=1
14729else
14730 ac_have_decl=0
14731fi
14732
14733cat >>confdefs.h <<_ACEOF
14734#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14735_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014736
14737
Mark Dickinsonbd792642009-03-18 20:06:12 +000014738# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14740$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014741# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014742if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014743 enableval=$enable_big_digits; case $enable_big_digits in
14744yes)
14745 enable_big_digits=30 ;;
14746no)
14747 enable_big_digits=15 ;;
1474815|30)
14749 ;;
14750*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014751 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 +000014752esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14754$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014755
14756cat >>confdefs.h <<_ACEOF
14757#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14758_ACEOF
14759
14760
14761else
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14763$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014764fi
14765
14766
Guido van Rossumef2255b2000-03-10 22:30:29 +000014767# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014768ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014769if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014770
14771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014773
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014774 wchar_h="yes"
14775
Guido van Rossumef2255b2000-03-10 22:30:29 +000014776else
Martin v. Löwis11437992002-04-12 09:54:03 +000014777 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014778
14779fi
14780
Michael W. Hudson54241132001-12-07 15:38:26 +000014781
Martin v. Löwis11437992002-04-12 09:54:03 +000014782
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014783# determine wchar_t size
14784if test "$wchar_h" = yes
14785then
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14789# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14791$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014792if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014794else
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14796"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
Martin v. Löwis11437992002-04-12 09:54:03 +000014798else
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 if test "$ac_cv_type_wchar_t" = yes; then
14800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014802as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014803See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804 else
14805 ac_cv_sizeof_wchar_t=0
14806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014808
Martin v. Löwis11437992002-04-12 09:54:03 +000014809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14811$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812
14813
14814
Martin v. Löwis11437992002-04-12 09:54:03 +000014815cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014816#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014817_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014818
Michael W. Hudson54241132001-12-07 15:38:26 +000014819
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014820fi
14821
Matthias Kloseb9621712010-04-24 17:59:49 +000014822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14823$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014824have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014826/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014827
14828#include <tcl.h>
14829#if TCL_UTF_MAX != 6
14830# error "NOT UCS4_TCL"
14831#endif
14832int
14833main ()
14834{
14835
14836 ;
14837 return 0;
14838}
14839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014841
14842
Matthias Kloseb9621712010-04-24 17:59:49 +000014843$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014844
14845 have_ucs4_tcl=yes
14846
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14850$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014851
Skip Montanaro6dead952003-09-25 14:50:04 +000014852# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014853if test "$wchar_h" = yes
14854then
14855 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14857$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014858 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014860else
14861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014863 ac_cv_wchar_t_signed=yes
14864else
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014866/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014867
14868 #include <wchar.h>
14869 int main()
14870 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014871 /* Success: exit code 0 */
14872 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014873 }
14874
14875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014876if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014877 ac_cv_wchar_t_signed=yes
14878else
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014883fi
14884
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014885fi
14886
Matthias Kloseb9621712010-04-24 17:59:49 +000014887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14888$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889fi
14890
Michael Osipov3738fad2018-08-24 18:17:19 +020014891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14892$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014893# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014894if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014895 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014896then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014899
Michael Osipov3738fad2018-08-24 18:17:19 +020014900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14901$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014902else
Michael Osipov3738fad2018-08-24 18:17:19 +020014903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14904$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014905fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014906
14907# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14909$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014910if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014912else
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 ac_cv_c_bigendian=unknown
14914 # See if we're dealing with a universal compiler.
14915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14916/* end confdefs.h. */
14917#ifndef __APPLE_CC__
14918 not a universal capable compiler
14919 #endif
14920 typedef int dummy;
14921
Skip Montanaro6dead952003-09-25 14:50:04 +000014922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014923if ac_fn_c_try_compile "$LINENO"; then :
14924
14925 # Check for potential -arch flags. It is not universal unless
14926 # there are at least two -arch flags with different values.
14927 ac_arch=
14928 ac_prev=
14929 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14930 if test -n "$ac_prev"; then
14931 case $ac_word in
14932 i?86 | x86_64 | ppc | ppc64)
14933 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14934 ac_arch=$ac_word
14935 else
14936 ac_cv_c_bigendian=universal
14937 break
14938 fi
14939 ;;
14940 esac
14941 ac_prev=
14942 elif test "x$ac_word" = "x-arch"; then
14943 ac_prev=arch
14944 fi
14945 done
14946fi
14947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14948 if test $ac_cv_c_bigendian = unknown; then
14949 # See if sys/param.h defines the BYTE_ORDER macro.
14950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014951/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014952#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014954
Martin v. Löwis11437992002-04-12 09:54:03 +000014955int
14956main ()
14957{
Matthias Kloseb9621712010-04-24 17:59:49 +000014958#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14959 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14960 && LITTLE_ENDIAN)
14961 bogus endian macros
14962 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
14964 ;
14965 return 0;
14966}
14967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014968if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014969 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014971/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014972#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014974
Martin v. Löwis11437992002-04-12 09:54:03 +000014975int
14976main ()
14977{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014978#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 not big endian
14980 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014981
14982 ;
14983 return 0;
14984}
14985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014986if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014987 ac_cv_c_bigendian=yes
14988else
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014992fi
14993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14994 fi
14995 if test $ac_cv_c_bigendian = unknown; then
14996 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014998/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014999#include <limits.h>
15000
Martin v. Löwis11437992002-04-12 09:54:03 +000015001int
15002main ()
15003{
Matthias Kloseb9621712010-04-24 17:59:49 +000015004#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15005 bogus endian macros
15006 #endif
15007
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 ;
15009 return 0;
15010}
15011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015012if ac_fn_c_try_compile "$LINENO"; then :
15013 # It does; now see whether it defined to _BIG_ENDIAN or not.
15014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15015/* end confdefs.h. */
15016#include <limits.h>
15017
15018int
15019main ()
15020{
15021#ifndef _BIG_ENDIAN
15022 not big endian
15023 #endif
15024
15025 ;
15026 return 0;
15027}
15028_ACEOF
15029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015031else
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15035fi
15036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15037 fi
15038 if test $ac_cv_c_bigendian = unknown; then
15039 # Compile a test program.
15040 if test "$cross_compiling" = yes; then :
15041 # Try to guess by grepping values from an object file.
15042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15043/* end confdefs.h. */
15044short int ascii_mm[] =
15045 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15046 short int ascii_ii[] =
15047 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15048 int use_ascii (int i) {
15049 return ascii_mm[i] + ascii_ii[i];
15050 }
15051 short int ebcdic_ii[] =
15052 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15053 short int ebcdic_mm[] =
15054 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15055 int use_ebcdic (int i) {
15056 return ebcdic_mm[i] + ebcdic_ii[i];
15057 }
15058 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059
Matthias Kloseb9621712010-04-24 17:59:49 +000015060int
15061main ()
15062{
15063return use_ascii (foo) == use_ebcdic (foo);
15064 ;
15065 return 0;
15066}
15067_ACEOF
15068if ac_fn_c_try_compile "$LINENO"; then :
15069 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15070 ac_cv_c_bigendian=yes
15071 fi
15072 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15073 if test "$ac_cv_c_bigendian" = unknown; then
15074 ac_cv_c_bigendian=no
15075 else
15076 # finding both strings is unlikely to happen, but who knows?
15077 ac_cv_c_bigendian=unknown
15078 fi
15079 fi
15080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015082else
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015084/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015086int
15087main ()
15088{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 /* Are we little or big endian? From Harbison&Steele. */
15091 union
15092 {
15093 long int l;
15094 char c[sizeof (long int)];
15095 } u;
15096 u.l = 1;
15097 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015098
15099 ;
15100 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015101}
Martin v. Löwis11437992002-04-12 09:54:03 +000015102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015103if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015104 ac_cv_c_bigendian=no
15105else
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15109 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15115$as_echo "$ac_cv_c_bigendian" >&6; }
15116 case $ac_cv_c_bigendian in #(
15117 yes)
15118 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15119;; #(
15120 no)
15121 ;; #(
15122 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015123
Matthias Kloseb9621712010-04-24 17:59:49 +000015124$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015125
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 ;; #(
15127 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015128 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015129 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015131
Michael W. Hudson54241132001-12-07 15:38:26 +000015132
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015133# ABI version string for Python extension modules. This appears between the
15134# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15135# from the following attributes which affect the ABI of this Python build (in
15136# this order):
15137#
15138# * The Python implementation (always 'cpython-' for us)
15139# * The major and minor version numbers
15140# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015141#
15142# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015143# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15144# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015145#
15146# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15147# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015148
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15150$as_echo_n "checking ABIFLAGS... " >&6; }
15151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15152$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15154$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015155SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15157$as_echo "$SOABI" >&6; }
15158
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015159# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15160if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015161 # Similar to SOABI but remove "d" flag from ABIFLAGS
15162
15163 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15164
15165cat >>confdefs.h <<_ACEOF
15166#define ALT_SOABI "${ALT_SOABI}"
15167_ACEOF
15168
15169fi
15170
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015171
15172case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015173 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015174 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15175 *)
15176 EXT_SUFFIX=${SHLIB_SUFFIX};;
15177esac
15178
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15180$as_echo_n "checking LDVERSION... " >&6; }
15181LDVERSION='$(VERSION)$(ABIFLAGS)'
15182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15183$as_echo "$LDVERSION" >&6; }
15184
E. M. Brayc994c8f2019-05-24 17:33:47 +020015185# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015186
E. M. Brayb1fc4172019-05-24 18:39:39 +020015187if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015188 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015189else
15190 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015191fi
15192
doko@python.org87421192013-01-26 11:39:31 +010015193
doko@ubuntu.com55532312016-06-14 08:55:19 +020015194if test x$PLATFORM_TRIPLET = x; then
15195 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15196else
15197 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15198fi
doko@python.org87421192013-01-26 11:39:31 +010015199
15200
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015201# Check whether right shifting a negative integer extends the sign bit
15202# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15204$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015205if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015207else
Martin v. Löwis11437992002-04-12 09:54:03 +000015208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015210 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015211else
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015213/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015214
15215int main()
15216{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015217 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015218}
15219
Martin v. Löwis11437992002-04-12 09:54:03 +000015220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015221if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015222 ac_cv_rshift_extends_sign=yes
15223else
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15227 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015228fi
15229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230fi
15231
Matthias Kloseb9621712010-04-24 17:59:49 +000015232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15233$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015234if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015235then
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015238
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015239fi
15240
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015241# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15243$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015244if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015246else
Martin v. Löwis11437992002-04-12 09:54:03 +000015247
Matthias Kloseb9621712010-04-24 17:59:49 +000015248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015250#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015251int
15252main ()
15253{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015254
15255 FILE *f = fopen("/dev/null", "r");
15256 flockfile(f);
15257 getc_unlocked(f);
15258 funlockfile(f);
15259
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 ;
15261 return 0;
15262}
15263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015264if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015265 ac_cv_have_getc_unlocked=yes
15266else
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 ac_cv_have_getc_unlocked=no
15268fi
15269rm -f core conftest.err conftest.$ac_objext \
15270 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015272
Matthias Kloseb9621712010-04-24 17:59:49 +000015273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15274$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015275if test "$ac_cv_have_getc_unlocked" = yes
15276then
Martin v. Löwis11437992002-04-12 09:54:03 +000015277
Matthias Kloseb9621712010-04-24 17:59:49 +000015278$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015279
15280fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015281
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015282# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015283# save the value of LIBS so we don't actually link Python with readline
15284LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015285
Gregory P. Smith18820942008-09-07 06:24:49 +000015286# On some systems we need to link readline to a termcap compatible
15287# library. NOTE: Keep the precedence of listed libraries synchronised
15288# with setup.py.
15289py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15291$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015292for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015293 if test -z "$py_libtermcap"; then
15294 READLINE_LIBS="-lreadline"
15295 else
15296 READLINE_LIBS="-lreadline -l$py_libtermcap"
15297 fi
15298 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015300/* end confdefs.h. */
15301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302/* Override any GCC internal prototype to avoid an error.
15303 Use char because int might match the return type of a GCC
15304 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015305#ifdef __cplusplus
15306extern "C"
15307#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015308char readline ();
15309int
15310main ()
15311{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015313 ;
15314 return 0;
15315}
15316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015317if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015318 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015320rm -f core conftest.err conftest.$ac_objext \
15321 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015322 if test $py_cv_lib_readline = yes; then
15323 break
15324 fi
15325done
15326# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15327#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015328if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15330$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015331else
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15333$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015336
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015337fi
15338
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015339# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015341/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015342#include <readline/readline.h>
15343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015344if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015345 have_readline=yes
15346else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015347 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015348
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015349fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015350rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015351if test $have_readline = yes
15352then
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015354/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015355#include <readline/readline.h>
15356
15357_ACEOF
15358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015359 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015360
Matthias Kloseb9621712010-04-24 17:59:49 +000015361$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015362
15363fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015364rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015365
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015367/* end confdefs.h. */
15368#include <readline/readline.h>
15369
15370_ACEOF
15371if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015372 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015373
Matthias Kloseb9621712010-04-24 17:59:49 +000015374$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015375
15376fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015377rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015378
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015379fi
15380
Martin v. Löwis0daad592001-09-30 21:09:59 +000015381# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15383$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015384if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015386else
Martin v. Löwis11437992002-04-12 09:54:03 +000015387 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015388LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015391
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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015395#ifdef __cplusplus
15396extern "C"
15397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015398char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015399int
15400main ()
15401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 ;
15404 return 0;
15405}
15406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015407if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015409else
Matthias Kloseb9621712010-04-24 17:59:49 +000015410 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015412rm -f core conftest.err conftest.$ac_objext \
15413 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015414LIBS=$ac_check_lib_save_LIBS
15415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15417$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015418if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015419
Matthias Kloseb9621712010-04-24 17:59:49 +000015420$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015421
Martin v. Löwis0daad592001-09-30 21:09:59 +000015422fi
15423
Michael W. Hudson54241132001-12-07 15:38:26 +000015424
Thomas Wouters89d996e2007-09-08 17:39:28 +000015425# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15427$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015428if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015429 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015430else
15431 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015432LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015434/* end confdefs.h. */
15435
15436/* Override any GCC internal prototype to avoid an error.
15437 Use char because int might match the return type of a GCC
15438 builtin and then its argument prototype would still apply. */
15439#ifdef __cplusplus
15440extern "C"
15441#endif
15442char rl_completion_display_matches_hook ();
15443int
15444main ()
15445{
15446return rl_completion_display_matches_hook ();
15447 ;
15448 return 0;
15449}
15450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015451if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015452 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15453else
Matthias Kloseb9621712010-04-24 17:59:49 +000015454 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015456rm -f core conftest.err conftest.$ac_objext \
15457 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015458LIBS=$ac_check_lib_save_LIBS
15459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15461$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015462if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015463
Matthias Kloseb9621712010-04-24 17:59:49 +000015464$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015465
15466fi
15467
15468
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015469# also in 4.0, but not in editline
15470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15471$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15472if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15473 $as_echo_n "(cached) " >&6
15474else
15475 ac_check_lib_save_LIBS=$LIBS
15476LIBS="-lreadline $READLINE_LIBS $LIBS"
15477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15478/* end confdefs.h. */
15479
15480/* Override any GCC internal prototype to avoid an error.
15481 Use char because int might match the return type of a GCC
15482 builtin and then its argument prototype would still apply. */
15483#ifdef __cplusplus
15484extern "C"
15485#endif
15486char rl_resize_terminal ();
15487int
15488main ()
15489{
15490return rl_resize_terminal ();
15491 ;
15492 return 0;
15493}
15494_ACEOF
15495if ac_fn_c_try_link "$LINENO"; then :
15496 ac_cv_lib_readline_rl_resize_terminal=yes
15497else
15498 ac_cv_lib_readline_rl_resize_terminal=no
15499fi
15500rm -f core conftest.err conftest.$ac_objext \
15501 conftest$ac_exeext conftest.$ac_ext
15502LIBS=$ac_check_lib_save_LIBS
15503fi
15504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15505$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15506if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15507
15508$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15509
15510fi
15511
15512
Martin v. Löwis0daad592001-09-30 21:09:59 +000015513# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15515$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015516if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015518else
Martin v. Löwis11437992002-04-12 09:54:03 +000015519 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015520LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524/* Override any GCC internal prototype to avoid an error.
15525 Use char because int might match the return type of a GCC
15526 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015527#ifdef __cplusplus
15528extern "C"
15529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015530char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015531int
15532main ()
15533{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015534return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015535 ;
15536 return 0;
15537}
15538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015539if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015541else
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015544rm -f core conftest.err conftest.$ac_objext \
15545 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015546LIBS=$ac_check_lib_save_LIBS
15547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15549$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015550if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015551
Matthias Kloseb9621712010-04-24 17:59:49 +000015552$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015553
Guido van Rossum353ae582001-07-10 16:45:32 +000015554fi
15555
Jack Jansendd19cf82001-12-06 22:36:17 +000015556
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015557# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015559/* end confdefs.h. */
15560#include <readline/readline.h>
15561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015562if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015563 have_readline=yes
15564else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015565 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015566
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015567fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015568rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015569if test $have_readline = yes
15570then
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015572/* end confdefs.h. */
15573#include <readline/readline.h>
15574
15575_ACEOF
15576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015577 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015578
Matthias Kloseb9621712010-04-24 17:59:49 +000015579$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015580
15581fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015582rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015583
15584fi
15585
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15587$as_echo_n "checking for append_history in -lreadline... " >&6; }
15588if ${ac_cv_lib_readline_append_history+:} false; then :
15589 $as_echo_n "(cached) " >&6
15590else
15591 ac_check_lib_save_LIBS=$LIBS
15592LIBS="-lreadline $READLINE_LIBS $LIBS"
15593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15594/* end confdefs.h. */
15595
15596/* Override any GCC internal prototype to avoid an error.
15597 Use char because int might match the return type of a GCC
15598 builtin and then its argument prototype would still apply. */
15599#ifdef __cplusplus
15600extern "C"
15601#endif
15602char append_history ();
15603int
15604main ()
15605{
15606return append_history ();
15607 ;
15608 return 0;
15609}
15610_ACEOF
15611if ac_fn_c_try_link "$LINENO"; then :
15612 ac_cv_lib_readline_append_history=yes
15613else
15614 ac_cv_lib_readline_append_history=no
15615fi
15616rm -f core conftest.err conftest.$ac_objext \
15617 conftest$ac_exeext conftest.$ac_ext
15618LIBS=$ac_check_lib_save_LIBS
15619fi
15620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15621$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15622if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15623
15624$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15625
15626fi
15627
15628
Martin v. Löwis82bca632006-02-10 20:49:30 +000015629# End of readline checks: restore LIBS
15630LIBS=$LIBS_no_readline
15631
Matthias Kloseb9621712010-04-24 17:59:49 +000015632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15633$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015634if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015636else
Martin v. Löwis11437992002-04-12 09:54:03 +000015637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015639 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015640else
Matthias Kloseb9621712010-04-24 17:59:49 +000015641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015642/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015643
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015644#include <stdlib.h>
15645#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015646int main()
15647{
15648 int val1 = nice(1);
15649 if (val1 != -1 && val1 == nice(2))
15650 exit(0);
15651 exit(1);
15652}
15653
Martin v. Löwis11437992002-04-12 09:54:03 +000015654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015655if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015656 ac_cv_broken_nice=yes
15657else
Matthias Kloseb9621712010-04-24 17:59:49 +000015658 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015662fi
15663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664fi
15665
Matthias Kloseb9621712010-04-24 17:59:49 +000015666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15667$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015668if test "$ac_cv_broken_nice" = yes
15669then
Martin v. Löwis11437992002-04-12 09:54:03 +000015670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015672
15673fi
15674
Matthias Kloseb9621712010-04-24 17:59:49 +000015675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15676$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015677if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015679else
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015681 ac_cv_broken_poll=no
15682else
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015684/* end confdefs.h. */
15685
15686#include <poll.h>
15687
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015688int main()
15689{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015690 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015691 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015692
15693 close (42);
15694
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015695 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015696 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015697 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015698 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015699 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015700 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015701 return 1;
15702}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015703
15704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015705if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015706 ac_cv_broken_poll=yes
15707else
Matthias Kloseb9621712010-04-24 17:59:49 +000015708 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15711 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015714fi
15715
Matthias Kloseb9621712010-04-24 17:59:49 +000015716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15717$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015718if test "$ac_cv_broken_poll" = yes
15719then
15720
Matthias Kloseb9621712010-04-24 17:59:49 +000015721$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015722
15723fi
15724
Martin v. Löwis1d459062005-03-14 21:23:33 +000015725# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15727$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015728if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015729 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015730else
15731
Matthias Kloseb9621712010-04-24 17:59:49 +000015732if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015733 ac_cv_working_tzset=no
15734else
Matthias Kloseb9621712010-04-24 17:59:49 +000015735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015736/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015737
15738#include <stdlib.h>
15739#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015740#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015741
15742#if HAVE_TZNAME
15743extern char *tzname[];
15744#endif
15745
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015746int main()
15747{
Brett Cannon18367812003-09-19 00:59:16 +000015748 /* Note that we need to ensure that not only does tzset(3)
15749 do 'something' with localtime, but it works as documented
15750 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015751 This includes making sure that tzname is set properly if
15752 tm->tm_zone does not exist since it is the alternative way
15753 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015754
15755 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015756 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015757 */
15758
Martin v. Löwis1d459062005-03-14 21:23:33 +000015759 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015760 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15761
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015762 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015763 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015764 if (localtime(&groundhogday)->tm_hour != 0)
15765 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015766#if HAVE_TZNAME
15767 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15768 if (strcmp(tzname[0], "UTC") ||
15769 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15770 exit(1);
15771#endif
Brett Cannon18367812003-09-19 00:59:16 +000015772
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015773 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015774 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015775 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015776 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015777#if HAVE_TZNAME
15778 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15779 exit(1);
15780#endif
Brett Cannon18367812003-09-19 00:59:16 +000015781
15782 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15783 tzset();
15784 if (localtime(&groundhogday)->tm_hour != 11)
15785 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015786#if HAVE_TZNAME
15787 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15788 exit(1);
15789#endif
15790
15791#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015792 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15793 exit(1);
15794 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15795 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015796#endif
Brett Cannon18367812003-09-19 00:59:16 +000015797
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015798 exit(0);
15799}
15800
15801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015802if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015803 ac_cv_working_tzset=yes
15804else
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015809fi
15810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015811fi
15812
Matthias Kloseb9621712010-04-24 17:59:49 +000015813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15814$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015815if test "$ac_cv_working_tzset" = yes
15816then
15817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015819
15820fi
15821
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015822# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15824$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015825if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015826 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015827else
Matthias Kloseb9621712010-04-24 17:59:49 +000015828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015829/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015830#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015831int
15832main ()
15833{
15834
15835struct stat st;
15836st.st_mtim.tv_nsec = 1;
15837
15838 ;
15839 return 0;
15840}
15841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015842if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015843 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015844else
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15848fi
15849
Matthias Kloseb9621712010-04-24 17:59:49 +000015850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15851$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015852if test "$ac_cv_stat_tv_nsec" = yes
15853then
15854
Matthias Kloseb9621712010-04-24 17:59:49 +000015855$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015856
15857fi
15858
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015859# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15861$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015862if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015864else
Matthias Kloseb9621712010-04-24 17:59:49 +000015865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015866/* end confdefs.h. */
15867#include <sys/stat.h>
15868int
15869main ()
15870{
15871
15872struct stat st;
15873st.st_mtimespec.tv_nsec = 1;
15874
15875 ;
15876 return 0;
15877}
15878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015879if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015880 ac_cv_stat_tv_nsec2=yes
15881else
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15885fi
15886
Matthias Kloseb9621712010-04-24 17:59:49 +000015887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15888$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015889if test "$ac_cv_stat_tv_nsec2" = yes
15890then
15891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015893
15894fi
15895
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015896# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015897ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015898if test "$cross_compiling" = no; then
15899 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15900fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015901
15902for ac_header in curses.h ncurses.h
15903do :
15904 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15905ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15906if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15907 cat >>confdefs.h <<_ACEOF
15908#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15909_ACEOF
15910
15911fi
15912
15913done
15914
15915
15916# On Solaris, term.h requires curses.h
15917for ac_header in term.h
15918do :
15919 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15920#ifdef HAVE_CURSES_H
15921#include <curses.h>
15922#endif
15923
15924"
15925if test "x$ac_cv_header_term_h" = xyes; then :
15926 cat >>confdefs.h <<_ACEOF
15927#define HAVE_TERM_H 1
15928_ACEOF
15929
15930fi
15931
15932done
15933
15934
Jack Jansen666b1e72001-10-31 12:11:48 +000015935# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15937$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015938if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015939 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015940else
Matthias Kloseb9621712010-04-24 17:59:49 +000015941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015942/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015943#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015944int
15945main ()
15946{
Jack Jansen666b1e72001-10-31 12:11:48 +000015947
15948 int rtn;
15949 rtn = mvwdelch(0,0,0);
15950
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 ;
15952 return 0;
15953}
15954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015955if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015956 ac_cv_mvwdelch_is_expression=yes
15957else
Matthias Kloseb9621712010-04-24 17:59:49 +000015958 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15961fi
15962
Matthias Kloseb9621712010-04-24 17:59:49 +000015963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15964$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015965
15966if test "$ac_cv_mvwdelch_is_expression" = yes
15967then
Martin v. Löwis11437992002-04-12 09:54:03 +000015968
Matthias Kloseb9621712010-04-24 17:59:49 +000015969$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015970
15971fi
15972
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015973# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15974# structs since version 5.7. If the macro is defined as zero before including
15975# [n]curses.h, ncurses will expose fields of the structs regardless of the
15976# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15978$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015979if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015980 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015981else
Matthias Kloseb9621712010-04-24 17:59:49 +000015982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015983/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015984
15985 #define NCURSES_OPAQUE 0
15986 #include <curses.h>
15987
Martin v. Löwis11437992002-04-12 09:54:03 +000015988int
15989main ()
15990{
Jack Jansen666b1e72001-10-31 12:11:48 +000015991
15992 WINDOW *w;
15993 w->_flags = 0;
15994
Martin v. Löwis11437992002-04-12 09:54:03 +000015995 ;
15996 return 0;
15997}
15998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015999if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016000 ac_cv_window_has_flags=yes
16001else
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16005fi
16006
Matthias Kloseb9621712010-04-24 17:59:49 +000016007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16008$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016009
Jack Jansen666b1e72001-10-31 12:11:48 +000016010
16011if test "$ac_cv_window_has_flags" = yes
16012then
Martin v. Löwis11437992002-04-12 09:54:03 +000016013
Matthias Kloseb9621712010-04-24 17:59:49 +000016014$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016015
16016fi
16017
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16019$as_echo_n "checking for is_pad... " >&6; }
16020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16021/* end confdefs.h. */
16022#include <curses.h>
16023int
16024main ()
16025{
16026
16027#ifndef is_pad
16028void *x=is_pad
16029#endif
16030
16031 ;
16032 return 0;
16033}
16034_ACEOF
16035if ac_fn_c_try_compile "$LINENO"; then :
16036
16037$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16038
16039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16040$as_echo "yes" >&6; }
16041else
16042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16043$as_echo "no" >&6; }
16044
16045fi
16046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16047
Matthias Kloseb9621712010-04-24 17:59:49 +000016048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16049$as_echo_n "checking for is_term_resized... " >&6; }
16050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016051/* end confdefs.h. */
16052#include <curses.h>
16053int
16054main ()
16055{
16056void *x=is_term_resized
16057 ;
16058 return 0;
16059}
16060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016061if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016062
Matthias Kloseb9621712010-04-24 17:59:49 +000016063$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016064
Matthias Kloseb159a552010-04-25 21:00:44 +000016065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016066$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016067else
Matthias Kloseb9621712010-04-24 17:59:49 +000016068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16069$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016070
16071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16073
Matthias Kloseb9621712010-04-24 17:59:49 +000016074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16075$as_echo_n "checking for resize_term... " >&6; }
16076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016077/* end confdefs.h. */
16078#include <curses.h>
16079int
16080main ()
16081{
16082void *x=resize_term
16083 ;
16084 return 0;
16085}
16086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016087if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016088
Matthias Kloseb9621712010-04-24 17:59:49 +000016089$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016090
Matthias Kloseb159a552010-04-25 21:00:44 +000016091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016092$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016093else
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16095$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016096
16097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16099
Matthias Kloseb9621712010-04-24 17:59:49 +000016100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16101$as_echo_n "checking for resizeterm... " >&6; }
16102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016103/* end confdefs.h. */
16104#include <curses.h>
16105int
16106main ()
16107{
16108void *x=resizeterm
16109 ;
16110 return 0;
16111}
16112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016113if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016116
Matthias Kloseb159a552010-04-25 21:00:44 +000016117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016118$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016119else
Matthias Kloseb9621712010-04-24 17:59:49 +000016120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16121$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016122
16123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016125
16126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16127$as_echo_n "checking for immedok... " >&6; }
16128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16129/* end confdefs.h. */
16130#include <curses.h>
16131int
16132main ()
16133{
16134
16135#ifndef immedok
16136void *x=immedok
16137#endif
16138
16139 ;
16140 return 0;
16141}
16142_ACEOF
16143if ac_fn_c_try_compile "$LINENO"; then :
16144
16145$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16146
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16148$as_echo "yes" >&6; }
16149else
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16151$as_echo "no" >&6; }
16152
16153fi
16154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16155
16156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16157$as_echo_n "checking for syncok... " >&6; }
16158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16159/* end confdefs.h. */
16160#include <curses.h>
16161int
16162main ()
16163{
16164
16165#ifndef syncok
16166void *x=syncok
16167#endif
16168
16169 ;
16170 return 0;
16171}
16172_ACEOF
16173if ac_fn_c_try_compile "$LINENO"; then :
16174
16175$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16176
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16178$as_echo "yes" >&6; }
16179else
16180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16181$as_echo "no" >&6; }
16182
16183fi
16184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16185
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16187$as_echo_n "checking for wchgat... " >&6; }
16188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16189/* end confdefs.h. */
16190#include <curses.h>
16191int
16192main ()
16193{
16194
16195#ifndef wchgat
16196void *x=wchgat
16197#endif
16198
16199 ;
16200 return 0;
16201}
16202_ACEOF
16203if ac_fn_c_try_compile "$LINENO"; then :
16204
16205$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16206
16207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16208$as_echo "yes" >&6; }
16209else
16210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16211$as_echo "no" >&6; }
16212
16213fi
16214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16215
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16217$as_echo_n "checking for filter... " >&6; }
16218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16219/* end confdefs.h. */
16220#include <curses.h>
16221int
16222main ()
16223{
16224
16225#ifndef filter
16226void *x=filter
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_FILTER 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 has_key" >&5
16247$as_echo_n "checking for has_key... " >&6; }
16248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16249/* end confdefs.h. */
16250#include <curses.h>
16251int
16252main ()
16253{
16254
16255#ifndef has_key
16256void *x=has_key
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_HAS_KEY 1" >>confdefs.h
16266
16267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16268$as_echo "yes" >&6; }
16269else
16270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16271$as_echo "no" >&6; }
16272
16273fi
16274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16275
16276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16277$as_echo_n "checking for typeahead... " >&6; }
16278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16279/* end confdefs.h. */
16280#include <curses.h>
16281int
16282main ()
16283{
16284
16285#ifndef typeahead
16286void *x=typeahead
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_TYPEAHEAD 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
16306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16307$as_echo_n "checking for use_env... " >&6; }
16308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16309/* end confdefs.h. */
16310#include <curses.h>
16311int
16312main ()
16313{
16314
16315#ifndef use_env
16316void *x=use_env
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_USE_ENV 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
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016335# last curses configure check
16336CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016337
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16339$as_echo "$as_me: checking for device files" >&6;}
16340
16341if test "x$cross_compiling" = xyes; then
16342 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16344$as_echo_n "checking for /dev/ptmx... " >&6; }
16345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16346$as_echo "not set" >&6; }
16347 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16348 fi
16349 if test "${ac_cv_file__dev_ptc+set}" != set; then
16350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16351$as_echo_n "checking for /dev/ptc... " >&6; }
16352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16353$as_echo "not set" >&6; }
16354 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16355 fi
16356fi
16357
Matthias Kloseb9621712010-04-24 17:59:49 +000016358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16359$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016360if ${ac_cv_file__dev_ptmx+:} false; then :
16361 $as_echo_n "(cached) " >&6
16362else
16363 test "$cross_compiling" = yes &&
16364 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16365if test -r "/dev/ptmx"; then
16366 ac_cv_file__dev_ptmx=yes
16367else
16368 ac_cv_file__dev_ptmx=no
16369fi
16370fi
16371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16372$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16373if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016374
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016375fi
16376
16377if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016378
Matthias Kloseb9621712010-04-24 17:59:49 +000016379$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016380
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16383$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016384if ${ac_cv_file__dev_ptc+:} false; then :
16385 $as_echo_n "(cached) " >&6
16386else
16387 test "$cross_compiling" = yes &&
16388 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16389if test -r "/dev/ptc"; then
16390 ac_cv_file__dev_ptc=yes
16391else
16392 ac_cv_file__dev_ptc=no
16393fi
16394fi
16395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16396$as_echo "$ac_cv_file__dev_ptc" >&6; }
16397if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016398
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016399fi
16400
16401if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016402
Matthias Kloseb9621712010-04-24 17:59:49 +000016403$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016404
Neal Norwitz865400f2003-03-21 01:42:58 +000016405fi
16406
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016407if test $ac_sys_system = Darwin
16408then
16409 LIBS="$LIBS -framework CoreFoundation"
16410fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016411
Matthias Kloseb9621712010-04-24 17:59:49 +000016412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16413$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016414if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016415 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016416else
Matthias Kloseb9621712010-04-24 17:59:49 +000016417 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016418 ac_cv_have_size_t_format="cross -- assuming yes"
16419
Thomas Wouters477c8d52006-05-27 19:21:47 +000016420else
Matthias Kloseb9621712010-04-24 17:59:49 +000016421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016422/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016423
Thomas Wouters477c8d52006-05-27 19:21:47 +000016424#include <stdio.h>
16425#include <stddef.h>
16426#include <string.h>
16427
Christian Heimes2c181612007-12-17 20:04:13 +000016428#ifdef HAVE_SYS_TYPES_H
16429#include <sys/types.h>
16430#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016431
16432#ifdef HAVE_SSIZE_T
16433typedef ssize_t Py_ssize_t;
16434#elif SIZEOF_VOID_P == SIZEOF_LONG
16435typedef long Py_ssize_t;
16436#else
16437typedef int Py_ssize_t;
16438#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016439
Christian Heimes2c181612007-12-17 20:04:13 +000016440int main()
16441{
16442 char buffer[256];
16443
Thomas Wouters477c8d52006-05-27 19:21:47 +000016444 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16445 return 1;
16446
Thomas Wouters89f507f2006-12-13 04:49:30 +000016447 if (strcmp(buffer, "123"))
16448 return 1;
16449
16450 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16451 return 1;
16452
16453 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016454 return 1;
16455
16456 return 0;
16457}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016458
Thomas Wouters477c8d52006-05-27 19:21:47 +000016459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016460if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016461 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016462else
Matthias Kloseb9621712010-04-24 17:59:49 +000016463 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16466 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016467fi
16468
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16471$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016472if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016473
Matthias Kloseb9621712010-04-24 17:59:49 +000016474$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016475
16476fi
16477
Matthias Kloseb9621712010-04-24 17:59:49 +000016478ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016479#ifdef HAVE_SYS_TYPES_H
16480#include <sys/types.h>
16481#endif
16482#ifdef HAVE_SYS_SOCKET_H
16483#include <sys/socket.h>
16484#endif
16485
Matthias Kloseb9621712010-04-24 17:59:49 +000016486"
Victor Stinnere0be4232011-10-25 13:06:09 +020016487if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016488
Martin v. Löwis11437992002-04-12 09:54:03 +000016489else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016490
Matthias Kloseb9621712010-04-24 17:59:49 +000016491$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016492
16493fi
16494
Michael W. Hudson54241132001-12-07 15:38:26 +000016495
Matthias Kloseb9621712010-04-24 17:59:49 +000016496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16497$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016498if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016499 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016500else
Matthias Kloseb9621712010-04-24 17:59:49 +000016501 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016502 ac_cv_broken_mbstowcs=no
16503else
Matthias Kloseb9621712010-04-24 17:59:49 +000016504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016505/* end confdefs.h. */
16506
Stefan Krah19c21392012-11-22 23:47:32 +010016507#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016508#include<stdlib.h>
16509int main() {
16510 size_t len = -1;
16511 const char *str = "text";
16512 len = mbstowcs(NULL, str, 0);
16513 return (len != 4);
16514}
16515
16516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016517if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016518 ac_cv_broken_mbstowcs=no
16519else
Matthias Kloseb9621712010-04-24 17:59:49 +000016520 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16523 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016524fi
16525
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016526fi
16527
Matthias Kloseb9621712010-04-24 17:59:49 +000016528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16529$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016530if test "$ac_cv_broken_mbstowcs" = yes
16531then
16532
Matthias Kloseb9621712010-04-24 17:59:49 +000016533$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016534
16535fi
16536
Antoine Pitroub52ec782009-01-25 16:34:23 +000016537# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16539$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016540
16541# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016542if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016543 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016544if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016545then
16546
Matthias Kloseb9621712010-04-24 17:59:49 +000016547$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016548
Matthias Kloseb9621712010-04-24 17:59:49 +000016549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16550$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016551fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016552if test "$withval" = no
16553then
16554
16555$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16556
Matthias Kloseb9621712010-04-24 17:59:49 +000016557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16558$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016559fi
16560
Antoine Pitrou042b1282010-08-13 21:15:58 +000016561else
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16563$as_echo "no value specified" >&6; }
16564fi
16565
Antoine Pitroub52ec782009-01-25 16:34:23 +000016566
Matthias Kloseb17289e2012-03-15 19:51:34 +010016567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16568$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16569if ${ac_cv_computed_gotos+:} false; then :
16570 $as_echo_n "(cached) " >&6
16571else
16572 if test "$cross_compiling" = yes; then :
16573 if test "${with_computed_gotos+set}" = set; then
16574 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16575 else
16576 ac_cv_computed_gotos=no
16577 fi
16578else
16579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16580/* end confdefs.h. */
16581
16582int main(int argc, char **argv)
16583{
16584 static void *targets[1] = { &&LABEL1 };
16585 goto LABEL2;
16586LABEL1:
16587 return 0;
16588LABEL2:
16589 goto *targets[0];
16590 return 1;
16591}
16592
16593_ACEOF
16594if ac_fn_c_try_run "$LINENO"; then :
16595 ac_cv_computed_gotos=yes
16596else
16597 ac_cv_computed_gotos=no
16598fi
16599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16600 conftest.$ac_objext conftest.beam conftest.$ac_ext
16601fi
16602
16603fi
16604
16605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16606$as_echo "$ac_cv_computed_gotos" >&6; }
16607case "$ac_cv_computed_gotos" in yes*)
16608
16609$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16610
16611esac
16612
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016613case $ac_sys_system in
16614AIX*)
16615
16616$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16617 ;;
16618esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016619
Michael W. Hudson54241132001-12-07 15:38:26 +000016620
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016621
16622
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016623for h in `(cd $srcdir;echo Python/thread_*.h)`
16624do
16625 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16626done
16627
Michael W. Hudson54241132001-12-07 15:38:26 +000016628
Victor Stinner21a74a92019-04-11 22:28:12 +020016629SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16631$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016632for dir in $SRCDIRS; do
16633 if test ! -d $dir; then
16634 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016635 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016636done
Matthias Kloseb9621712010-04-24 17:59:49 +000016637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16638$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016639
Stefan Krah1919b7e2012-03-21 18:25:23 +010016640# Availability of -O2:
16641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16642$as_echo_n "checking for -O2... " >&6; }
16643saved_cflags="$CFLAGS"
16644CFLAGS="-O2"
16645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16646/* end confdefs.h. */
16647
16648int
16649main ()
16650{
16651
16652
16653 ;
16654 return 0;
16655}
16656_ACEOF
16657if ac_fn_c_try_compile "$LINENO"; then :
16658 have_O2=yes
16659else
16660 have_O2=no
16661fi
16662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16664$as_echo "$have_O2" >&6; }
16665CFLAGS="$saved_cflags"
16666
16667# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16668# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16670$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16671saved_cflags="$CFLAGS"
16672CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16673if test "$have_O2" = no; then
16674 CFLAGS=""
16675fi
16676if test "$cross_compiling" = yes; then :
16677 have_glibc_memmove_bug=undefined
16678else
16679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16680/* end confdefs.h. */
16681
16682#include <stdio.h>
16683#include <stdlib.h>
16684#include <string.h>
16685void foo(void *p, void *q) { memmove(p, q, 19); }
16686int main() {
16687 char a[32] = "123456789000000000";
16688 foo(&a[9], a);
16689 if (strcmp(a, "123456789123456789000000000") != 0)
16690 return 1;
16691 foo(a, &a[9]);
16692 if (strcmp(a, "123456789000000000") != 0)
16693 return 1;
16694 return 0;
16695}
16696
16697_ACEOF
16698if ac_fn_c_try_run "$LINENO"; then :
16699 have_glibc_memmove_bug=no
16700else
16701 have_glibc_memmove_bug=yes
16702fi
16703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16704 conftest.$ac_objext conftest.beam conftest.$ac_ext
16705fi
16706
16707CFLAGS="$saved_cflags"
16708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16709$as_echo "$have_glibc_memmove_bug" >&6; }
16710if test "$have_glibc_memmove_bug" = yes; then
16711
16712$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16713
16714fi
16715
16716if test "$have_gcc_asm_for_x87" = yes; then
16717 # Some versions of gcc miscompile inline asm:
16718 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16719 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16720 case $CC in
16721 *gcc*)
16722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16723$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16724 saved_cflags="$CFLAGS"
16725 CFLAGS="-O2"
16726 if test "$cross_compiling" = yes; then :
16727 have_ipa_pure_const_bug=undefined
16728else
16729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16730/* end confdefs.h. */
16731
16732 __attribute__((noinline)) int
16733 foo(int *p) {
16734 int r;
16735 asm ( "movl \$6, (%1)\n\t"
16736 "xorl %0, %0\n\t"
16737 : "=r" (r) : "r" (p) : "memory"
16738 );
16739 return r;
16740 }
16741 int main() {
16742 int p = 8;
16743 if ((foo(&p) ? : p) != 6)
16744 return 1;
16745 return 0;
16746 }
16747
16748_ACEOF
16749if ac_fn_c_try_run "$LINENO"; then :
16750 have_ipa_pure_const_bug=no
16751else
16752 have_ipa_pure_const_bug=yes
16753fi
16754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16755 conftest.$ac_objext conftest.beam conftest.$ac_ext
16756fi
16757
16758 CFLAGS="$saved_cflags"
16759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16760$as_echo "$have_ipa_pure_const_bug" >&6; }
16761 if test "$have_ipa_pure_const_bug" = yes; then
16762
16763$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16764
16765 fi
16766 ;;
16767 esac
16768fi
16769
Victor Stinner4f5366e2015-01-09 02:13:19 +010016770# Check for stdatomic.h
16771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16772$as_echo_n "checking for stdatomic.h... " >&6; }
16773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16774/* end confdefs.h. */
16775
16776
16777 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016778 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016779 int main() {
16780 int loaded_value = atomic_load(&value);
16781 return 0;
16782 }
16783
16784
16785_ACEOF
16786if ac_fn_c_try_link "$LINENO"; then :
16787 have_stdatomic_h=yes
16788else
16789 have_stdatomic_h=no
16790fi
16791rm -f core conftest.err conftest.$ac_objext \
16792 conftest$ac_exeext conftest.$ac_ext
16793
16794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16795$as_echo "$have_stdatomic_h" >&6; }
16796
16797if test "$have_stdatomic_h" = yes; then
16798
16799$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16800
16801fi
16802
16803# Check for GCC >= 4.7 __atomic builtins
16804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16805$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16807/* end confdefs.h. */
16808
16809
16810 volatile int val = 1;
16811 int main() {
16812 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16813 return 0;
16814 }
16815
16816
16817_ACEOF
16818if ac_fn_c_try_link "$LINENO"; then :
16819 have_builtin_atomic=yes
16820else
16821 have_builtin_atomic=no
16822fi
16823rm -f core conftest.err conftest.$ac_objext \
16824 conftest$ac_exeext conftest.$ac_ext
16825
16826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16827$as_echo "$have_builtin_atomic" >&6; }
16828
16829if test "$have_builtin_atomic" = yes; then
16830
16831$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16832
16833fi
16834
Ned Deily322f5ba2013-11-21 23:01:59 -080016835# ensurepip option
16836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16837$as_echo_n "checking for ensurepip... " >&6; }
16838
16839# Check whether --with-ensurepip was given.
16840if test "${with_ensurepip+set}" = set; then :
16841 withval=$with_ensurepip;
16842else
16843 with_ensurepip=upgrade
16844fi
16845
16846case $with_ensurepip in #(
16847 yes|upgrade) :
16848 ENSUREPIP=upgrade ;; #(
16849 install) :
16850 ENSUREPIP=install ;; #(
16851 no) :
16852 ENSUREPIP=no ;; #(
16853 *) :
16854 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16855esac
16856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16857$as_echo "$ENSUREPIP" >&6; }
16858
16859
Victor Stinner35a97c02015-03-08 02:59:09 +010016860# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16862$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16864/* end confdefs.h. */
16865
16866
16867 #include <dirent.h>
16868
16869 int main() {
16870 struct dirent entry;
16871 return entry.d_type == DT_UNKNOWN;
16872 }
16873
16874
16875_ACEOF
16876if ac_fn_c_try_link "$LINENO"; then :
16877 have_dirent_d_type=yes
16878else
16879 have_dirent_d_type=no
16880fi
16881rm -f core conftest.err conftest.$ac_objext \
16882 conftest$ac_exeext conftest.$ac_ext
16883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16884$as_echo "$have_dirent_d_type" >&6; }
16885
16886if test "$have_dirent_d_type" = yes; then
16887
16888$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16889
16890fi
16891
Victor Stinner9eb57c52015-03-19 22:21:49 +010016892# check if the Linux getrandom() syscall is available
16893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16894$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16896/* end confdefs.h. */
16897
16898
Victor Stinner1b80b242016-04-12 22:34:58 +020016899 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016900 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016901 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016902
16903 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016904 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016905 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016906 const int flags = GRND_NONBLOCK;
16907 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016908 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016909 return 0;
16910 }
16911
16912
16913_ACEOF
16914if ac_fn_c_try_link "$LINENO"; then :
16915 have_getrandom_syscall=yes
16916else
16917 have_getrandom_syscall=no
16918fi
16919rm -f core conftest.err conftest.$ac_objext \
16920 conftest$ac_exeext conftest.$ac_ext
16921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16922$as_echo "$have_getrandom_syscall" >&6; }
16923
16924if test "$have_getrandom_syscall" = yes; then
16925
16926$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16927
16928fi
16929
Victor Stinner3abf44e2015-09-18 15:38:37 +020016930# check if the getrandom() function is available
16931# the test was written for the Solaris function of <sys/random.h>
16932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16933$as_echo_n "checking for the getrandom() function... " >&6; }
16934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16935/* end confdefs.h. */
16936
16937
16938 #include <sys/random.h>
16939
16940 int main() {
16941 char buffer[1];
16942 const size_t buflen = sizeof(buffer);
16943 const int flags = 0;
16944 /* ignore the result, Python checks for ENOSYS at runtime */
16945 (void)getrandom(buffer, buflen, flags);
16946 return 0;
16947 }
16948
16949
16950_ACEOF
16951if ac_fn_c_try_link "$LINENO"; then :
16952 have_getrandom=yes
16953else
16954 have_getrandom=no
16955fi
16956rm -f core conftest.err conftest.$ac_objext \
16957 conftest$ac_exeext conftest.$ac_ext
16958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16959$as_echo "$have_getrandom" >&6; }
16960
16961if test "$have_getrandom" = yes; then
16962
16963$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16964
16965fi
16966
Neil Schemenauer5741c452019-02-08 10:48:46 -080016967# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16968# shm_* may only be available if linking against librt
16969save_LIBS="$LIBS"
16970save_includes_default="$ac_includes_default"
16971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16972$as_echo_n "checking for library containing shm_open... " >&6; }
16973if ${ac_cv_search_shm_open+:} false; then :
16974 $as_echo_n "(cached) " >&6
16975else
16976 ac_func_search_save_LIBS=$LIBS
16977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16978/* end confdefs.h. */
16979
16980/* Override any GCC internal prototype to avoid an error.
16981 Use char because int might match the return type of a GCC
16982 builtin and then its argument prototype would still apply. */
16983#ifdef __cplusplus
16984extern "C"
16985#endif
16986char shm_open ();
16987int
16988main ()
16989{
16990return shm_open ();
16991 ;
16992 return 0;
16993}
16994_ACEOF
16995for ac_lib in '' rt; do
16996 if test -z "$ac_lib"; then
16997 ac_res="none required"
16998 else
16999 ac_res=-l$ac_lib
17000 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17001 fi
17002 if ac_fn_c_try_link "$LINENO"; then :
17003 ac_cv_search_shm_open=$ac_res
17004fi
17005rm -f core conftest.err conftest.$ac_objext \
17006 conftest$ac_exeext
17007 if ${ac_cv_search_shm_open+:} false; then :
17008 break
17009fi
17010done
17011if ${ac_cv_search_shm_open+:} false; then :
17012
17013else
17014 ac_cv_search_shm_open=no
17015fi
17016rm conftest.$ac_ext
17017LIBS=$ac_func_search_save_LIBS
17018fi
17019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17020$as_echo "$ac_cv_search_shm_open" >&6; }
17021ac_res=$ac_cv_search_shm_open
17022if test "$ac_res" != no; then :
17023 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17024
17025fi
17026
17027if test "$ac_cv_search_shm_open" = "-lrt"; then
17028
17029$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17030
17031fi
17032for ac_header in sys/mman.h
17033do :
17034 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17035if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17036 cat >>confdefs.h <<_ACEOF
17037#define HAVE_SYS_MMAN_H 1
17038_ACEOF
17039
17040fi
17041
17042done
17043
17044# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17045ac_includes_default="\
17046${ac_includes_default}
17047#ifndef __cplusplus
17048# ifdef HAVE_SYS_MMAN_H
17049# include <sys/mman.h>
17050# endif
17051#endif
17052"
17053for ac_func in shm_open shm_unlink
17054do :
17055 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17056ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17057if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17058 cat >>confdefs.h <<_ACEOF
17059#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17060_ACEOF
17061
17062fi
17063done
17064
17065# we don't want to link with librt always, restore LIBS
17066LIBS="$save_LIBS"
17067ac_includes_default="$save_includes_default"
17068
Christian Heimesff5be6e2018-01-20 13:19:21 +010017069# Check for usable OpenSSL
17070
17071 found=false
17072
17073# Check whether --with-openssl was given.
17074if test "${with_openssl+set}" = set; then :
17075 withval=$with_openssl;
17076 case "$withval" in
17077 "" | y | ye | yes | n | no)
17078 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17079 ;;
17080 *) ssldirs="$withval"
17081 ;;
17082 esac
17083
17084else
17085
17086 # if pkg-config is installed and openssl has installed a .pc file,
17087 # then use that information and don't search ssldirs
17088 if test -n "$ac_tool_prefix"; then
17089 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17090set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17092$as_echo_n "checking for $ac_word... " >&6; }
17093if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17094 $as_echo_n "(cached) " >&6
17095else
17096 if test -n "$PKG_CONFIG"; then
17097 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17098else
17099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17100for as_dir in $PATH
17101do
17102 IFS=$as_save_IFS
17103 test -z "$as_dir" && as_dir=.
17104 for ac_exec_ext in '' $ac_executable_extensions; do
17105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17106 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17108 break 2
17109 fi
17110done
17111 done
17112IFS=$as_save_IFS
17113
17114fi
17115fi
17116PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17117if test -n "$PKG_CONFIG"; then
17118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17119$as_echo "$PKG_CONFIG" >&6; }
17120else
17121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17122$as_echo "no" >&6; }
17123fi
17124
17125
17126fi
17127if test -z "$ac_cv_prog_PKG_CONFIG"; then
17128 ac_ct_PKG_CONFIG=$PKG_CONFIG
17129 # Extract the first word of "pkg-config", so it can be a program name with args.
17130set dummy pkg-config; ac_word=$2
17131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17132$as_echo_n "checking for $ac_word... " >&6; }
17133if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17134 $as_echo_n "(cached) " >&6
17135else
17136 if test -n "$ac_ct_PKG_CONFIG"; then
17137 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17138else
17139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17140for as_dir in $PATH
17141do
17142 IFS=$as_save_IFS
17143 test -z "$as_dir" && as_dir=.
17144 for ac_exec_ext in '' $ac_executable_extensions; do
17145 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17146 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17148 break 2
17149 fi
17150done
17151 done
17152IFS=$as_save_IFS
17153
17154fi
17155fi
17156ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17157if test -n "$ac_ct_PKG_CONFIG"; then
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17159$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17160else
17161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17162$as_echo "no" >&6; }
17163fi
17164
17165 if test "x$ac_ct_PKG_CONFIG" = x; then
17166 PKG_CONFIG=""
17167 else
17168 case $cross_compiling:$ac_tool_warned in
17169yes:)
17170{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17171$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17172ac_tool_warned=yes ;;
17173esac
17174 PKG_CONFIG=$ac_ct_PKG_CONFIG
17175 fi
17176else
17177 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17178fi
17179
17180 if test x"$PKG_CONFIG" != x""; then
17181 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17182 if test $? = 0; then
17183 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17184 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17185 found=true
17186 fi
17187 fi
17188
17189 # no such luck; use some default ssldirs
17190 if ! $found; then
17191 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17192 fi
17193
17194
17195fi
17196
17197
17198
17199 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17200 # an 'openssl' subdirectory
17201
17202 if ! $found; then
17203 OPENSSL_INCLUDES=
17204 for ssldir in $ssldirs; do
17205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17206$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17207 if test -f "$ssldir/include/openssl/ssl.h"; then
17208 OPENSSL_INCLUDES="-I$ssldir/include"
17209 OPENSSL_LDFLAGS="-L$ssldir/lib"
17210 OPENSSL_LIBS="-lssl -lcrypto"
17211 found=true
17212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17213$as_echo "yes" >&6; }
17214 break
17215 else
17216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17217$as_echo "no" >&6; }
17218 fi
17219 done
17220
17221 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17222 # it will just work!
17223 fi
17224
17225 # try the preprocessor and linker with our new flags,
17226 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17227
17228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17229$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17230 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17231 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17232
17233 save_LIBS="$LIBS"
17234 save_LDFLAGS="$LDFLAGS"
17235 save_CPPFLAGS="$CPPFLAGS"
17236 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17237 LIBS="$OPENSSL_LIBS $LIBS"
17238 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17240/* end confdefs.h. */
17241#include <openssl/ssl.h>
17242int
17243main ()
17244{
17245SSL_new(NULL)
17246 ;
17247 return 0;
17248}
17249_ACEOF
17250if ac_fn_c_try_link "$LINENO"; then :
17251
17252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17253$as_echo "yes" >&6; }
17254 have_openssl=yes
17255
17256else
17257
17258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17259$as_echo "no" >&6; }
17260 have_openssl=no
17261
17262fi
17263rm -f core conftest.err conftest.$ac_objext \
17264 conftest$ac_exeext conftest.$ac_ext
17265 CPPFLAGS="$save_CPPFLAGS"
17266 LDFLAGS="$save_LDFLAGS"
17267 LIBS="$save_LIBS"
17268
17269
17270
17271
17272
17273
17274if test "$have_openssl" = yes; then
17275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17276$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17277
17278 save_LIBS="$LIBS"
17279 save_LDFLAGS="$LDFLAGS"
17280 save_CPPFLAGS="$CPPFLAGS"
17281 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17282 LIBS="$OPENSSL_LIBS $LIBS"
17283 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17284
17285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17286/* end confdefs.h. */
17287
17288 #include <openssl/x509_vfy.h>
17289
17290int
17291main ()
17292{
17293
17294 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17295 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17296 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17297 X509_VERIFY_PARAM_set_hostflags(p, 0);
17298
17299 ;
17300 return 0;
17301}
17302
17303_ACEOF
17304if ac_fn_c_try_link "$LINENO"; then :
17305
17306 ac_cv_has_x509_verify_param_set1_host=yes
17307
17308else
17309
17310 ac_cv_has_x509_verify_param_set1_host=no
17311
17312fi
17313rm -f core conftest.err conftest.$ac_objext \
17314 conftest$ac_exeext conftest.$ac_ext
17315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17316$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17317 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17318
17319$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17320
17321 fi
17322
17323 CPPFLAGS="$save_CPPFLAGS"
17324 LDFLAGS="$save_LDFLAGS"
17325 LIBS="$save_LIBS"
17326fi
17327
Christian Heimes892d66e2018-01-29 14:10:18 +010017328# ssl module default cipher suite string
17329
17330
17331
17332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17333$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17334
17335# Check whether --with-ssl-default-suites was given.
17336if test "${with_ssl_default_suites+set}" = set; then :
17337 withval=$with_ssl_default_suites;
17338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17339$as_echo "$withval" >&6; }
17340case "$withval" in
17341 python)
17342 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17343
17344 ;;
17345 openssl)
17346 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17347
17348 ;;
17349 *)
17350 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17351
17352 cat >>confdefs.h <<_ACEOF
17353#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17354_ACEOF
17355
17356 ;;
17357esac
17358
17359else
17360
17361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17362$as_echo "python" >&6; }
17363$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17364
17365
17366fi
17367
17368
17369
Guido van Rossum627b2d71993-12-24 10:39:16 +000017370# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017371ac_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 +000017372
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017373ac_config_files="$ac_config_files Modules/ld_so_aix"
17374
Martin v. Löwis11437992002-04-12 09:54:03 +000017375cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017376# This file is a shell script that caches the results of configure
17377# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017378# scripts and configure runs, see configure's option --config-cache.
17379# It is not useful on other systems. If it contains results you don't
17380# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017381#
Martin v. Löwis11437992002-04-12 09:54:03 +000017382# config.status only pays attention to the cache file if you give it
17383# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017384#
Skip Montanaro6dead952003-09-25 14:50:04 +000017385# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017386# loading this file, other *unset* `ac_cv_foo' will be assigned the
17387# following values.
17388
17389_ACEOF
17390
Guido van Rossumf78abae1997-01-21 22:02:36 +000017391# The following way of writing the cache mishandles newlines in values,
17392# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017394# Ultrix sh set writes to stderr and can't be redirected directly,
17395# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396(
17397 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17398 eval ac_val=\$$ac_var
17399 case $ac_val in #(
17400 *${as_nl}*)
17401 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017402 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17403$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 esac
17405 case $ac_var in #(
17406 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017407 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17408 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409 esac ;;
17410 esac
17411 done
17412
Martin v. Löwis11437992002-04-12 09:54:03 +000017413 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17415 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017416 # `set' does not quote correctly, so add quotes: double-quote
17417 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017418 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017419 "s/'/'\\\\''/g;
17420 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017422 *)
17423 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017425 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426 esac |
17427 sort
17428) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017429 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017431 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17434 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17436 :end' >>confcache
17437if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17438 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017439 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017440 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17441$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017442 if test ! -f "$cache_file" || test -h "$cache_file"; then
17443 cat confcache >"$cache_file"
17444 else
17445 case $cache_file in #(
17446 */* | ?:*)
17447 mv -f confcache "$cache_file"$$ &&
17448 mv -f "$cache_file"$$ "$cache_file" ;; #(
17449 *)
17450 mv -f confcache "$cache_file" ;;
17451 esac
17452 fi
17453 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017454 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017455 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17456$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017457 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017458fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017459rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017460
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017461test "x$prefix" = xNONE && prefix=$ac_default_prefix
17462# Let make expand exec_prefix.
17463test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017464
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017465DEFS=-DHAVE_CONFIG_H
17466
Skip Montanaro6dead952003-09-25 14:50:04 +000017467ac_libobjs=
17468ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017469U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017470for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17471 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017473 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17475 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017476 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17477 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017478done
17479LIBOBJS=$ac_libobjs
17480
17481LTLIBOBJS=$ac_ltlibobjs
17482
17483
Martin v. Löwis11437992002-04-12 09:54:03 +000017484
Matthias Kloseb9621712010-04-24 17:59:49 +000017485
Victor Stinnere0be4232011-10-25 13:06:09 +020017486: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017487ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017488ac_clean_files_save=$ac_clean_files
17489ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017490{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17491$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17492as_write_fail=0
17493cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017494#! $SHELL
17495# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017496# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017497# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017498# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017499
Martin v. Löwis11437992002-04-12 09:54:03 +000017500debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017501ac_cs_recheck=false
17502ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017503
Matthias Kloseb9621712010-04-24 17:59:49 +000017504SHELL=\${CONFIG_SHELL-$SHELL}
17505export SHELL
17506_ASEOF
17507cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17508## -------------------- ##
17509## M4sh Initialization. ##
17510## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017512# Be more Bourne compatible
17513DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017514if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017515 emulate sh
17516 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017517 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017518 # is contrary to our usage. Disable this feature.
17519 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017521else
Matthias Kloseb9621712010-04-24 17:59:49 +000017522 case `(set -o) 2>/dev/null` in #(
17523 *posix*) :
17524 set -o posix ;; #(
17525 *) :
17526 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017528fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017529
17530
Matthias Kloseb9621712010-04-24 17:59:49 +000017531as_nl='
17532'
17533export as_nl
17534# Printing a long string crashes Solaris 7 /usr/bin/printf.
17535as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17536as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17537as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17538# Prefer a ksh shell builtin over an external printf program on Solaris,
17539# but without wasting forks for bash or zsh.
17540if test -z "$BASH_VERSION$ZSH_VERSION" \
17541 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17542 as_echo='print -r --'
17543 as_echo_n='print -rn --'
17544elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17545 as_echo='printf %s\n'
17546 as_echo_n='printf %s'
17547else
17548 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17549 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17550 as_echo_n='/usr/ucb/echo -n'
17551 else
17552 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17553 as_echo_n_body='eval
17554 arg=$1;
17555 case $arg in #(
17556 *"$as_nl"*)
17557 expr "X$arg" : "X\\(.*\\)$as_nl";
17558 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17559 esac;
17560 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17561 '
17562 export as_echo_n_body
17563 as_echo_n='sh -c $as_echo_n_body as_echo'
17564 fi
17565 export as_echo_body
17566 as_echo='sh -c $as_echo_body as_echo'
17567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017568
17569# The user is always right.
17570if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017571 PATH_SEPARATOR=:
17572 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17573 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17574 PATH_SEPARATOR=';'
17575 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578
17579# IFS
17580# We need space, tab and new line, in precisely that order. Quoting is
17581# there to prevent editors from complaining about space-tab.
17582# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17583# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584IFS=" "" $as_nl"
17585
17586# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017587as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017588case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589 *[\\/]* ) as_myself=$0 ;;
17590 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017591for as_dir in $PATH
17592do
17593 IFS=$as_save_IFS
17594 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017595 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17596 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599 ;;
17600esac
17601# We did not find ourselves, most probably we were run as `sh COMMAND'
17602# in which case we are not to be found in the path.
17603if test "x$as_myself" = x; then
17604 as_myself=$0
17605fi
17606if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17608 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609fi
17610
Matthias Kloseb9621712010-04-24 17:59:49 +000017611# Unset variables that we do not need and which cause bugs (e.g. in
17612# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17613# suppresses any "Segmentation fault" message there. '((' could
17614# trigger a bug in pdksh 5.2.14.
17615for as_var in BASH_ENV ENV MAIL MAILPATH
17616do eval test x\${$as_var+set} = xset \
17617 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618done
17619PS1='$ '
17620PS2='> '
17621PS4='+ '
17622
17623# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017624LC_ALL=C
17625export LC_ALL
17626LANGUAGE=C
17627export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628
Matthias Kloseb9621712010-04-24 17:59:49 +000017629# CDPATH.
17630(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17631
17632
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017633# as_fn_error STATUS ERROR [LINENO LOG_FD]
17634# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017635# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17636# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017637# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017638as_fn_error ()
17639{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017640 as_status=$1; test $as_status -eq 0 && as_status=1
17641 if test "$4"; then
17642 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17643 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017644 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017645 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017646 as_fn_exit $as_status
17647} # as_fn_error
17648
17649
17650# as_fn_set_status STATUS
17651# -----------------------
17652# Set $? to STATUS, without forking.
17653as_fn_set_status ()
17654{
17655 return $1
17656} # as_fn_set_status
17657
17658# as_fn_exit STATUS
17659# -----------------
17660# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17661as_fn_exit ()
17662{
17663 set +e
17664 as_fn_set_status $1
17665 exit $1
17666} # as_fn_exit
17667
17668# as_fn_unset VAR
17669# ---------------
17670# Portably unset VAR.
17671as_fn_unset ()
17672{
17673 { eval $1=; unset $1;}
17674}
17675as_unset=as_fn_unset
17676# as_fn_append VAR VALUE
17677# ----------------------
17678# Append the text in VALUE to the end of the definition contained in VAR. Take
17679# advantage of any shell optimizations that allow amortized linear growth over
17680# repeated appends, instead of the typical quadratic growth present in naive
17681# implementations.
17682if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17683 eval 'as_fn_append ()
17684 {
17685 eval $1+=\$2
17686 }'
17687else
17688 as_fn_append ()
17689 {
17690 eval $1=\$$1\$2
17691 }
17692fi # as_fn_append
17693
17694# as_fn_arith ARG...
17695# ------------------
17696# Perform arithmetic evaluation on the ARGs, and store the result in the
17697# global $as_val. Take advantage of shells that can avoid forks. The arguments
17698# must be portable across $(()) and expr.
17699if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17700 eval 'as_fn_arith ()
17701 {
17702 as_val=$(( $* ))
17703 }'
17704else
17705 as_fn_arith ()
17706 {
17707 as_val=`expr "$@" || test $? -eq 1`
17708 }
17709fi # as_fn_arith
17710
17711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712if expr a : '\(a\)' >/dev/null 2>&1 &&
17713 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17714 as_expr=expr
17715else
17716 as_expr=false
17717fi
17718
17719if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17720 as_basename=basename
17721else
17722 as_basename=false
17723fi
17724
Matthias Kloseb9621712010-04-24 17:59:49 +000017725if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17726 as_dirname=dirname
17727else
17728 as_dirname=false
17729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731as_me=`$as_basename -- "$0" ||
17732$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17733 X"$0" : 'X\(//\)$' \| \
17734 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017735$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736 sed '/^.*\/\([^/][^/]*\)\/*$/{
17737 s//\1/
17738 q
17739 }
17740 /^X\/\(\/\/\)$/{
17741 s//\1/
17742 q
17743 }
17744 /^X\/\(\/\).*/{
17745 s//\1/
17746 q
17747 }
17748 s/.*/./; q'`
17749
Matthias Kloseb9621712010-04-24 17:59:49 +000017750# Avoid depending upon Character Ranges.
17751as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17752as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17753as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17754as_cr_digits='0123456789'
17755as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756
17757ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017758case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017760 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017762 xy) ECHO_C='\c';;
17763 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17764 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765 esac;;
17766*)
17767 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017768esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017769
Martin v. Löwis11437992002-04-12 09:54:03 +000017770rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771if test -d conf$$.dir; then
17772 rm -f conf$$.dir/conf$$.file
17773else
17774 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017775 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017777if (echo >conf$$.file) 2>/dev/null; then
17778 if ln -s conf$$.file conf$$ 2>/dev/null; then
17779 as_ln_s='ln -s'
17780 # ... but there are two gotchas:
17781 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17782 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017783 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017784 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017785 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017786 elif ln conf$$.file conf$$ 2>/dev/null; then
17787 as_ln_s=ln
17788 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017789 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017790 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017791else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017792 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17795rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017796
Matthias Kloseb9621712010-04-24 17:59:49 +000017797
17798# as_fn_mkdir_p
17799# -------------
17800# Create "$as_dir" as a directory, including parents if necessary.
17801as_fn_mkdir_p ()
17802{
17803
17804 case $as_dir in #(
17805 -*) as_dir=./$as_dir;;
17806 esac
17807 test -d "$as_dir" || eval $as_mkdir_p || {
17808 as_dirs=
17809 while :; do
17810 case $as_dir in #(
17811 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17812 *) as_qdir=$as_dir;;
17813 esac
17814 as_dirs="'$as_qdir' $as_dirs"
17815 as_dir=`$as_dirname -- "$as_dir" ||
17816$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17817 X"$as_dir" : 'X\(//\)[^/]' \| \
17818 X"$as_dir" : 'X\(//\)$' \| \
17819 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17820$as_echo X"$as_dir" |
17821 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17822 s//\1/
17823 q
17824 }
17825 /^X\(\/\/\)[^/].*/{
17826 s//\1/
17827 q
17828 }
17829 /^X\(\/\/\)$/{
17830 s//\1/
17831 q
17832 }
17833 /^X\(\/\).*/{
17834 s//\1/
17835 q
17836 }
17837 s/.*/./; q'`
17838 test -d "$as_dir" && break
17839 done
17840 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017841 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017842
17843
17844} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017845if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017846 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017847else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017848 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017849 as_mkdir_p=false
17850fi
17851
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017852
17853# as_fn_executable_p FILE
17854# -----------------------
17855# Test if FILE is an executable regular file.
17856as_fn_executable_p ()
17857{
17858 test -f "$1" && test -x "$1"
17859} # as_fn_executable_p
17860as_test_x='test -x'
17861as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017862
17863# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017864as_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 +000017865
17866# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017867as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017868
17869
Martin v. Löwis11437992002-04-12 09:54:03 +000017870exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017871## ----------------------------------- ##
17872## Main body of $CONFIG_STATUS script. ##
17873## ----------------------------------- ##
17874_ASEOF
17875test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017876
Matthias Kloseb9621712010-04-24 17:59:49 +000017877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17878# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017879# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880# values after options handling.
17881ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017882This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017883generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017884
17885 CONFIG_FILES = $CONFIG_FILES
17886 CONFIG_HEADERS = $CONFIG_HEADERS
17887 CONFIG_LINKS = $CONFIG_LINKS
17888 CONFIG_COMMANDS = $CONFIG_COMMANDS
17889 $ $0 $@
17890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891on `(hostname || uname -n) 2>/dev/null | sed 1q`
17892"
17893
Martin v. Löwis11437992002-04-12 09:54:03 +000017894_ACEOF
17895
Matthias Kloseb9621712010-04-24 17:59:49 +000017896case $ac_config_files in *"
17897"*) set x $ac_config_files; shift; ac_config_files=$*;;
17898esac
17899
17900case $ac_config_headers in *"
17901"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17902esac
17903
17904
17905cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017906# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017907config_files="$ac_config_files"
17908config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017911
Matthias Kloseb9621712010-04-24 17:59:49 +000017912cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017913ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017914\`$as_me' instantiates files and other configuration actions
17915from templates according to the current configuration. Unless the files
17916and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017917
Matthias Kloseb9621712010-04-24 17:59:49 +000017918Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017919
17920 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017922 --config print configuration, then exit
17923 -q, --quiet, --silent
17924 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017925 -d, --debug don't remove temporary files
17926 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017927 --file=FILE[:TEMPLATE]
17928 instantiate the configuration file FILE
17929 --header=FILE[:TEMPLATE]
17930 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017931
17932Configuration files:
17933$config_files
17934
17935Configuration headers:
17936$config_headers
17937
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017938Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017941cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17942ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017943ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017944python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017945configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017946 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017947
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017948Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017949This config.status script is free software; the Free Software Foundation
17950gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951
17952ac_pwd='$ac_pwd'
17953srcdir='$srcdir'
17954INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017955MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017956test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017957_ACEOF
17958
Matthias Kloseb9621712010-04-24 17:59:49 +000017959cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17960# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017961ac_need_defaults=:
17962while test $# != 0
17963do
17964 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017965 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017966 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17967 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017968 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017970 --*=)
17971 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17972 ac_optarg=
17973 ac_shift=:
17974 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017976 ac_option=$1
17977 ac_optarg=$2
17978 ac_shift=shift
17979 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017980 esac
17981
Skip Montanaro6dead952003-09-25 14:50:04 +000017982 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017984 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17985 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017987 $as_echo "$ac_cs_version"; exit ;;
17988 --config | --confi | --conf | --con | --co | --c )
17989 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017990 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017991 debug=: ;;
17992 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017993 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017994 case $ac_optarg in
17995 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017996 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017997 esac
17998 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017999 ac_need_defaults=false;;
18000 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018001 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018002 case $ac_optarg in
18003 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18004 esac
18005 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018006 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018007 --he | --h)
18008 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018009 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018010Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018011 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018012 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018013 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18014 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18015 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018016
18017 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018018 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018019Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018020
Matthias Kloseb9621712010-04-24 17:59:49 +000018021 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018023
18024 esac
18025 shift
18026done
18027
Skip Montanaro6dead952003-09-25 14:50:04 +000018028ac_configure_extra_args=
18029
18030if $ac_cs_silent; then
18031 exec 6>/dev/null
18032 ac_configure_extra_args="$ac_configure_extra_args --silent"
18033fi
18034
18035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018036cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018037if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018038 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018039 shift
18040 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18041 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018043 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018044fi
18045
Martin v. Löwis11437992002-04-12 09:54:03 +000018046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018047cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048exec 5>>config.log
18049{
18050 echo
18051 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18052## Running $as_me. ##
18053_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018054 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018058cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018060
Matthias Kloseb9621712010-04-24 17:59:49 +000018061cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062
18063# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018064for ac_config_target in $ac_config_targets
18065do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066 case $ac_config_target in
18067 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18068 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18069 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018070 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18071 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018073 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018074 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018075 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018076 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077
Victor Stinnere0be4232011-10-25 13:06:09 +020018078 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018079 esac
18080done
18081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082
Martin v. Löwis11437992002-04-12 09:54:03 +000018083# If the user did not use the arguments to specify the items to instantiate,
18084# then the envvar interface is used. Set only those that are not.
18085# We use the long form for the default assignment because of an extremely
18086# bizarre bug on SunOS 4.1.3.
18087if $ac_need_defaults; then
18088 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18089 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18090fi
18091
Skip Montanaro6dead952003-09-25 14:50:04 +000018092# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018094# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018095# Hook for its removal unless debugging.
18096# Note that there is a small window in which the directory will not be cleaned:
18097# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018098$debug ||
18099{
Victor Stinnere0be4232011-10-25 13:06:09 +020018100 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018102 : "${ac_tmp:=$tmp}"
18103 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018105 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018106}
Martin v. Löwis11437992002-04-12 09:54:03 +000018107# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018108
Martin v. Löwis11437992002-04-12 09:54:03 +000018109{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018111 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018112} ||
18113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114 tmp=./conf$$-$RANDOM
18115 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018116} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018117ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018118
Matthias Kloseb9621712010-04-24 17:59:49 +000018119# Set up the scripts for CONFIG_FILES section.
18120# No need to generate them if there are no CONFIG_FILES.
18121# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018123
Matthias Kloseb9621712010-04-24 17:59:49 +000018124
18125ac_cr=`echo X | tr X '\015'`
18126# On cygwin, bash can eat \r inside `` if the user requested igncr.
18127# But we know of no other shell where ac_cr would be empty at this
18128# point, so we can use a bashism as a fallback.
18129if test "x$ac_cr" = x; then
18130 eval ac_cr=\$\'\\r\'
18131fi
18132ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18133if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018134 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018135else
18136 ac_cs_awk_cr=$ac_cr
18137fi
18138
Victor Stinnere0be4232011-10-25 13:06:09 +020018139echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018140_ACEOF
18141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142
Matthias Kloseb9621712010-04-24 17:59:49 +000018143{
18144 echo "cat >conf$$subs.awk <<_ACEOF" &&
18145 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18146 echo "_ACEOF"
18147} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018148 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18149ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150ac_delim='%!_!# '
18151for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018152 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018153 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154
Matthias Kloseb9621712010-04-24 17:59:49 +000018155 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18156 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018157 break
18158 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018159 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160 else
18161 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018162 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163done
Matthias Kloseb9621712010-04-24 17:59:49 +000018164rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165
Matthias Kloseb9621712010-04-24 17:59:49 +000018166cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018167cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018169sed -n '
18170h
18171s/^/S["/; s/!.*/"]=/
18172p
18173g
18174s/^[^!]*!//
18175:repl
18176t repl
18177s/'"$ac_delim"'$//
18178t delim
18179:nl
18180h
18181s/\(.\{148\}\)..*/\1/
18182t more1
18183s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18184p
18185n
18186b repl
18187:more1
18188s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18189p
18190g
18191s/.\{148\}//
18192t nl
18193:delim
18194h
18195s/\(.\{148\}\)..*/\1/
18196t more2
18197s/["\\]/\\&/g; s/^/"/; s/$/"/
18198p
18199b
18200:more2
18201s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18202p
18203g
18204s/.\{148\}//
18205t delim
18206' <conf$$subs.awk | sed '
18207/^[^""]/{
18208 N
18209 s/\n//
18210}
18211' >>$CONFIG_STATUS || ac_write_fail=1
18212rm -f conf$$subs.awk
18213cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18214_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018215cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018216 for (key in S) S_is_set[key] = 1
18217 FS = ""
18218
18219}
18220{
18221 line = $ 0
18222 nfields = split(line, field, "@")
18223 substed = 0
18224 len = length(field[1])
18225 for (i = 2; i < nfields; i++) {
18226 key = field[i]
18227 keylen = length(key)
18228 if (S_is_set[key]) {
18229 value = S[key]
18230 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18231 len += length(value) + length(field[++i])
18232 substed = 1
18233 } else
18234 len += 1 + keylen
18235 }
18236
18237 print line
18238}
18239
18240_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018242cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18243if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18244 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18245else
18246 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018247fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018248 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018249_ACEOF
18250
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018251# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18252# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018253# trailing colons and then remove the whole line if VPATH becomes empty
18254# (actually we leave an empty line to preserve line numbers).
18255if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018256 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18257h
18258s///
18259s/^/:/
18260s/[ ]*$/:/
18261s/:\$(srcdir):/:/g
18262s/:\${srcdir}:/:/g
18263s/:@srcdir@:/:/g
18264s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018265s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018266x
18267s/\(=[ ]*\).*/\1/
18268G
18269s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018270s/^[^=]*=[ ]*$//
18271}'
18272fi
18273
Matthias Kloseb9621712010-04-24 17:59:49 +000018274cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018275fi # test -n "$CONFIG_FILES"
18276
Matthias Kloseb9621712010-04-24 17:59:49 +000018277# Set up the scripts for CONFIG_HEADERS section.
18278# No need to generate them if there are no CONFIG_HEADERS.
18279# This happens for instance with `./config.status Makefile'.
18280if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018281cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018282BEGIN {
18283_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018284
Matthias Kloseb9621712010-04-24 17:59:49 +000018285# Transform confdefs.h into an awk script `defines.awk', embedded as
18286# here-document in config.status, that substitutes the proper values into
18287# config.h.in to produce config.h.
18288
18289# Create a delimiter string that does not exist in confdefs.h, to ease
18290# handling of long lines.
18291ac_delim='%!_!# '
18292for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018293 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18294 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018295 break
18296 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018297 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018298 else
18299 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18300 fi
18301done
18302
18303# For the awk script, D is an array of macro values keyed by name,
18304# likewise P contains macro parameters if any. Preserve backslash
18305# newline sequences.
18306
18307ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18308sed -n '
18309s/.\{148\}/&'"$ac_delim"'/g
18310t rset
18311:rset
18312s/^[ ]*#[ ]*define[ ][ ]*/ /
18313t def
18314d
18315:def
18316s/\\$//
18317t bsnl
18318s/["\\]/\\&/g
18319s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18320D["\1"]=" \3"/p
18321s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18322d
18323:bsnl
18324s/["\\]/\\&/g
18325s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18326D["\1"]=" \3\\\\\\n"\\/p
18327t cont
18328s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18329t cont
18330d
18331:cont
18332n
18333s/.\{148\}/&'"$ac_delim"'/g
18334t clear
18335:clear
18336s/\\$//
18337t bsnlc
18338s/["\\]/\\&/g; s/^/"/; s/$/"/p
18339d
18340:bsnlc
18341s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18342b cont
18343' <confdefs.h | sed '
18344s/'"$ac_delim"'/"\\\
18345"/g' >>$CONFIG_STATUS || ac_write_fail=1
18346
18347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18348 for (key in D) D_is_set[key] = 1
18349 FS = ""
18350}
18351/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18352 line = \$ 0
18353 split(line, arg, " ")
18354 if (arg[1] == "#") {
18355 defundef = arg[2]
18356 mac1 = arg[3]
18357 } else {
18358 defundef = substr(arg[1], 2)
18359 mac1 = arg[2]
18360 }
18361 split(mac1, mac2, "(") #)
18362 macro = mac2[1]
18363 prefix = substr(line, 1, index(line, defundef) - 1)
18364 if (D_is_set[macro]) {
18365 # Preserve the white space surrounding the "#".
18366 print prefix "define", macro P[macro] D[macro]
18367 next
18368 } else {
18369 # Replace #undef with comments. This is necessary, for example,
18370 # in the case of _POSIX_SOURCE, which is predefined and required
18371 # on some systems where configure will not decide to define it.
18372 if (defundef == "undef") {
18373 print "/*", prefix defundef, macro, "*/"
18374 next
18375 }
18376 }
18377}
18378{ print }
18379_ACAWK
18380_ACEOF
18381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018382 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018383fi # test -n "$CONFIG_HEADERS"
18384
18385
18386eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18387shift
18388for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389do
18390 case $ac_tag in
18391 :[FHLC]) ac_mode=$ac_tag; continue;;
18392 esac
18393 case $ac_mode$ac_tag in
18394 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018395 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 :[FH]-) ac_tag=-:-;;
18397 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18398 esac
18399 ac_save_IFS=$IFS
18400 IFS=:
18401 set x $ac_tag
18402 IFS=$ac_save_IFS
18403 shift
18404 ac_file=$1
18405 shift
18406
18407 case $ac_mode in
18408 :L) ac_source=$1;;
18409 :[FH])
18410 ac_file_inputs=
18411 for ac_f
18412 do
18413 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018414 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018415 *) # Look for the file first in the build tree, then in the source tree
18416 # (if the path is not absolute). The absolute path cannot be DOS-style,
18417 # because $ac_f cannot contain `:'.
18418 test -f "$ac_f" ||
18419 case $ac_f in
18420 [\\/$]*) false;;
18421 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18422 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018423 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018424 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018425 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18426 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018427 done
18428
18429 # Let's still pretend it is `configure' which instantiates (i.e., don't
18430 # use $as_me), people would be surprised to read:
18431 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018432 configure_input='Generated from '`
18433 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18434 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435 if test x"$ac_file" != x-; then
18436 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018437 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18438$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018439 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018440 # Neutralize special characters interpreted by sed in replacement strings.
18441 case $configure_input in #(
18442 *\&* | *\|* | *\\* )
18443 ac_sed_conf_input=`$as_echo "$configure_input" |
18444 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18445 *) ac_sed_conf_input=$configure_input;;
18446 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447
18448 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018449 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18450 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 esac
18452 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 esac
18454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018455 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018456$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018457 X"$ac_file" : 'X\(//\)[^/]' \| \
18458 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018460$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018461 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18462 s//\1/
18463 q
18464 }
18465 /^X\(\/\/\)[^/].*/{
18466 s//\1/
18467 q
18468 }
18469 /^X\(\/\/\)$/{
18470 s//\1/
18471 q
18472 }
18473 /^X\(\/\).*/{
18474 s//\1/
18475 q
18476 }
18477 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018478 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018479 ac_builddir=.
18480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481case "$ac_dir" in
18482.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18483*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018484 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018486 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487 case $ac_top_builddir_sub in
18488 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18489 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18490 esac ;;
18491esac
18492ac_abs_top_builddir=$ac_pwd
18493ac_abs_builddir=$ac_pwd$ac_dir_suffix
18494# for backward compatibility:
18495ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018496
18497case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018499 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500 ac_top_srcdir=$ac_top_builddir_sub
18501 ac_abs_top_srcdir=$ac_pwd ;;
18502 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018503 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018504 ac_top_srcdir=$srcdir
18505 ac_abs_top_srcdir=$srcdir ;;
18506 *) # Relative name.
18507 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18508 ac_top_srcdir=$ac_top_build_prefix$srcdir
18509 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018510esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018511ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018512
Martin v. Löwis11437992002-04-12 09:54:03 +000018513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514 case $ac_mode in
18515 :F)
18516 #
18517 # CONFIG_FILE
18518 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018519
18520 case $INSTALL in
18521 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018522 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018524 ac_MKDIR_P=$MKDIR_P
18525 case $MKDIR_P in
18526 [\\/$]* | ?:[\\/]* ) ;;
18527 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18528 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018529_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018530
Matthias Kloseb9621712010-04-24 17:59:49 +000018531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532# If the template does not know about datarootdir, expand it.
18533# FIXME: This hack should be removed a few years after 2.60.
18534ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018535ac_sed_dataroot='
18536/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537 p
18538 q
18539}
18540/@datadir@/p
18541/@docdir@/p
18542/@infodir@/p
18543/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018544/@mandir@/p'
18545case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018546*datarootdir*) ac_datarootdir_seen=yes;;
18547*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18549$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018552 ac_datarootdir_hack='
18553 s&@datadir@&$datadir&g
18554 s&@docdir@&$docdir&g
18555 s&@infodir@&$infodir&g
18556 s&@localedir@&$localedir&g
18557 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018558 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018559esac
18560_ACEOF
18561
18562# Neutralize VPATH when `$srcdir' = `.'.
18563# Shell code in configure.ac might set extrasub.
18564# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018565cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18566ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018567$extrasub
18568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018569cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018570:t
18571/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018572s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018573s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018574s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575s&@srcdir@&$ac_srcdir&;t t
18576s&@abs_srcdir@&$ac_abs_srcdir&;t t
18577s&@top_srcdir@&$ac_top_srcdir&;t t
18578s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18579s&@builddir@&$ac_builddir&;t t
18580s&@abs_builddir@&$ac_abs_builddir&;t t
18581s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18582s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018583s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018585"
Victor Stinnere0be4232011-10-25 13:06:09 +020018586eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18587 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018589test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018590 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18591 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18592 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018593 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018594which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018595$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018596which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018597
Victor Stinnere0be4232011-10-25 13:06:09 +020018598 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018599 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018600 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18601 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018602 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018603 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018604 ;;
18605 :H)
18606 #
18607 # CONFIG_HEADER
18608 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018609 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018610 {
18611 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018612 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18613 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018614 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018615 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018616 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18617$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018619 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018620 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018621 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018622 fi
18623 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018624 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018625 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018626 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018628 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018630
18631 esac
18632
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018633
18634 case $ac_file$ac_mode in
18635 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18636
18637 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018638done # for ac_tag
18639
Guido van Rossum627b2d71993-12-24 10:39:16 +000018640
Matthias Kloseb9621712010-04-24 17:59:49 +000018641as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018642_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018643ac_clean_files=$ac_clean_files_save
18644
Matthias Kloseb9621712010-04-24 17:59:49 +000018645test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018646 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018647
Martin v. Löwis11437992002-04-12 09:54:03 +000018648
18649# configure is writing to config.log, and then calls config.status.
18650# config.status does its own redirection, appending to config.log.
18651# Unfortunately, on DOS this fails, as config.log is still kept open
18652# by configure, so config.status won't be able to write to it; its
18653# output is simply discarded. So we exec the FD to /dev/null,
18654# effectively closing config.log, so it can be properly (re)opened and
18655# appended to by config.status. When coming back to configure, we
18656# need to make the FD available again.
18657if test "$no_create" != yes; then
18658 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018659 ac_config_status_args=
18660 test "$silent" = yes &&
18661 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018662 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018663 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018664 exec 5>>config.log
18665 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18666 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018667 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018668fi
18669if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18671$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018672fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018673
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018674
Christian Heimes75ed8902013-11-20 01:11:18 +010018675echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018676if test ! -f Modules/Setup.local
18677then
18678 echo "# Edit this file for local setup changes" >Modules/Setup.local
18679fi
18680
Christian Heimes75ed8902013-11-20 01:11:18 +010018681echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018682$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018683 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018684 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018685mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018686
18687if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18688 echo "" >&6
18689 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018690 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 +000018691 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018692 echo "" >&6
18693 echo "" >&6
18694fi
18695