blob: 4d9c54f2d687ba60d12be3f13dc0a2420e56b598 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100634PLATLIBDIR
Miss Islington (bot)6cb24a02020-06-09 06:54:54 -0700635BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200636LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700637EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200638ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000639SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000640LIBC
641LIBM
642HAVE_GETHOSTBYNAME
643HAVE_GETHOSTBYNAME_R
644HAVE_GETHOSTBYNAME_R_3_ARG
645HAVE_GETHOSTBYNAME_R_5_ARG
646HAVE_GETHOSTBYNAME_R_6_ARG
647LIBOBJS
648TRUE
649MACHDEP_OBJS
650DYNLOADFILE
651DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700652DTRACE_OBJS
653DTRACE_HEADERS
654DFLAGS
655DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700656TCLTK_LIBS
657TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000658LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800659PKG_CONFIG_LIBDIR
660PKG_CONFIG_PATH
661PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400662TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000663SHLIBS
664CFLAGSFORSHARED
665LINKFORSHARED
666CCSHARED
667BLDSHARED
668LDCXXSHARED
669LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700670SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LIBTOOL_CRUFT
672OTHER_LIBTOOL_OPT
673UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100674LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700675CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000676BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200677CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000678OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700680LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700681LLVM_PROF_ERR
682LLVM_PROF_FILE
683LLVM_PROF_MERGER
684PGO_PROF_USE_FLAG
685PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200686LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200687LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700688PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700689DEF_MAKE_RULE
690DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000691ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000692LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100693MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000694INSTALL_DATA
695INSTALL_SCRIPT
696INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200697ac_ct_READELF
698READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000699ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702GNULD
Miss Islington (bot)88b86a92020-08-29 09:36:40 -0700703EXPORTSFROM
704EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000705LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000706LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000707RUNSHARED
708INSTSONAME
709LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000710PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000711BLDLIBRARY
712DLLLIBRARY
713LDLIBRARY
714LIBRARY
715BUILDEXEEXT
716EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200717NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200718MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719PLATFORM_TRIPLET
720MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200721ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000722MAINCC
723CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700724SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200725GREP
726CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000727OBJEXT
728EXEEXT
729ac_ct_CC
730CPPFLAGS
731LDFLAGS
732CFLAGS
733CC
734EXPORT_MACOSX_DEPLOYMENT_TARGET
735CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200736_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000737MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000738FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800740FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000741FRAMEWORKALTINSTALLLAST
742FRAMEWORKALTINSTALLFIRST
743FRAMEWORKINSTALLLAST
744FRAMEWORKINSTALLFIRST
745PYTHONFRAMEWORKINSTALLDIR
746PYTHONFRAMEWORKPREFIX
747PYTHONFRAMEWORKDIR
748PYTHONFRAMEWORKIDENTIFIER
749PYTHONFRAMEWORK
750LIPO_32BIT_FLAGS
751ARCH_RUN_32BIT
752UNIVERSALSDK
753CONFIG_ARGS
754SOVERSION
755VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200756PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200757PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100758host_os
759host_vendor
760host_cpu
761host
762build_os
763build_vendor
764build_cpu
765build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500766HAS_GIT
767GITBRANCH
768GITTAG
769GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400770BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000771target_alias
772host_alias
773build_alias
774LIBS
775ECHO_T
776ECHO_N
777ECHO_C
778DEFS
779mandir
780localedir
781libdir
782psdir
783pdfdir
784dvidir
785htmldir
786infodir
787docdir
788oldincludedir
789includedir
790localstatedir
791sharedstatedir
792sysconfdir
793datadir
794datarootdir
795libexecdir
796sbindir
797bindir
798program_transform_name
799prefix
800exec_prefix
801PACKAGE_URL
802PACKAGE_BUGREPORT
803PACKAGE_STRING
804PACKAGE_VERSION
805PACKAGE_TARNAME
806PACKAGE_NAME
807PATH_SEPARATOR
808SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000809ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000810ac_user_opts='
811enable_option_checking
812enable_universalsdk
813with_universal_archs
814with_framework_name
815enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200821with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200822with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000823enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700824with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100825with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400826with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100827with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800828with_memory_sanitizer
829with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_libs
831with_system_expat
832with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100833with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100834with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000835enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700836with_tcltk_includes
837with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000839enable_ipv6
840with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000842with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700844with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_libm
846with_libc
847enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100848with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000849with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800850with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100851with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100852with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200853with_builtin_hashlib_hashes
Matthias Kloseb9621712010-04-24 17:59:49 +0000854'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855 ac_precious_vars='build_alias
856host_alias
857target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100858MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859CC
860CFLAGS
861LDFLAGS
862LIBS
863CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800864CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700865PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800866PKG_CONFIG
867PKG_CONFIG_PATH
868PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869
Guido van Rossum627b2d71993-12-24 10:39:16 +0000870
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000872ac_init_help=
873ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000874ac_unrecognized_opts=
875ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876# The variables have the same names as the options, with
877# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000878cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881no_recursion=
882prefix=NONE
883program_prefix=NONE
884program_suffix=NONE
885program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890x_includes=NONE
891x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000892
893# Installation directory options.
894# These are left unexpanded so users can "make install exec_prefix=/foo"
895# and all the variables that are supposed to be based on exec_prefix
896# by default will actually change.
897# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899bindir='${exec_prefix}/bin'
900sbindir='${exec_prefix}/sbin'
901libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902datarootdir='${prefix}/share'
903datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904sysconfdir='${prefix}/etc'
905sharedstatedir='${prefix}/com'
906localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907includedir='${prefix}/include'
908oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
910infodir='${datarootdir}/info'
911htmldir='${docdir}'
912dvidir='${docdir}'
913pdfdir='${docdir}'
914psdir='${docdir}'
915libdir='${exec_prefix}/lib'
916localedir='${datarootdir}/locale'
917mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923 # If the previous option needs an argument, assign it.
924 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926 ac_prev=
927 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000928 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200931 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
932 *=) ac_optarg= ;;
933 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 # Accept the important Cygnus configure options, so we can diagnose typos.
937
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 case $ac_dashdash$ac_option in
939 --)
940 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -bindir | --bindir | --bindi | --bind | --bin | --bi)
943 ac_prev=bindir ;;
944 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 -cache-file | --cache-file | --cache-fil | --cache-fi \
953 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
954 ac_prev=cache_file ;;
955 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
956 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 cache_file=$ac_optarg ;;
958
959 --config-cache | -C)
960 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000962 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000964 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
968 | --dataroo | --dataro | --datar)
969 ac_prev=datarootdir ;;
970 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
971 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
972 datarootdir=$ac_optarg ;;
973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000976 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000977 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200978 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000979 ac_useropt_orig=$ac_useropt
980 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
981 case $ac_user_opts in
982 *"
983"enable_$ac_useropt"
984"*) ;;
985 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
986 ac_unrecognized_sep=', ';;
987 esac
988 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000989
990 -docdir | --docdir | --docdi | --doc | --do)
991 ac_prev=docdir ;;
992 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
993 docdir=$ac_optarg ;;
994
995 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
996 ac_prev=dvidir ;;
997 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
998 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001001 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001003 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001004 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001005 ac_useropt_orig=$ac_useropt
1006 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1007 case $ac_user_opts in
1008 *"
1009"enable_$ac_useropt"
1010"*) ;;
1011 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1012 ac_unrecognized_sep=', ';;
1013 esac
1014 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1017 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1018 | --exec | --exe | --ex)
1019 ac_prev=exec_prefix ;;
1020 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1021 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1022 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001026 # Obsolete; use --with-gas.
1027 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 -help | --help | --hel | --he | -h)
1030 ac_init_help=long ;;
1031 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1032 ac_init_help=recursive ;;
1033 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1034 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1042 ac_prev=htmldir ;;
1043 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1044 | --ht=*)
1045 htmldir=$ac_optarg ;;
1046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -includedir | --includedir | --includedi | --included | --include \
1048 | --includ | --inclu | --incl | --inc)
1049 ac_prev=includedir ;;
1050 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1051 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -infodir | --infodir | --infodi | --infod | --info | --inf)
1055 ac_prev=infodir ;;
1056 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -libdir | --libdir | --libdi | --libd)
1060 ac_prev=libdir ;;
1061 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1065 | --libexe | --libex | --libe)
1066 ac_prev=libexecdir ;;
1067 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1068 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 -localedir | --localedir | --localedi | --localed | --locale)
1072 ac_prev=localedir ;;
1073 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1074 localedir=$ac_optarg ;;
1075
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001077 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078 ac_prev=localstatedir ;;
1079 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001080 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082
1083 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1084 ac_prev=mandir ;;
1085 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 # Obsolete; use --without-fp.
1090 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 no_create=yes ;;
1095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001096 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1097 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1098 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1101 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1102 | --oldin | --oldi | --old | --ol | --o)
1103 ac_prev=oldincludedir ;;
1104 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1105 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1106 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1110 ac_prev=prefix ;;
1111 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1115 | --program-pre | --program-pr | --program-p)
1116 ac_prev=program_prefix ;;
1117 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1118 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1122 | --program-suf | --program-su | --program-s)
1123 ac_prev=program_suffix ;;
1124 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1125 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
1128 -program-transform-name | --program-transform-name \
1129 | --program-transform-nam | --program-transform-na \
1130 | --program-transform-n | --program-transform- \
1131 | --program-transform | --program-transfor \
1132 | --program-transfo | --program-transf \
1133 | --program-trans | --program-tran \
1134 | --progr-tra | --program-tr | --program-t)
1135 ac_prev=program_transform_name ;;
1136 -program-transform-name=* | --program-transform-name=* \
1137 | --program-transform-nam=* | --program-transform-na=* \
1138 | --program-transform-n=* | --program-transform-=* \
1139 | --program-transform=* | --program-transfor=* \
1140 | --program-transfo=* | --program-transf=* \
1141 | --program-trans=* | --program-tran=* \
1142 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001145 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1146 ac_prev=pdfdir ;;
1147 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1148 pdfdir=$ac_optarg ;;
1149
1150 -psdir | --psdir | --psdi | --psd | --ps)
1151 ac_prev=psdir ;;
1152 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1153 psdir=$ac_optarg ;;
1154
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1156 | -silent | --silent | --silen | --sile | --sil)
1157 silent=yes ;;
1158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160 ac_prev=sbindir ;;
1161 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
1165 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167 | --sharedst | --shareds | --shared | --share | --shar \
1168 | --sha | --sh)
1169 ac_prev=sharedstatedir ;;
1170 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 -site | --site | --sit)
1177 ac_prev=site ;;
1178 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182 ac_prev=srcdir ;;
1183 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187 | --syscon | --sysco | --sysc | --sys | --sy)
1188 ac_prev=sysconfdir ;;
1189 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199 verbose=yes ;;
1200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 -version | --version | --versio | --versi | --vers | -V)
1202 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
1220 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 ac_useropt_orig=$ac_useropt
1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227 case $ac_user_opts in
1228 *"
1229"with_$ac_useropt"
1230"*) ;;
1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232 ac_unrecognized_sep=', ';;
1233 esac
1234 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 --x)
1237 # Obsolete; use --with-x.
1238 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241 | --x-incl | --x-inc | --x-in | --x-i)
1242 ac_prev=x_includes ;;
1243 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
1247 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249 ac_prev=x_libraries ;;
1250 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 *=*)
1259 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 case $ac_envvar in #(
1262 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 export $ac_envvar ;;
1267
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001268 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001273 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 ;;
1275
1276 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277done
1278
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282fi
1283
Matthias Kloseb9621712010-04-24 17:59:49 +00001284if test -n "$ac_unrecognized_opts"; then
1285 case $enable_option_checking in
1286 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289 esac
1290fi
1291
1292# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294 datadir sysconfdir sharedstatedir localstatedir includedir \
1295 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001296 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 # Remove trailing slashes.
1300 case $ac_val in
1301 */ )
1302 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303 eval $ac_var=\$ac_val;;
1304 esac
1305 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 [\\/$]* | ?:[\\/]* ) continue;;
1308 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001311done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# There might be people who depend on the old broken behavior: `$host'
1314# used to hold the argument of --host etc.
1315# FIXME: To remove some day.
1316build=$build_alias
1317host=$host_alias
1318target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320# FIXME: To remove some day.
1321if test "x$host_alias" != x; then
1322 if test "x$build_alias" = x; then
1323 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 elif test "x$build_alias" != "x$host_alias"; then
1325 cross_compiling=yes
1326 fi
1327fi
1328
1329ac_tool_prefix=
1330test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332test "$silent" = yes && exec 6>/dev/null
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336ac_ls_di=`ls -di .` &&
1337ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341
1342
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343# Find the source files, if location was not specified.
1344if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 ac_confdir=`$as_dirname -- "$as_myself" ||
1348$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349 X"$as_myself" : 'X\(//\)[^/]' \| \
1350 X"$as_myself" : 'X\(//\)$' \| \
1351 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)[^/].*/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\/\)$/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\).*/{
1366 s//\1/
1367 q
1368 }
1369 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 srcdir=..
1373 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374else
1375 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377if test ! -r "$srcdir/$ac_unique_file"; then
1378 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384 pwd)`
1385# When building in place, set srcdir=.
1386if test "$ac_abs_confdir" = "$ac_pwd"; then
1387 srcdir=.
1388fi
1389# Remove unnecessary trailing slashes from srcdir.
1390# Double slashes in file names in object file debugging info
1391# mess up M-x gdb in Emacs.
1392case $srcdir in
1393*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394esac
1395for ac_var in $ac_precious_vars; do
1396 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_env_${ac_var}_value=\$${ac_var}
1398 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402#
1403# Report the --help message.
1404#
1405if test "$ac_init_help" = "long"; then
1406 # Omit some internal or obsolete options to make the list less imposing.
1407 # This message is too long to be a string in the A/UX 3.1 sh.
1408 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001409\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414VAR=VALUE. See below for descriptions of some of the useful variables.
1415
1416Defaults for the options are specified in brackets.
1417
1418Configuration:
1419 -h, --help display this help and exit
1420 --help=short display options specific to this package
1421 --help=recursive display the short help of all the included packages
1422 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001423 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --cache-file=FILE cache test results in FILE [disabled]
1425 -C, --config-cache alias for \`--cache-file=config.cache'
1426 -n, --no-create do not create output files
1427 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429Installation directories:
1430 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435By default, \`make install' will install all the files in
1436\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1437an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438for instance \`--prefix=\$HOME'.
1439
1440For better control, use the options below.
1441
1442Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --bindir=DIR user executables [EPREFIX/bin]
1444 --sbindir=DIR system admin executables [EPREFIX/sbin]
1445 --libexecdir=DIR program executables [EPREFIX/libexec]
1446 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1447 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1448 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1449 --libdir=DIR object code libraries [EPREFIX/lib]
1450 --includedir=DIR C header files [PREFIX/include]
1451 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1452 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1453 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1454 --infodir=DIR info documentation [DATAROOTDIR/info]
1455 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1456 --mandir=DIR man documentation [DATAROOTDIR/man]
1457 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1458 --htmldir=DIR html documentation [DOCDIR]
1459 --dvidir=DIR dvi documentation [DOCDIR]
1460 --pdfdir=DIR pdf documentation [DOCDIR]
1461 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463
1464 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001465
1466System types:
1467 --build=BUILD configure for building on BUILD [guessed]
1468 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001469_ACEOF
1470fi
1471
1472if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001473 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001474 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001475 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 cat <<\_ACEOF
1477
1478Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001479 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1481 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001482 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001483 create a universal binary build. SDKDIR specifies
1484 which macOS SDK should be used to perform the build,
1485 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001487 create a Python.framework rather than a traditional
1488 Unix install. optional INSTALLDIR specifies the
1489 installation path. see Mac/README.rst (default is
1490 no)
1491 --enable-shared enable building a shared Python library (default is
1492 no)
1493 --enable-profiling enable C-level code profiling with gprof (default is
1494 no)
1495 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1496 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001497 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001498 support loadable extensions in _sqlite module, see
1499 Doc/library/sqlite3.rst (default is no)
1500 --enable-ipv6 enable ipv6 (with ipv4) support, see
1501 Doc/library/socket.rst (default is yes if supported)
1502 --enable-big-digits[=15|30]
1503 use big digits (30 or 15 bits) for Python longs
1504 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
1506Optional Packages:
1507 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1508 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001509 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001510 specify the kind of universal binary that should be
1511 created. this option is only valid when
1512 --enable-universalsdk is set; options are:
1513 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1514 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001515 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001516 specify the name for the python framework on macOS
1517 only valid when --enable-framework is set. see
1518 Mac/README.rst (default is 'Python')
1519 --with-cxx-main[=COMPILER]
1520 compile main() and link Python executable with C++
1521 compiler specified in COMPILER (default is $CXX)
1522 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1523 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001524 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001525 (default is no)
1526 --with-assertions build with C assertions enabled (default is no)
1527 --with-lto enable Link-Time-Optimization in any build (default
1528 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001529 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001530 select hash algorithm for use in Python/pyhash.c
1531 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001532 --with-tzpath=<list of absolute paths separated by pathsep>
1533 Select the default time zone search path for zoneinfo.TZPATH
1534
Charles-François Natalid30b0222014-05-08 23:08:51 +01001535 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001536 enable AddressSanitizer memory error detector,
1537 'asan' (default is no)
1538 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1539 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001540 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001541 enable UndefinedBehaviorSanitizer undefined
1542 behaviour detector, 'ubsan' (default is no)
1543 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001544 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001545 library, see Doc/library/pyexpat.rst (default is no)
1546 --with-system-ffi build _ctypes module using an installed ffi library,
1547 see Doc/library/ctypes.rst (default is
1548 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001549 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001550 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001551 --with-decimal-contextvar
1552 build _decimal module using a coroutine-local rather
1553 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001554 --with-tcltk-includes='-I...'
1555 override search for Tcl and Tk include files
1556 --with-tcltk-libs='-L...'
1557 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001558 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001559 override order to check db backends for dbm; a valid
1560 value is a colon separated string with the backend
1561 names `ndbm', `gdbm' and `bdb'.
1562 --with-doc-strings enable documentation strings (default is yes)
1563 --with-pymalloc enable specialized mallocs (default is yes)
1564 --with-c-locale-coercion
1565 enable C locale coercion to a UTF-8 based locale
1566 (default is yes)
1567 --with-valgrind enable Valgrind support (default is no)
1568 --with-dtrace enable DTrace support (default is no)
1569 --with-libm=STRING override libm math library to STRING (default is
1570 system-dependent)
1571 --with-libc=STRING override libc C library to STRING (default is
1572 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001573 --with-platlibdir=DIRNAME
1574 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001575 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001576 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001577 --with-ensurepip[=install|upgrade|no]
1578 "install" or "upgrade" using bundled pip (default is
1579 upgrade)
1580 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001581 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001582 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001583 Python's preferred selection (default), openssl:
1584 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001585 custom string, PROTOCOL_SSLv2 ignores the setting,
1586 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001587 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1588 builtin hash modules, md5, sha1, sha256, sha512,
1589 sha3 (with shake), blake2
Martin v. Löwis11437992002-04-12 09:54:03 +00001590
1591Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001592 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 CC C compiler command
1594 CFLAGS C compiler flags
1595 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1596 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001598 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001601 PROFILE_TASK
1602 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001603 PKG_CONFIG path to pkg-config utility
1604 PKG_CONFIG_PATH
1605 directories to add to pkg-config's search path
1606 PKG_CONFIG_LIBDIR
1607 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001608
1609Use these variables to override the choices made by `configure' or to help
1610it to find libraries and programs with nonstandard names/locations.
1611
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001612Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001615fi
1616
1617if test "$ac_init_help" = "recursive"; then
1618 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 test -d "$ac_dir" ||
1621 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1622 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 ac_builddir=.
1624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625case "$ac_dir" in
1626.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1627*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001628 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001630 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 case $ac_top_builddir_sub in
1632 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1633 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1634 esac ;;
1635esac
1636ac_abs_top_builddir=$ac_pwd
1637ac_abs_builddir=$ac_pwd$ac_dir_suffix
1638# for backward compatibility:
1639ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001640
1641case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 ac_top_srcdir=$ac_top_builddir_sub
1645 ac_abs_top_srcdir=$ac_pwd ;;
1646 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001648 ac_top_srcdir=$srcdir
1649 ac_abs_top_srcdir=$srcdir ;;
1650 *) # Relative name.
1651 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1652 ac_top_srcdir=$ac_top_build_prefix$srcdir
1653 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001654esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 cd "$ac_dir" || { ac_status=$?; continue; }
1658 # Check for guested configure.
1659 if test -f "$ac_srcdir/configure.gnu"; then
1660 echo &&
1661 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1662 elif test -f "$ac_srcdir/configure"; then
1663 echo &&
1664 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001665 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001666 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001667 fi || ac_status=$?
1668 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001669 done
1670fi
1671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001672test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001673if $ac_init_version; then
1674 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001675python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001676generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001677
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001678Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001679This configure script is free software; the Free Software Foundation
1680gives unlimited permission to copy, distribute and modify it.
1681_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001682 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001684
1685## ------------------------ ##
1686## Autoconf initialization. ##
1687## ------------------------ ##
1688
1689# ac_fn_c_try_compile LINENO
1690# --------------------------
1691# Try to compile conftest.$ac_ext, and return whether this succeeded.
1692ac_fn_c_try_compile ()
1693{
1694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695 rm -f conftest.$ac_objext
1696 if { { ac_try="$ac_compile"
1697case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_compile") 2>conftest.err
1704 ac_status=$?
1705 if test -s conftest.err; then
1706 grep -v '^ *+' conftest.err >conftest.er1
1707 cat conftest.er1 >&5
1708 mv -f conftest.er1 conftest.err
1709 fi
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; } && {
1712 test -z "$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 } && test -s conftest.$ac_objext; then :
1715 ac_retval=0
1716else
1717 $as_echo "$as_me: failed program was:" >&5
1718sed 's/^/| /' conftest.$ac_ext >&5
1719
1720 ac_retval=1
1721fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001722 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001723 as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_compile
1726
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001727# ac_fn_c_try_cpp LINENO
1728# ----------------------
1729# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1730ac_fn_c_try_cpp ()
1731{
1732 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1733 if { { ac_try="$ac_cpp conftest.$ac_ext"
1734case "(($ac_try" in
1735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1736 *) ac_try_echo=$ac_try;;
1737esac
1738eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1739$as_echo "$ac_try_echo"; } >&5
1740 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1741 ac_status=$?
1742 if test -s conftest.err; then
1743 grep -v '^ *+' conftest.err >conftest.er1
1744 cat conftest.er1 >&5
1745 mv -f conftest.er1 conftest.err
1746 fi
1747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1748 test $ac_status = 0; } > conftest.i && {
1749 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1750 test ! -s conftest.err
1751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1760 as_fn_set_status $ac_retval
1761
1762} # ac_fn_c_try_cpp
1763
Matthias Kloseb9621712010-04-24 17:59:49 +00001764# ac_fn_c_try_link LINENO
1765# -----------------------
1766# Try to link conftest.$ac_ext, and return whether this succeeded.
1767ac_fn_c_try_link ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1770 rm -f conftest.$ac_objext conftest$ac_exeext
1771 if { { ac_try="$ac_link"
1772case "(($ac_try" in
1773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774 *) ac_try_echo=$ac_try;;
1775esac
1776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777$as_echo "$ac_try_echo"; } >&5
1778 (eval "$ac_link") 2>conftest.err
1779 ac_status=$?
1780 if test -s conftest.err; then
1781 grep -v '^ *+' conftest.err >conftest.er1
1782 cat conftest.er1 >&5
1783 mv -f conftest.er1 conftest.err
1784 fi
1785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786 test $ac_status = 0; } && {
1787 test -z "$ac_c_werror_flag" ||
1788 test ! -s conftest.err
1789 } && test -s conftest$ac_exeext && {
1790 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001791 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 }; then :
1793 ac_retval=0
1794else
1795 $as_echo "$as_me: failed program was:" >&5
1796sed 's/^/| /' conftest.$ac_ext >&5
1797
1798 ac_retval=1
1799fi
1800 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1801 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1802 # interfere with the next link command; also delete a directory that is
1803 # left behind by Apple's compiler. We do this before executing the actions.
1804 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001805 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 as_fn_set_status $ac_retval
1807
1808} # ac_fn_c_try_link
1809
Matthias Kloseb9621712010-04-24 17:59:49 +00001810# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1811# -------------------------------------------------------
1812# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1813# the include files in INCLUDES and setting the cache variable VAR
1814# accordingly.
1815ac_fn_c_check_header_mongrel ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001818 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001821if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001822 $as_echo_n "(cached) " >&6
1823fi
1824eval ac_res=\$$3
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826$as_echo "$ac_res" >&6; }
1827else
1828 # Is the header compilable?
1829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1830$as_echo_n "checking $2 usability... " >&6; }
1831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834#include <$2>
1835_ACEOF
1836if ac_fn_c_try_compile "$LINENO"; then :
1837 ac_header_compiler=yes
1838else
1839 ac_header_compiler=no
1840fi
1841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1843$as_echo "$ac_header_compiler" >&6; }
1844
1845# Is the header present?
1846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1847$as_echo_n "checking $2 presence... " >&6; }
1848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849/* end confdefs.h. */
1850#include <$2>
1851_ACEOF
1852if ac_fn_c_try_cpp "$LINENO"; then :
1853 ac_header_preproc=yes
1854else
1855 ac_header_preproc=no
1856fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001857rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1859$as_echo "$ac_header_preproc" >&6; }
1860
1861# So? What about this header?
1862case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1863 yes:no: )
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1865$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868 ;;
1869 no:yes:* )
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1871$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1873$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1875$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1877$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1879$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001880( $as_echo "## --------------------------------------- ##
1881## Report this to https://bugs.python.org/ ##
1882## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001883 ) | sed "s/^/$as_me: WARNING: /" >&2
1884 ;;
1885esac
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001888if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001889 $as_echo_n "(cached) " >&6
1890else
1891 eval "$3=\$ac_header_compiler"
1892fi
1893eval ac_res=\$$3
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1895$as_echo "$ac_res" >&6; }
1896fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898
1899} # ac_fn_c_check_header_mongrel
1900
1901# ac_fn_c_try_run LINENO
1902# ----------------------
1903# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1904# that executables *can* be run.
1905ac_fn_c_try_run ()
1906{
1907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908 if { { ac_try="$ac_link"
1909case "(($ac_try" in
1910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1911 *) ac_try_echo=$ac_try;;
1912esac
1913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1914$as_echo "$ac_try_echo"; } >&5
1915 (eval "$ac_link") 2>&5
1916 ac_status=$?
1917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1919 { { case "(($ac_try" in
1920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1921 *) ac_try_echo=$ac_try;;
1922esac
1923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1924$as_echo "$ac_try_echo"; } >&5
1925 (eval "$ac_try") 2>&5
1926 ac_status=$?
1927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1928 test $ac_status = 0; }; }; then :
1929 ac_retval=0
1930else
1931 $as_echo "$as_me: program exited with status $ac_status" >&5
1932 $as_echo "$as_me: failed program was:" >&5
1933sed 's/^/| /' conftest.$ac_ext >&5
1934
1935 ac_retval=$ac_status
1936fi
1937 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001938 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001939 as_fn_set_status $ac_retval
1940
1941} # ac_fn_c_try_run
1942
1943# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1944# -------------------------------------------------------
1945# Tests whether HEADER exists and can be compiled using the include files in
1946# INCLUDES, setting the cache variable VAR accordingly.
1947ac_fn_c_check_header_compile ()
1948{
1949 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1951$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001952if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 $as_echo_n "(cached) " >&6
1954else
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$4
1958#include <$2>
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961 eval "$3=yes"
1962else
1963 eval "$3=no"
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967eval ac_res=\$$3
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001971
1972} # ac_fn_c_check_header_compile
1973
Matthias Kloseb9621712010-04-24 17:59:49 +00001974# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1975# -------------------------------------------
1976# Tests whether TYPE exists after having included INCLUDES, setting cache
1977# variable VAR accordingly.
1978ac_fn_c_check_type ()
1979{
1980 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1982$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001984 $as_echo_n "(cached) " >&6
1985else
1986 eval "$3=no"
1987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990int
1991main ()
1992{
1993if (sizeof ($2))
1994 return 0;
1995 ;
1996 return 0;
1997}
1998_ACEOF
1999if ac_fn_c_try_compile "$LINENO"; then :
2000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2001/* end confdefs.h. */
2002$4
2003int
2004main ()
2005{
2006if (sizeof (($2)))
2007 return 0;
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013
2014else
2015 eval "$3=yes"
2016fi
2017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2018fi
2019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2020fi
2021eval ac_res=\$$3
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2023$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002024 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002025
2026} # ac_fn_c_check_type
2027
Matthias Kloseb9621712010-04-24 17:59:49 +00002028# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2029# --------------------------------------------
2030# Tries to find the compile-time value of EXPR in a program that includes
2031# INCLUDES, setting VAR accordingly. Returns whether the value could be
2032# computed
2033ac_fn_c_compute_int ()
2034{
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 if test "$cross_compiling" = yes; then
2037 # Depending upon the size, compute the lo and hi bounds.
2038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_lo=0 ac_mid=0
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_hi=$ac_mid; break
2071else
2072 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2073 if test $ac_lo -le $ac_mid; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084$4
2085int
2086main ()
2087{
2088static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002089test_array [0] = 0;
2090return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_hi=-1 ac_mid=-1
2098 while :; do
2099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h. */
2101$4
2102int
2103main ()
2104{
2105static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002106test_array [0] = 0;
2107return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 ac_lo=$ac_mid; break
2115else
2116 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2117 if test $ac_mid -le $ac_hi; then
2118 ac_lo= ac_hi=
2119 break
2120 fi
2121 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124 done
2125else
2126 ac_lo= ac_hi=
2127fi
2128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2129fi
2130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2131# Binary search between lo and hi bounds.
2132while test "x$ac_lo" != "x$ac_hi"; do
2133 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137int
2138main ()
2139{
2140static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002141test_array [0] = 0;
2142return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002143
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_compile "$LINENO"; then :
2149 ac_hi=$ac_mid
2150else
2151 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2152fi
2153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2154done
2155case $ac_lo in #((
2156?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2157'') ac_retval=1 ;;
2158esac
2159 else
2160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161/* end confdefs.h. */
2162$4
2163static long int longval () { return $2; }
2164static unsigned long int ulongval () { return $2; }
2165#include <stdio.h>
2166#include <stdlib.h>
2167int
2168main ()
2169{
2170
2171 FILE *f = fopen ("conftest.val", "w");
2172 if (! f)
2173 return 1;
2174 if (($2) < 0)
2175 {
2176 long int i = longval ();
2177 if (i != ($2))
2178 return 1;
2179 fprintf (f, "%ld", i);
2180 }
2181 else
2182 {
2183 unsigned long int i = ulongval ();
2184 if (i != ($2))
2185 return 1;
2186 fprintf (f, "%lu", i);
2187 }
2188 /* Do not output a trailing newline, as this causes \r\n confusion
2189 on some platforms. */
2190 return ferror (f) || fclose (f) != 0;
2191
2192 ;
2193 return 0;
2194}
2195_ACEOF
2196if ac_fn_c_try_run "$LINENO"; then :
2197 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2198else
2199 ac_retval=1
2200fi
2201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2202 conftest.$ac_objext conftest.beam conftest.$ac_ext
2203rm -f conftest.val
2204
2205 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002206 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002207 as_fn_set_status $ac_retval
2208
2209} # ac_fn_c_compute_int
2210
2211# ac_fn_c_check_func LINENO FUNC VAR
2212# ----------------------------------
2213# Tests whether FUNC exists, setting the cache variable VAR accordingly
2214ac_fn_c_check_func ()
2215{
2216 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2218$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002219if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002220 $as_echo_n "(cached) " >&6
2221else
2222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2223/* end confdefs.h. */
2224/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2225 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2226#define $2 innocuous_$2
2227
2228/* System header to define __stub macros and hopefully few prototypes,
2229 which can conflict with char $2 (); below.
2230 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2231 <limits.h> exists even on freestanding compilers. */
2232
2233#ifdef __STDC__
2234# include <limits.h>
2235#else
2236# include <assert.h>
2237#endif
2238
2239#undef $2
2240
2241/* Override any GCC internal prototype to avoid an error.
2242 Use char because int might match the return type of a GCC
2243 builtin and then its argument prototype would still apply. */
2244#ifdef __cplusplus
2245extern "C"
2246#endif
2247char $2 ();
2248/* The GNU C library defines this for functions which it implements
2249 to always fail with ENOSYS. Some functions are actually named
2250 something starting with __ and the normal name is an alias. */
2251#if defined __stub_$2 || defined __stub___$2
2252choke me
2253#endif
2254
2255int
2256main ()
2257{
2258return $2 ();
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_link "$LINENO"; then :
2264 eval "$3=yes"
2265else
2266 eval "$3=no"
2267fi
2268rm -f core conftest.err conftest.$ac_objext \
2269 conftest$ac_exeext conftest.$ac_ext
2270fi
2271eval ac_res=\$$3
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2273$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002275
2276} # ac_fn_c_check_func
2277
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002278# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2279# ---------------------------------------------
2280# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2281# accordingly.
2282ac_fn_c_check_decl ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 as_decl_name=`echo $2|sed 's/ *(.*//'`
2286 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2288$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2289if eval \${$3+:} false; then :
2290 $as_echo_n "(cached) " >&6
2291else
2292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h. */
2294$4
2295int
2296main ()
2297{
2298#ifndef $as_decl_name
2299#ifdef __cplusplus
2300 (void) $as_decl_use;
2301#else
2302 (void) $as_decl_name;
2303#endif
2304#endif
2305
2306 ;
2307 return 0;
2308}
2309_ACEOF
2310if ac_fn_c_try_compile "$LINENO"; then :
2311 eval "$3=yes"
2312else
2313 eval "$3=no"
2314fi
2315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2316fi
2317eval ac_res=\$$3
2318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2319$as_echo "$ac_res" >&6; }
2320 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2321
2322} # ac_fn_c_check_decl
2323
Matthias Kloseb9621712010-04-24 17:59:49 +00002324# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2325# ----------------------------------------------------
2326# Tries to find if the field MEMBER exists in type AGGR, after including
2327# INCLUDES, setting cache variable VAR accordingly.
2328ac_fn_c_check_member ()
2329{
2330 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2332$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002333if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002334 $as_echo_n "(cached) " >&6
2335else
2336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337/* end confdefs.h. */
2338$5
2339int
2340main ()
2341{
2342static $2 ac_aggr;
2343if (ac_aggr.$3)
2344return 0;
2345 ;
2346 return 0;
2347}
2348_ACEOF
2349if ac_fn_c_try_compile "$LINENO"; then :
2350 eval "$4=yes"
2351else
2352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h. */
2354$5
2355int
2356main ()
2357{
2358static $2 ac_aggr;
2359if (sizeof ac_aggr.$3)
2360return 0;
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$4=yes"
2367else
2368 eval "$4=no"
2369fi
2370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371fi
2372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2373fi
2374eval ac_res=\$$4
2375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2376$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002377 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002378
2379} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002381This file contains any messages produced by compilers while
2382running configure, to aid debugging if configure makes a mistake.
2383
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002384It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002385generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002386
2387 $ $0 $@
2388
2389_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002390exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002391{
2392cat <<_ASUNAME
2393## --------- ##
2394## Platform. ##
2395## --------- ##
2396
2397hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2398uname -m = `(uname -m) 2>/dev/null || echo unknown`
2399uname -r = `(uname -r) 2>/dev/null || echo unknown`
2400uname -s = `(uname -s) 2>/dev/null || echo unknown`
2401uname -v = `(uname -v) 2>/dev/null || echo unknown`
2402
2403/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2404/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2405
2406/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2407/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2408/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002410/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2411/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2412/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2413
2414_ASUNAME
2415
2416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2417for as_dir in $PATH
2418do
2419 IFS=$as_save_IFS
2420 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 $as_echo "PATH: $as_dir"
2422 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002424
2425} >&5
2426
2427cat >&5 <<_ACEOF
2428
2429
2430## ----------- ##
2431## Core tests. ##
2432## ----------- ##
2433
2434_ACEOF
2435
2436
2437# Keep a trace of the command line.
2438# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002439# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002440# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002441# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002442ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002443ac_configure_args0=
2444ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002445ac_must_keep_next=false
2446for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002447do
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 for ac_arg
2449 do
2450 case $ac_arg in
2451 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2452 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2453 | -silent | --silent | --silen | --sile | --sil)
2454 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002456 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002457 esac
2458 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002460 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002462 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002463 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002465 case $ac_arg in
2466 *=* | --config-cache | -C | -disable-* | --disable-* \
2467 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2468 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2469 | -with-* | --with-* | -without-* | --without-* | --x)
2470 case "$ac_configure_args0 " in
2471 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2472 esac
2473 ;;
2474 -* ) ac_must_keep_next=true ;;
2475 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 ;;
2479 esac
2480 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002481done
Matthias Kloseb9621712010-04-24 17:59:49 +00002482{ ac_configure_args0=; unset ac_configure_args0;}
2483{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002484
2485# When interrupted or exit'd, cleanup temporary files, and complete
2486# config.log. We remove comments because anyway the quotes in there
2487# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488# WARNING: Use '\'' to represent an apostrophe within the trap.
2489# 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 +00002490trap 'exit_status=$?
2491 # Save into config.log some information that might help in debugging.
2492 {
2493 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002494
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002496## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
2499 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500(
2501 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2502 eval ac_val=\$$ac_var
2503 case $ac_val in #(
2504 *${as_nl}*)
2505 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2507$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
2509 case $ac_var in #(
2510 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2512 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac ;;
2514 esac
2515 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2518 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 "s/'\''/'\''\\\\'\'''\''/g;
2521 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2522 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002523 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002525 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 esac |
2527 sort
2528)
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002530
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002532## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002534 echo
2535 for ac_var in $ac_subst_vars
2536 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 eval ac_val=\$$ac_var
2538 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 done | sort
2543 echo
2544
2545 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002546 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002548## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002549 echo
2550 for ac_var in $ac_subst_files
2551 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 eval ac_val=\$$ac_var
2553 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002554 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 done | sort
2558 echo
2559 fi
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002563## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 echo
2568 fi
2569 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002570 $as_echo "$as_me: caught signal $ac_signal"
2571 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 rm -f core *.core core.conftest.* &&
2574 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002577for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002579done
2580ac_signal=0
2581
2582# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002584
Matthias Kloseb9621712010-04-24 17:59:49 +00002585$as_echo "/* confdefs.h */" > confdefs.h
2586
Martin v. Löwis11437992002-04-12 09:54:03 +00002587# Predefined preprocessor variables.
2588
2589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_NAME "$PACKAGE_NAME"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2595_ACEOF
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_VERSION "$PACKAGE_VERSION"
2599_ACEOF
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_STRING "$PACKAGE_STRING"
2603_ACEOF
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2607_ACEOF
2608
Matthias Kloseb9621712010-04-24 17:59:49 +00002609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_URL "$PACKAGE_URL"
2611_ACEOF
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613
2614# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002615# Prefer an explicitly selected file to automatically selected ones.
2616ac_site_file1=NONE
2617ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002619 # We do not want a PATH search for config.site.
2620 case $CONFIG_SITE in #((
2621 -*) ac_site_file1=./$CONFIG_SITE;;
2622 */*) ac_site_file1=$CONFIG_SITE;;
2623 *) ac_site_file1=./$CONFIG_SITE;;
2624 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 ac_site_file1=$prefix/share/config.site
2627 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628else
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 ac_site_file1=$ac_default_prefix/share/config.site
2630 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002632for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633do
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 test "x$ac_site_file" = xNONE && continue
2635 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2637$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002639 . "$ac_site_file" \
2640 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2641$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2642as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002643See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002644 fi
2645done
2646
2647if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 # Some versions of bash will fail to source /dev/null (special files
2649 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2650 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2652$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2655 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002658else
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2660$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 >$cache_file
2662fi
2663
2664# Check that the precious variables saved in the cache have kept the same
2665# value.
2666ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2669 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2671 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 case $ac_old_set,$ac_new_set in
2673 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2675$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 +00002676 ac_cache_corrupted=: ;;
2677 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2679$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 ac_cache_corrupted=: ;;
2681 ,);;
2682 *)
2683 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 # differences in whitespace do not lead to failure.
2685 ac_old_val_w=`echo x $ac_old_val`
2686 ac_new_val_w=`echo x $ac_new_val`
2687 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2689$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2690 ac_cache_corrupted=:
2691 else
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2693$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2694 eval $ac_var=\$ac_old_val
2695 fi
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2697$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2699$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 fi;;
2701 esac
2702 # Pass precious variables to config.status.
2703 if test "$ac_new_set" = set; then
2704 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 *) ac_arg=$ac_var=$ac_new_val ;;
2707 esac
2708 case " $ac_configure_args " in
2709 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002710 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 esac
2712 fi
2713done
2714if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002715 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2718$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002719 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002721## -------------------- ##
2722## Main body of script. ##
2723## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002724
Guido van Rossum7f43da71994-08-01 12:15:30 +00002725ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002730
Guido van Rossum627b2d71993-12-24 10:39:16 +00002731
Michael W. Hudson54241132001-12-07 15:38:26 +00002732
Trent Nelson4d4ec652012-10-16 08:51:24 -04002733
Christian Heimesff5be6e2018-01-20 13:19:21 +01002734
2735
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002736if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002737 # If we're building out-of-tree, we need to make sure the following
2738 # resources get picked up before their $srcdir counterparts.
2739 # Objects/ -> typeslots.inc
2740 # Include/ -> Python-ast.h, graminit.h
2741 # Python/ -> importlib.h
2742 # (A side effect of this is that these resources will automatically be
2743 # regenerated when building out-of-tree, regardless of whether or not
2744 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2745 # off.)
2746 BASECPPFLAGS="-IObjects -IInclude -IPython"
2747else
2748 BASECPPFLAGS=""
2749fi
2750
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751
2752
2753
2754
Victor Stinner9ed34a82017-05-02 22:35:58 +02002755if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757# Extract the first word of "git", so it can be a program name with args.
2758set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2760$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762 $as_echo_n "(cached) " >&6
2763else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764 if test -n "$HAS_GIT"; then
2765 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766else
2767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2768for as_dir in $PATH
2769do
2770 IFS=$as_save_IFS
2771 test -z "$as_dir" && as_dir=.
2772 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002774 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2776 break 2
2777 fi
2778done
2779 done
2780IFS=$as_save_IFS
2781
Ned Deily5c4b0d02017-03-04 00:19:55 -05002782 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002783fi
2784fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002785HAS_GIT=$ac_cv_prog_HAS_GIT
2786if test -n "$HAS_GIT"; then
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2788$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002789else
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2791$as_echo "no" >&6; }
2792fi
2793
2794
2795else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002796HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002797fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002798if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799then
Xiang Zhang4c855572018-08-20 22:36:19 +08002800 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2801 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2802 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002804 GITVERSION=""
2805 GITTAG=""
2806 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002807fi
2808
2809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002810ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002811
2812
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002813ac_aux_dir=
2814for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2815 if test -f "$ac_dir/install-sh"; then
2816 ac_aux_dir=$ac_dir
2817 ac_install_sh="$ac_aux_dir/install-sh -c"
2818 break
2819 elif test -f "$ac_dir/install.sh"; then
2820 ac_aux_dir=$ac_dir
2821 ac_install_sh="$ac_aux_dir/install.sh -c"
2822 break
2823 elif test -f "$ac_dir/shtool"; then
2824 ac_aux_dir=$ac_dir
2825 ac_install_sh="$ac_aux_dir/shtool install -c"
2826 break
2827 fi
2828done
2829if test -z "$ac_aux_dir"; then
2830 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2831fi
2832
2833# These three variables are undocumented and unsupported,
2834# and are intended to be withdrawn in a future Autoconf release.
2835# They can cause serious problems if a builder's source tree is in a directory
2836# whose full name contains unusual characters.
2837ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2838ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2839ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2840
2841
2842# Make sure we can run config.sub.
2843$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2844 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2845
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2847$as_echo_n "checking build system type... " >&6; }
2848if ${ac_cv_build+:} false; then :
2849 $as_echo_n "(cached) " >&6
2850else
2851 ac_build_alias=$build_alias
2852test "x$ac_build_alias" = x &&
2853 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2854test "x$ac_build_alias" = x &&
2855 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2856ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2857 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2861$as_echo "$ac_cv_build" >&6; }
2862case $ac_cv_build in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2865esac
2866build=$ac_cv_build
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_build
2869shift
2870build_cpu=$1
2871build_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875build_os=$*
2876IFS=$ac_save_IFS
2877case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2878
2879
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2881$as_echo_n "checking host system type... " >&6; }
2882if ${ac_cv_host+:} false; then :
2883 $as_echo_n "(cached) " >&6
2884else
2885 if test "x$host_alias" = x; then
2886 ac_cv_host=$ac_cv_build
2887else
2888 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2889 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2890fi
2891
2892fi
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2894$as_echo "$ac_cv_host" >&6; }
2895case $ac_cv_host in
2896*-*-*) ;;
2897*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2898esac
2899host=$ac_cv_host
2900ac_save_IFS=$IFS; IFS='-'
2901set x $ac_cv_host
2902shift
2903host_cpu=$1
2904host_vendor=$2
2905shift; shift
2906# Remember, the first character of IFS is used to create $*,
2907# except with old shells:
2908host_os=$*
2909IFS=$ac_save_IFS
2910case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2911
2912
2913
doko@python.orga10e4a92013-01-25 18:45:12 +01002914
2915
Ned Deilyfcbc2462014-08-22 13:32:49 -07002916# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2917rm -f pybuilddir.txt
2918
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919for ac_prog in python$PACKAGE_VERSION python3 python
2920do
2921 # Extract the first word of "$ac_prog", so it can be a program name with args.
2922set dummy $ac_prog; ac_word=$2
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2924$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002925if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926 $as_echo_n "(cached) " >&6
2927else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002928 if test -n "$PYTHON_FOR_REGEN"; then
2929 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002930else
2931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2932for as_dir in $PATH
2933do
2934 IFS=$as_save_IFS
2935 test -z "$as_dir" && as_dir=.
2936 for ac_exec_ext in '' $ac_executable_extensions; do
2937 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002938 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2940 break 2
2941 fi
2942done
2943 done
2944IFS=$as_save_IFS
2945
2946fi
2947fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002948PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2949if test -n "$PYTHON_FOR_REGEN"; then
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2951$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002952else
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2954$as_echo "no" >&6; }
2955fi
2956
2957
Victor Stinnera5c62a82017-05-03 18:21:48 +02002958 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002959done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002960test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002961
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002962
2963
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002964if test "$cross_compiling" = yes; then
2965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2966$as_echo_n "checking for python interpreter for cross build... " >&6; }
2967 if test -z "$PYTHON_FOR_BUILD"; then
2968 for interp in python$PACKAGE_VERSION python3 python; do
2969 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002970 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 +02002971 break
2972 fi
2973 interp=
2974 done
2975 if test x$interp = x; then
2976 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2977 fi
2978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2979$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002980 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 +02002981 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002982elif test "$cross_compiling" = maybe; then
2983 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002984else
2985 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2986fi
2987
2988
Martin v. Löwis11437992002-04-12 09:54:03 +00002989
Benjamin Petersond23f8222009-04-05 19:13:16 +00002990if test "$prefix" != "/"; then
2991 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2992fi
2993
2994
Martin v. Löwis11437992002-04-12 09:54:03 +00002995
2996
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002997# We don't use PACKAGE_ variables, and they cause conflicts
2998# with other autoconf-based packages that include Python.h
2999grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3000rm confdefs.h
3001mv confdefs.h.new confdefs.h
3002
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003003
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003004VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003005
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003006# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003007
3008SOVERSION=1.0
3009
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010# The later defininition of _XOPEN_SOURCE disables certain features
3011# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3012
Matthias Kloseb9621712010-04-24 17:59:49 +00003013$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003014
3015
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003016# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3017# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3018# them.
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003021
3022
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003023# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3024# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3025# them.
3026
Matthias Kloseb9621712010-04-24 17:59:49 +00003027$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003028
3029
Martin v. Löwisd6320502004-08-12 13:45:08 +00003030# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003031# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3032# them.
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003035
3036
3037
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003038define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003039
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003040# Arguments passed to configure.
3041
3042CONFIG_ARGS="$ac_configure_args"
3043
Matthias Kloseb9621712010-04-24 17:59:49 +00003044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3045$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003047if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049 case $enableval in
3050 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003051 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003052 # information
3053 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003054 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3057 if test ! -d "${enableval}"
3058 then
3059 enableval=/
3060 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003062 ;;
3063 esac
3064 case $enableval in
3065 no)
3066 UNIVERSALSDK=
3067 enable_universalsdk=
3068 ;;
3069 *)
3070 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003071 if test ! -d "${UNIVERSALSDK}"
3072 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003073 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003074 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003075 ;;
3076 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003077
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003078
Thomas Wouters477c8d52006-05-27 19:21:47 +00003079else
3080
3081 UNIVERSALSDK=
3082 enable_universalsdk=
3083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003084fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003085
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086if test -n "${UNIVERSALSDK}"
3087then
Matthias Kloseb9621712010-04-24 17:59:49 +00003088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3089$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003090else
Matthias Kloseb9621712010-04-24 17:59:49 +00003091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3092$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003093fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003095
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003096
Ned Deily87adb6e2013-10-18 21:09:56 -07003097ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003098
Ned Deilycbfb9a52012-06-23 16:02:19 -07003099# For backward compatibility reasons we prefer to select '32-bit' if available,
3100# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003101UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003102if test "`uname -s`" = "Darwin"
3103then
3104 if test -n "${UNIVERSALSDK}"
3105 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003106 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003107 then
3108 UNIVERSAL_ARCHS="intel"
3109 fi
3110 fi
3111fi
3112
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003113
Matthias Kloseb9621712010-04-24 17:59:49 +00003114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3115$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003116
3117# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003118if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003119 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120 UNIVERSAL_ARCHS="$withval"
3121
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122fi
3123
Ned Deily87adb6e2013-10-18 21:09:56 -07003124if test -n "${UNIVERSALSDK}"
3125then
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3127$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3128else
3129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3130$as_echo "no" >&6; }
3131fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003133
3134# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003135if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003136 withval=$with_framework_name;
3137 PYTHONFRAMEWORK=${withval}
3138 PYTHONFRAMEWORKDIR=${withval}.framework
3139 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3140
3141else
3142
3143 PYTHONFRAMEWORK=Python
3144 PYTHONFRAMEWORKDIR=Python.framework
3145 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3146
3147fi
3148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003150if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003152 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003153 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003154 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003155 esac
3156 case $enableval in
3157 no)
3158 PYTHONFRAMEWORK=
3159 PYTHONFRAMEWORKDIR=no-framework
3160 PYTHONFRAMEWORKPREFIX=
3161 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003162 FRAMEWORKINSTALLFIRST=
3163 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003164 FRAMEWORKALTINSTALLFIRST=
3165 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003166 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003167 if test "x${prefix}" = "xNONE"; then
3168 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3169 else
3170 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3171 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003172 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003173 ;;
3174 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003175 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003176 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003178 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003179 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3180 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003181 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003183
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003184 if test "x${prefix}" = "xNONE" ; then
3185 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003186
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003187 else
3188 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3189 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003190
3191 case "${enableval}" in
3192 /System*)
3193 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3194 if test "${prefix}" = "NONE" ; then
3195 # See below
3196 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3197 fi
3198 ;;
3199
3200 /Library*)
3201 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3202 ;;
3203
3204 */Library/Frameworks)
3205 MDIR="`dirname "${enableval}"`"
3206 MDIR="`dirname "${MDIR}"`"
3207 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3208
3209 if test "${prefix}" = "NONE"; then
3210 # User hasn't specified the
3211 # --prefix option, but wants to install
3212 # the framework in a non-default location,
3213 # ensure that the compatibility links get
3214 # installed relative to that prefix as well
3215 # instead of in /usr/local.
3216 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3217 fi
3218 ;;
3219
3220 *)
3221 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3222 ;;
3223 esac
3224
Jack Jansen127e56e2001-09-11 14:41:54 +00003225 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003227 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003233 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3234
3235 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3236
Jack Jansene578a632001-08-15 01:27:14 +00003237 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003238
Guido van Rossum563e7081996-09-10 18:20:48 +00003239else
Martin v. Löwis11437992002-04-12 09:54:03 +00003240
Jack Jansene578a632001-08-15 01:27:14 +00003241 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003242 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003243 PYTHONFRAMEWORKPREFIX=
3244 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003245 FRAMEWORKINSTALLFIRST=
3246 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003247 FRAMEWORKALTINSTALLFIRST=
3248 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003249 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003250 if test "x${prefix}" = "xNONE" ; then
3251 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3252 else
3253 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3254 fi
Jack Jansene578a632001-08-15 01:27:14 +00003255 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003256
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258fi
3259
Thomas Wouters477c8d52006-05-27 19:21:47 +00003260
3261
Michael W. Hudson54241132001-12-07 15:38:26 +00003262
3263
3264
3265
Jack Jansene578a632001-08-15 01:27:14 +00003266
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003267
3268
3269
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003270
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003271
Ned Deilyb8f944f2013-11-21 22:42:25 -08003272
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003273
3274cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003275#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003276_ACEOF
3277
3278
Jack Jansene578a632001-08-15 01:27:14 +00003279##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003280## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003281## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003282##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283# Set name for machine-dependent library files
3284
Matthias Kloseb9621712010-04-24 17:59:49 +00003285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3286$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287if test -z "$MACHDEP"
3288then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 # avoid using uname for cross builds
3290 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003291 # ac_sys_system and ac_sys_release are used for setting
3292 # a lot of different things including 'define_xopen_source'
3293 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003294 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003295 *-*-linux-android*)
3296 ac_sys_system=Linux-android
3297 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 *-*-linux*)
3299 ac_sys_system=Linux
3300 ;;
3301 *-*-cygwin*)
3302 ac_sys_system=Cygwin
3303 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003304 *-*-vxworks*)
3305 ac_sys_system=VxWorks
3306 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 ac_sys_release=
3313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003314 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003315 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003316 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003317 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003319 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003321 fi
3322 ac_md_system=`echo $ac_sys_system |
3323 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3324 ac_md_release=`echo $ac_sys_release |
3325 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3326 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003327
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003328 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003329 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003330 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003331 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003332 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003333 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003334 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003335fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3337$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003338
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003339
3340if test "$cross_compiling" = yes; then
3341 case "$host" in
3342 *-*-linux*)
3343 case "$host_cpu" in
3344 arm*)
3345 _host_cpu=arm
3346 ;;
3347 *)
3348 _host_cpu=$host_cpu
3349 esac
3350 ;;
3351 *-*-cygwin*)
3352 _host_cpu=
3353 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003354 *-*-vxworks*)
3355 _host_cpu=$host_cpu
3356 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003357 *)
3358 # for now, limit cross builds to known configurations
3359 MACHDEP="unknown"
3360 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3361 esac
3362 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3363fi
3364
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003365# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3366# disable features if it is defined, without any means to access these
3367# features as extensions. For these systems, we skip the definition of
3368# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3369# some feature, make sure there is no alternative way to access this
3370# feature. Also, when using wildcards, make sure you have verified the
3371# need for not defining _XOPEN_SOURCE on all systems matching the
3372# wildcard, and that the wildcard does not include future systems
3373# (which may remove their limitations).
3374case $ac_sys_system/$ac_sys_release in
3375 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3376 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003377 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003378 # In addition, Stefan Krah confirms that issue #1244610 exists through
3379 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003380 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003381 define_xopen_source=no
3382 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3383 # also defined. This can be overridden by defining _BSD_SOURCE
3384 # As this has a different meaning on Linux, only define it on OpenBSD
3385
Matthias Kloseb9621712010-04-24 17:59:49 +00003386$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003387
3388 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003389 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003390 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3391 # also defined. This can be overridden by defining _BSD_SOURCE
3392 # As this has a different meaning on Linux, only define it on OpenBSD
3393
Matthias Kloseb9621712010-04-24 17:59:49 +00003394$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003395
3396 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003397 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3398 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3399 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003400 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 +00003401 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003402 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3403 # request to enable features supported by the standard as a request
3404 # to disable features not supported by the standard. The best way
3405 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3406 # entirely and define __EXTENSIONS__ instead.
3407 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003408 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003409 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3410 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003411 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003412 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003413 define_xopen_source=no;;
3414 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003415 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003416 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003417 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003418 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3419 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3420 # identifies itself as Darwin/7.*
3421 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3422 # disables platform specific features beyond repair.
3423 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3424 # has no effect, don't bother defining them
3425 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003426 define_xopen_source=no;;
Miss Islington (bot)ad7a6672020-06-25 08:13:35 -07003427 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003428 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003429 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3430 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3431 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003432 AIX/4)
3433 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003434 AIX/5)
3435 if test `uname -r` -eq 1; then
3436 define_xopen_source=no
3437 fi
3438 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003439 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3440 # defining NI_NUMERICHOST.
3441 QNX/6.3.2)
3442 define_xopen_source=no
3443 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003444 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3445 # in network headers still using system V types.
3446 VxWorks/*)
3447 define_xopen_source=no
3448 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003449
Ian Nortona9edf442020-02-14 03:09:11 +00003450 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3451 # chroot() and other functions
3452 hp*|HP*)
3453 define_xopen_source=no
3454 ;;
3455
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003456esac
3457
3458if test $define_xopen_source = yes
3459then
Victor Stinner14d098d2011-09-07 22:29:43 +02003460 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
Victor Stinner14d098d2011-09-07 22:29:43 +02003462$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003463
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003464
3465 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3466 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3467 # several APIs are not declared. Since this is also needed in some
3468 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003469
Matthias Kloseb9621712010-04-24 17:59:49 +00003470$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003471
3472
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003473
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003474$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003475
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003476fi
3477
Christian Heimes647cd872013-12-07 23:39:33 +01003478# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3479case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003480 hp*|HP*)
3481 define_stdc_a1=yes;;
3482 *)
3483 define_stdc_a1=no;;
3484esac
3485
3486if test $define_stdc_a1 = yes
3487then
Christian Heimes647cd872013-12-07 23:39:33 +01003488
3489$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3490
Christian Heimesb02bcae2013-12-08 15:21:08 +01003491fi
Christian Heimes647cd872013-12-07 23:39:33 +01003492
Jack Jansen6b08a402004-06-03 12:41:45 +00003493# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3494# it may influence the way we can build extensions, so distutils
3495# needs to check it
3496
Thomas Wouters477c8d52006-05-27 19:21:47 +00003497
Jack Jansen6b08a402004-06-03 12:41:45 +00003498CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003499EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003500
Guido van Rossum627b2d71993-12-24 10:39:16 +00003501# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003502
3503# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3504# for debug/optimization stuff. BASECFLAGS is for flags that are required
3505# just to get things to compile and link. Users are free to override OPT
3506# when running configure or make. The build should not break if they do.
3507# BASECFLAGS should generally not be messed with, however.
3508
Guido van Rossum8b131c51995-03-09 14:10:13 +00003509# If the user switches compilers, we can't believe the cache
3510if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3511then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003512 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003513(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003514fi
3515
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003516# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3517# when the compiler supports them, but we don't always want -O2, and
3518# we set -g later.
3519if test -z "$CFLAGS"; then
3520 CFLAGS=
3521fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003522
3523if test "$ac_sys_system" = "Darwin"
3524then
3525 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003526 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003527 # information
3528 if test -z "${CC}"
3529 then
3530 found_gcc=
3531 found_clang=
3532 as_save_IFS=$IFS; IFS=:
3533 for as_dir in $PATH
3534 do
3535 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003536 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003537 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003538 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003539 fi
3540 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003541 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003542 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003543 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003544 fi
3545 fi
3546 done
3547 IFS=$as_save_IFS
3548
3549 if test -n "$found_gcc" -a -n "$found_clang"
3550 then
3551 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3552 then
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3554$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3555 CC="$found_clang"
3556 CXX="$found_clang++"
3557 fi
3558
3559
3560 elif test -z "$found_gcc" -a -n "$found_clang"
3561 then
3562 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3563$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3564 CC="$found_clang"
3565 CXX="$found_clang++"
3566
3567 elif test -z "$found_gcc" -a -z "$found_clang"
3568 then
3569 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3570 if test -n "${found_clang}"
3571 then
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3573$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3574 CC="${found_clang}"
3575 CXX="`/usr/bin/xcrun -find clang++`"
3576
3577 # else: use default behaviour
3578 fi
3579 fi
3580 fi
3581fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003582ac_ext=c
3583ac_cpp='$CPP $CPPFLAGS'
3584ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3585ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3586ac_compiler_gnu=$ac_cv_c_compiler_gnu
3587if test -n "$ac_tool_prefix"; then
3588 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3589set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3591$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003592if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003594else
3595 if test -n "$CC"; then
3596 ac_cv_prog_CC="$CC" # Let the user override the test.
3597else
Martin v. Löwis11437992002-04-12 09:54:03 +00003598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3599for as_dir in $PATH
3600do
3601 IFS=$as_save_IFS
3602 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 $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 +00003607 break 2
3608 fi
3609done
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003612
Jack Jansendd19cf82001-12-06 22:36:17 +00003613fi
3614fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003616if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3618$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003619else
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3621$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003622fi
3623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003624
Martin v. Löwis11437992002-04-12 09:54:03 +00003625fi
3626if test -z "$ac_cv_prog_CC"; then
3627 ac_ct_CC=$CC
3628 # Extract the first word of "gcc", so it can be a program name with args.
3629set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3631$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003632if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003634else
3635 if test -n "$ac_ct_CC"; then
3636 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3637else
3638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641 IFS=$as_save_IFS
3642 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 $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 +00003647 break 2
3648 fi
3649done
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003652
3653fi
3654fi
3655ac_ct_CC=$ac_cv_prog_ac_ct_CC
3656if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3658$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3661$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664 if test "x$ac_ct_CC" = x; then
3665 CC=""
3666 else
3667 case $cross_compiling:$ac_tool_warned in
3668yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671ac_tool_warned=yes ;;
3672esac
3673 CC=$ac_ct_CC
3674 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003675else
3676 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003677fi
3678
Jack Jansendd19cf82001-12-06 22:36:17 +00003679if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 if test -n "$ac_tool_prefix"; then
3681 # 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 +00003682set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3684$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003685if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003687else
3688 if test -n "$CC"; then
3689 ac_cv_prog_CC="$CC" # Let the user override the test.
3690else
Martin v. Löwis11437992002-04-12 09:54:03 +00003691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3692for as_dir in $PATH
3693do
3694 IFS=$as_save_IFS
3695 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 $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 +00003700 break 2
3701 fi
3702done
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003705
3706fi
3707fi
3708CC=$ac_cv_prog_CC
3709if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3711$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003712else
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3714$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003719fi
3720if test -z "$CC"; then
3721 # Extract the first word of "cc", so it can be a program name with args.
3722set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3724$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003725if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003727else
3728 if test -n "$CC"; then
3729 ac_cv_prog_CC="$CC" # Let the user override the test.
3730else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3733for as_dir in $PATH
3734do
3735 IFS=$as_save_IFS
3736 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3740 ac_prog_rejected=yes
3741 continue
3742 fi
3743 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $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 +00003745 break 2
3746 fi
3747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751if test $ac_prog_rejected = yes; then
3752 # We found a bogon in the path, so make sure we never use it.
3753 set dummy $ac_cv_prog_CC
3754 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756 # We chose a different compiler from the bogus one.
3757 # However, it has the same basename, so the bogon will be chosen
3758 # first if we set CC to just the basename; use the full file name.
3759 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003760 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761 fi
3762fi
3763fi
3764fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3768$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769else
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3771$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772fi
3773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774
Martin v. Löwis11437992002-04-12 09:54:03 +00003775fi
3776if test -z "$CC"; then
3777 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 do
3780 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3781set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3783$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003784if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003786else
3787 if test -n "$CC"; then
3788 ac_cv_prog_CC="$CC" # Let the user override the test.
3789else
Martin v. Löwis11437992002-04-12 09:54:03 +00003790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791for as_dir in $PATH
3792do
3793 IFS=$as_save_IFS
3794 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $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 +00003799 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801done
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003804
3805fi
3806fi
3807CC=$ac_cv_prog_CC
3808if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3810$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003811else
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3813$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003814fi
3815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 test -n "$CC" && break
3818 done
3819fi
3820if test -z "$CC"; then
3821 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003823do
3824 # Extract the first word of "$ac_prog", so it can be a program name with args.
3825set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3827$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003828if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003830else
3831 if test -n "$ac_ct_CC"; then
3832 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3833else
3834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3835for as_dir in $PATH
3836do
3837 IFS=$as_save_IFS
3838 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 $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 +00003843 break 2
3844 fi
3845done
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850fi
3851ac_ct_CC=$ac_cv_prog_ac_ct_CC
3852if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3854$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003855else
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 test -n "$ac_ct_CC" && break
3862done
Michael W. Hudson54241132001-12-07 15:38:26 +00003863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864 if test "x$ac_ct_CC" = x; then
3865 CC=""
3866 else
3867 case $cross_compiling:$ac_tool_warned in
3868yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871ac_tool_warned=yes ;;
3872esac
3873 CC=$ac_ct_CC
3874 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003875fi
3876
3877fi
3878
3879
Matthias Kloseb9621712010-04-24 17:59:49 +00003880test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003882as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003883See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003884
3885# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003886$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3887set X $ac_compile
3888ac_compiler=$2
3889for ac_option in --version -v -V -qversion; do
3890 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891case "(($ac_try" in
3892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893 *) ac_try_echo=$ac_try;;
3894esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3896$as_echo "$ac_try_echo"; } >&5
3897 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 if test -s conftest.err; then
3900 sed '10a\
3901... rest of stderr output deleted ...
3902 10q' conftest.err >conftest.er1
3903 cat conftest.er1 >&5
3904 fi
3905 rm -f conftest.er1 conftest.err
3906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3907 test $ac_status = 0; }
3908done
Martin v. Löwis11437992002-04-12 09:54:03 +00003909
Matthias Kloseb9621712010-04-24 17:59:49 +00003910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003911/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003912
Martin v. Löwis11437992002-04-12 09:54:03 +00003913int
3914main ()
3915{
3916
3917 ;
3918 return 0;
3919}
3920_ACEOF
3921ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003922ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003923# Try to create an executable without -o first, disregard a.out.
3924# It will help us diagnose broken compilers, and finding out an intuition
3925# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3927$as_echo_n "checking whether the C compiler works... " >&6; }
3928ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3929
3930# The possible output files:
3931ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933ac_rmfiles=
3934for ac_file in $ac_files
3935do
3936 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3939 esac
3940done
3941rm -f $ac_rmfiles
3942
Matthias Kloseb9621712010-04-24 17:59:49 +00003943if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944case "(($ac_try" in
3945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3946 *) ac_try_echo=$ac_try;;
3947esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3949$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3953 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3955# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3956# in a Makefile. We should not override ac_cv_exeext if it was cached,
3957# so that the user can short-circuit this test for compilers unknown to
3958# Autoconf.
3959for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003960do
3961 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003964 ;;
3965 [ab].out )
3966 # We found the default executable, but exeext='' is most
3967 # certainly right.
3968 break;;
3969 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 then :; else
3972 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973 fi
3974 # We set ac_cv_exeext here because the later test for it is not
3975 # safe: cross compilers may not add the suffix if given an `-o'
3976 # argument, so we may need to know it at that point already.
3977 # Even if this section looks crufty: it has the advantage of
3978 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003979 break;;
3980 * )
3981 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 esac
3983done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984test "$ac_cv_exeext" = no && ac_cv_exeext=
3985
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003986else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 ac_file=''
3988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003989if test -z "$ac_file"; then :
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3991$as_echo "no" >&6; }
3992$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003993sed 's/^/| /' conftest.$ac_ext >&5
3994
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003997as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003998See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003999else
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4001$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4004$as_echo_n "checking for C compiler default output file name... " >&6; }
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4006$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008
Matthias Kloseb9621712010-04-24 17:59:49 +00004009rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4012$as_echo_n "checking for suffix of executables... " >&6; }
4013if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014case "(($ac_try" in
4015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4016 *) ac_try_echo=$ac_try;;
4017esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4019$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4023 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004024 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4025# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4026# work properly (i.e., refer to `conftest.exe'), while it won't with
4027# `rm'.
4028for ac_file in conftest.exe conftest conftest.*; do
4029 test -f "$ac_file" || continue
4030 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4033 break;;
4034 * ) break;;
4035 esac
4036done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004037else
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004040as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004041See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004043rm -f conftest conftest$ac_cv_exeext
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4045$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004046
4047rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004048EXEEXT=$ac_cv_exeext
4049ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4051/* end confdefs.h. */
4052#include <stdio.h>
4053int
4054main ()
4055{
4056FILE *f = fopen ("conftest.out", "w");
4057 return ferror (f) || fclose (f) != 0;
4058
4059 ;
4060 return 0;
4061}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004063ac_clean_files="$ac_clean_files conftest.out"
4064# Check that the compiler produces executables we can run. If not, either
4065# the compiler is broken, or we cross compile.
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4067$as_echo_n "checking whether we are cross compiling... " >&6; }
4068if test "$cross_compiling" != yes; then
4069 { { ac_try="$ac_link"
4070case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073esac
4074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
4076 (eval "$ac_link") 2>&5
4077 ac_status=$?
4078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }
4080 if { ac_try='./conftest$ac_cv_exeext'
4081 { { case "(($ac_try" in
4082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083 *) ac_try_echo=$ac_try;;
4084esac
4085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4086$as_echo "$ac_try_echo"; } >&5
4087 (eval "$ac_try") 2>&5
4088 ac_status=$?
4089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4090 test $ac_status = 0; }; }; then
4091 cross_compiling=no
4092 else
4093 if test "$cross_compiling" = maybe; then
4094 cross_compiling=yes
4095 else
4096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004098as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004099If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004100See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 fi
4102 fi
4103fi
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4105$as_echo "$cross_compiling" >&6; }
4106
4107rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4108ac_clean_files=$ac_clean_files_save
4109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4110$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004111if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo_n "(cached) " >&6
4113else
4114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004115/* end confdefs.h. */
4116
4117int
4118main ()
4119{
4120
4121 ;
4122 return 0;
4123}
4124_ACEOF
4125rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004126if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004127case "(($ac_try" in
4128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4129 *) ac_try_echo=$ac_try;;
4130esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004131eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4132$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4136 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137 for ac_file in conftest.o conftest.obj conftest.*; do
4138 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4142 break;;
4143 esac
4144done
4145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004147sed 's/^/| /' conftest.$ac_ext >&5
4148
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004151as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004152See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004153fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004154rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4157$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004158OBJEXT=$ac_cv_objext
4159ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4161$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004162if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004164else
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004167
Martin v. Löwis11437992002-04-12 09:54:03 +00004168int
4169main ()
4170{
4171#ifndef __GNUC__
4172 choke me
4173#endif
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004179if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004180 ac_compiler_gnu=yes
4181else
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004185ac_cv_c_compiler_gnu=$ac_compiler_gnu
4186
4187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4189$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4190if test $ac_compiler_gnu = yes; then
4191 GCC=yes
4192else
4193 GCC=
4194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004195ac_test_CFLAGS=${CFLAGS+set}
4196ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4198$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004199if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004201else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202 ac_save_c_werror_flag=$ac_c_werror_flag
4203 ac_c_werror_flag=yes
4204 ac_cv_prog_cc_g=no
4205 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004208
Martin v. Löwis11437992002-04-12 09:54:03 +00004209int
4210main ()
4211{
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004218 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004219else
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 CFLAGS=""
4221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004222/* end confdefs.h. */
4223
4224int
4225main ()
4226{
4227
4228 ;
4229 return 0;
4230}
4231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004232if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233
Matthias Kloseb9621712010-04-24 17:59:49 +00004234else
4235 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238/* end confdefs.h. */
4239
4240int
4241main ()
4242{
4243
4244 ;
4245 return 0;
4246}
4247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004248if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_c_werror_flag=$ac_save_c_werror_flag
4257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4259$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262elif test $ac_cv_prog_cc_g = yes; then
4263 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004264 CFLAGS="-g -O2"
4265 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004266 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267 fi
4268else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004269 if test "$GCC" = yes; then
4270 CFLAGS="-O2"
4271 else
4272 CFLAGS=
4273 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4276$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004277if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004279else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004281ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004283/* end confdefs.h. */
4284#include <stdarg.h>
4285#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004286struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004287/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4288struct buf { int x; };
4289FILE * (*rcsopen) (struct buf *, struct stat *, int);
4290static char *e (p, i)
4291 char **p;
4292 int i;
4293{
4294 return p[i];
4295}
4296static char *f (char * (*g) (char **, int), char **p, ...)
4297{
4298 char *s;
4299 va_list v;
4300 va_start (v,p);
4301 s = g (p, va_arg (v,int));
4302 va_end (v);
4303 return s;
4304}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305
4306/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4307 function prototypes and stuff, but not '\xHH' hex character constants.
4308 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004310 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4311 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4316 inside strings and character constants. */
4317#define FOO(x) 'x'
4318int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4319
Skip Montanaro6dead952003-09-25 14:50:04 +00004320int test (int i, double x);
4321struct s1 {int (*f) (int a);};
4322struct s2 {int (*f) (double a);};
4323int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4324int argc;
4325char **argv;
4326int
4327main ()
4328{
4329return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4330 ;
4331 return 0;
4332}
4333_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4335 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004336do
4337 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341rm -f core conftest.err conftest.$ac_objext
4342 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004343done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004345CC=$ac_save_CC
4346
4347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348# AC_CACHE_VAL
4349case "x$ac_cv_prog_cc_c89" in
4350 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4352$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4355$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004356 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4359$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004360esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004361if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004362
Matthias Kloseb9621712010-04-24 17:59:49 +00004363fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004364
Martin v. Löwis11437992002-04-12 09:54:03 +00004365ac_ext=c
4366ac_cpp='$CPP $CPPFLAGS'
4367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004371ac_ext=c
4372ac_cpp='$CPP $CPPFLAGS'
4373ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4374ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4375ac_compiler_gnu=$ac_cv_c_compiler_gnu
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4377$as_echo_n "checking how to run the C preprocessor... " >&6; }
4378# On Suns, sometimes $CPP names a directory.
4379if test -n "$CPP" && test -d "$CPP"; then
4380 CPP=
4381fi
4382if test -z "$CPP"; then
4383 if ${ac_cv_prog_CPP+:} false; then :
4384 $as_echo_n "(cached) " >&6
4385else
4386 # Double quotes because CPP needs to be expanded
4387 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4388 do
4389 ac_preproc_ok=false
4390for ac_c_preproc_warn_flag in '' yes
4391do
4392 # Use a header file that comes with gcc, so configuring glibc
4393 # with a fresh cross-compiler works.
4394 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4395 # <limits.h> exists even on freestanding compilers.
4396 # On the NeXT, cc -E runs the code through the compiler's parser,
4397 # not just through cpp. "Syntax error" is here to catch this case.
4398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4399/* end confdefs.h. */
4400#ifdef __STDC__
4401# include <limits.h>
4402#else
4403# include <assert.h>
4404#endif
4405 Syntax error
4406_ACEOF
4407if ac_fn_c_try_cpp "$LINENO"; then :
4408
4409else
4410 # Broken: fails on valid input.
4411continue
4412fi
4413rm -f conftest.err conftest.i conftest.$ac_ext
4414
4415 # OK, works on sane cases. Now check whether nonexistent headers
4416 # can be detected and how.
4417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4418/* end confdefs.h. */
4419#include <ac_nonexistent.h>
4420_ACEOF
4421if ac_fn_c_try_cpp "$LINENO"; then :
4422 # Broken: success on invalid input.
4423continue
4424else
4425 # Passes both tests.
4426ac_preproc_ok=:
4427break
4428fi
4429rm -f conftest.err conftest.i conftest.$ac_ext
4430
4431done
4432# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4433rm -f conftest.i conftest.err conftest.$ac_ext
4434if $ac_preproc_ok; then :
4435 break
4436fi
4437
4438 done
4439 ac_cv_prog_CPP=$CPP
4440
4441fi
4442 CPP=$ac_cv_prog_CPP
4443else
4444 ac_cv_prog_CPP=$CPP
4445fi
4446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4447$as_echo "$CPP" >&6; }
4448ac_preproc_ok=false
4449for ac_c_preproc_warn_flag in '' yes
4450do
4451 # Use a header file that comes with gcc, so configuring glibc
4452 # with a fresh cross-compiler works.
4453 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4454 # <limits.h> exists even on freestanding compilers.
4455 # On the NeXT, cc -E runs the code through the compiler's parser,
4456 # not just through cpp. "Syntax error" is here to catch this case.
4457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4458/* end confdefs.h. */
4459#ifdef __STDC__
4460# include <limits.h>
4461#else
4462# include <assert.h>
4463#endif
4464 Syntax error
4465_ACEOF
4466if ac_fn_c_try_cpp "$LINENO"; then :
4467
4468else
4469 # Broken: fails on valid input.
4470continue
4471fi
4472rm -f conftest.err conftest.i conftest.$ac_ext
4473
4474 # OK, works on sane cases. Now check whether nonexistent headers
4475 # can be detected and how.
4476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4477/* end confdefs.h. */
4478#include <ac_nonexistent.h>
4479_ACEOF
4480if ac_fn_c_try_cpp "$LINENO"; then :
4481 # Broken: success on invalid input.
4482continue
4483else
4484 # Passes both tests.
4485ac_preproc_ok=:
4486break
4487fi
4488rm -f conftest.err conftest.i conftest.$ac_ext
4489
4490done
4491# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4492rm -f conftest.i conftest.err conftest.$ac_ext
4493if $ac_preproc_ok; then :
4494
4495else
4496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4498as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4499See \`config.log' for more details" "$LINENO" 5; }
4500fi
4501
4502ac_ext=c
4503ac_cpp='$CPP $CPPFLAGS'
4504ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4505ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4506ac_compiler_gnu=$ac_cv_c_compiler_gnu
4507
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4509$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4510if ${ac_cv_path_GREP+:} false; then :
4511 $as_echo_n "(cached) " >&6
4512else
4513 if test -z "$GREP"; then
4514 ac_path_GREP_found=false
4515 # Loop through the user's path and test for each of PROGNAME-LIST
4516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4518do
4519 IFS=$as_save_IFS
4520 test -z "$as_dir" && as_dir=.
4521 for ac_prog in grep ggrep; do
4522 for ac_exec_ext in '' $ac_executable_extensions; do
4523 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4524 as_fn_executable_p "$ac_path_GREP" || continue
4525# Check for GNU ac_path_GREP and select it if it is found.
4526 # Check for GNU $ac_path_GREP
4527case `"$ac_path_GREP" --version 2>&1` in
4528*GNU*)
4529 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4530*)
4531 ac_count=0
4532 $as_echo_n 0123456789 >"conftest.in"
4533 while :
4534 do
4535 cat "conftest.in" "conftest.in" >"conftest.tmp"
4536 mv "conftest.tmp" "conftest.in"
4537 cp "conftest.in" "conftest.nl"
4538 $as_echo 'GREP' >> "conftest.nl"
4539 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4540 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4541 as_fn_arith $ac_count + 1 && ac_count=$as_val
4542 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4543 # Best one so far, save it but keep looking for a better one
4544 ac_cv_path_GREP="$ac_path_GREP"
4545 ac_path_GREP_max=$ac_count
4546 fi
4547 # 10*(2^10) chars as input seems more than enough
4548 test $ac_count -gt 10 && break
4549 done
4550 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4551esac
4552
4553 $ac_path_GREP_found && break 3
4554 done
4555 done
4556 done
4557IFS=$as_save_IFS
4558 if test -z "$ac_cv_path_GREP"; then
4559 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4560 fi
4561else
4562 ac_cv_path_GREP=$GREP
4563fi
4564
4565fi
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4567$as_echo "$ac_cv_path_GREP" >&6; }
4568 GREP="$ac_cv_path_GREP"
4569
4570
Łukasz Langaa785c872016-09-09 17:37:37 -07004571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4572$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4573if ${ac_cv_path_SED+:} false; then :
4574 $as_echo_n "(cached) " >&6
4575else
4576 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4577 for ac_i in 1 2 3 4 5 6 7; do
4578 ac_script="$ac_script$as_nl$ac_script"
4579 done
4580 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4581 { ac_script=; unset ac_script;}
4582 if test -z "$SED"; then
4583 ac_path_SED_found=false
4584 # Loop through the user's path and test for each of PROGNAME-LIST
4585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4586for as_dir in $PATH
4587do
4588 IFS=$as_save_IFS
4589 test -z "$as_dir" && as_dir=.
4590 for ac_prog in sed gsed; do
4591 for ac_exec_ext in '' $ac_executable_extensions; do
4592 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4593 as_fn_executable_p "$ac_path_SED" || continue
4594# Check for GNU ac_path_SED and select it if it is found.
4595 # Check for GNU $ac_path_SED
4596case `"$ac_path_SED" --version 2>&1` in
4597*GNU*)
4598 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4599*)
4600 ac_count=0
4601 $as_echo_n 0123456789 >"conftest.in"
4602 while :
4603 do
4604 cat "conftest.in" "conftest.in" >"conftest.tmp"
4605 mv "conftest.tmp" "conftest.in"
4606 cp "conftest.in" "conftest.nl"
4607 $as_echo '' >> "conftest.nl"
4608 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4609 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4610 as_fn_arith $ac_count + 1 && ac_count=$as_val
4611 if test $ac_count -gt ${ac_path_SED_max-0}; then
4612 # Best one so far, save it but keep looking for a better one
4613 ac_cv_path_SED="$ac_path_SED"
4614 ac_path_SED_max=$ac_count
4615 fi
4616 # 10*(2^10) chars as input seems more than enough
4617 test $ac_count -gt 10 && break
4618 done
4619 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4620esac
4621
4622 $ac_path_SED_found && break 3
4623 done
4624 done
4625 done
4626IFS=$as_save_IFS
4627 if test -z "$ac_cv_path_SED"; then
4628 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4629 fi
4630else
4631 ac_cv_path_SED=$SED
4632fi
4633
4634fi
4635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4636$as_echo "$ac_cv_path_SED" >&6; }
4637 SED="$ac_cv_path_SED"
4638 rm -f conftest.sed
4639
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004640
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641
4642
Matthias Kloseb9621712010-04-24 17:59:49 +00004643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4644$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004646# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004647if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004648 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004649
4650 case $withval in
4651 no) with_cxx_main=no
4652 MAINCC='$(CC)';;
4653 yes) with_cxx_main=yes
4654 MAINCC='$(CXX)';;
4655 *) with_cxx_main=yes
4656 MAINCC=$withval
4657 if test -z "$CXX"
4658 then
4659 CXX=$withval
4660 fi;;
4661 esac
4662else
4663
4664 with_cxx_main=no
4665 MAINCC='$(CC)'
4666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004667fi
4668
Matthias Kloseb9621712010-04-24 17:59:49 +00004669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4670$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004671
4672preset_cxx="$CXX"
4673if test -z "$CXX"
4674then
4675 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004676 gcc) if test -n "$ac_tool_prefix"; then
4677 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4678set dummy ${ac_tool_prefix}g++; ac_word=$2
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680$as_echo_n "checking for $ac_word... " >&6; }
4681if ${ac_cv_path_CXX+:} false; then :
4682 $as_echo_n "(cached) " >&6
4683else
4684 case $CXX in
4685 [\\/]* | ?:[\\/]*)
4686 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4687 ;;
4688 *)
4689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690for as_dir in notfound
4691do
4692 IFS=$as_save_IFS
4693 test -z "$as_dir" && as_dir=.
4694 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004696 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4697 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698 break 2
4699 fi
4700done
4701 done
4702IFS=$as_save_IFS
4703
4704 ;;
4705esac
4706fi
4707CXX=$ac_cv_path_CXX
4708if test -n "$CXX"; then
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4710$as_echo "$CXX" >&6; }
4711else
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713$as_echo "no" >&6; }
4714fi
4715
4716
4717fi
4718if test -z "$ac_cv_path_CXX"; then
4719 ac_pt_CXX=$CXX
4720 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4723$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004724if ${ac_cv_path_ac_pt_CXX+:} false; then :
4725 $as_echo_n "(cached) " >&6
4726else
4727 case $ac_pt_CXX in
4728 [\\/]* | ?:[\\/]*)
4729 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4730 ;;
4731 *)
4732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4733for as_dir in notfound
4734do
4735 IFS=$as_save_IFS
4736 test -z "$as_dir" && as_dir=.
4737 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004739 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4741 break 2
4742 fi
4743done
4744 done
4745IFS=$as_save_IFS
4746
4747 ;;
4748esac
4749fi
4750ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4751if test -n "$ac_pt_CXX"; then
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4753$as_echo "$ac_pt_CXX" >&6; }
4754else
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4756$as_echo "no" >&6; }
4757fi
4758
4759 if test "x$ac_pt_CXX" = x; then
4760 CXX="g++"
4761 else
4762 case $cross_compiling:$ac_tool_warned in
4763yes:)
4764{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4765$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4766ac_tool_warned=yes ;;
4767esac
4768 CXX=$ac_pt_CXX
4769 fi
4770else
4771 CXX="$ac_cv_path_CXX"
4772fi
4773 ;;
4774 cc) if test -n "$ac_tool_prefix"; then
4775 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4776set dummy ${ac_tool_prefix}c++; ac_word=$2
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004779if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781else
4782 case $CXX in
4783 [\\/]* | ?:[\\/]*)
4784 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4785 ;;
4786 *)
4787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in notfound
4789do
4790 IFS=$as_save_IFS
4791 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 break 2
4797 fi
4798done
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802 ;;
4803esac
4804fi
4805CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004806if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4808$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004809else
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004813
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814
4815fi
4816if test -z "$ac_cv_path_CXX"; then
4817 ac_pt_CXX=$CXX
4818 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4821$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004823 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004827 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 +00004828 ;;
4829 *)
4830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4831for as_dir in notfound
4832do
4833 IFS=$as_save_IFS
4834 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004835 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839 break 2
4840 fi
4841done
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004843IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845 ;;
4846esac
4847fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4849if test -n "$ac_pt_CXX"; then
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4851$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004852else
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4854$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004856
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004857 if test "x$ac_pt_CXX" = x; then
4858 CXX="c++"
4859 else
4860 case $cross_compiling:$ac_tool_warned in
4861yes:)
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4864ac_tool_warned=yes ;;
4865esac
4866 CXX=$ac_pt_CXX
4867 fi
4868else
4869 CXX="$ac_cv_path_CXX"
4870fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004871 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004872 clang|*/clang) if test -n "$ac_tool_prefix"; then
4873 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4874set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if ${ac_cv_path_CXX+:} false; then :
4878 $as_echo_n "(cached) " >&6
4879else
4880 case $CXX in
4881 [\\/]* | ?:[\\/]*)
4882 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4883 ;;
4884 *)
4885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in notfound
4887do
4888 IFS=$as_save_IFS
4889 test -z "$as_dir" && as_dir=.
4890 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004892 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4894 break 2
4895 fi
4896done
4897 done
4898IFS=$as_save_IFS
4899
Ned Deilycbfb9a52012-06-23 16:02:19 -07004900 ;;
4901esac
4902fi
4903CXX=$ac_cv_path_CXX
4904if test -n "$CXX"; then
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4906$as_echo "$CXX" >&6; }
4907else
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004912
4913fi
4914if test -z "$ac_cv_path_CXX"; then
4915 ac_pt_CXX=$CXX
4916 # Extract the first word of "clang++", so it can be a program name with args.
4917set dummy clang++; ac_word=$2
4918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4919$as_echo_n "checking for $ac_word... " >&6; }
4920if ${ac_cv_path_ac_pt_CXX+:} false; then :
4921 $as_echo_n "(cached) " >&6
4922else
4923 case $ac_pt_CXX in
4924 [\\/]* | ?:[\\/]*)
4925 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4926 ;;
4927 *)
4928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4929for as_dir in notfound
4930do
4931 IFS=$as_save_IFS
4932 test -z "$as_dir" && as_dir=.
4933 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004935 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4937 break 2
4938 fi
4939done
4940 done
4941IFS=$as_save_IFS
4942
4943 ;;
4944esac
4945fi
4946ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4947if test -n "$ac_pt_CXX"; then
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4949$as_echo "$ac_pt_CXX" >&6; }
4950else
4951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4952$as_echo "no" >&6; }
4953fi
4954
4955 if test "x$ac_pt_CXX" = x; then
4956 CXX="clang++"
4957 else
4958 case $cross_compiling:$ac_tool_warned in
4959yes:)
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4961$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4962ac_tool_warned=yes ;;
4963esac
4964 CXX=$ac_pt_CXX
4965 fi
4966else
4967 CXX="$ac_cv_path_CXX"
4968fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004969 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004970 icc|*/icc) if test -n "$ac_tool_prefix"; then
4971 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4972set dummy ${ac_tool_prefix}icpc; ac_word=$2
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974$as_echo_n "checking for $ac_word... " >&6; }
4975if ${ac_cv_path_CXX+:} false; then :
4976 $as_echo_n "(cached) " >&6
4977else
4978 case $CXX in
4979 [\\/]* | ?:[\\/]*)
4980 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4981 ;;
4982 *)
4983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4984for as_dir in notfound
4985do
4986 IFS=$as_save_IFS
4987 test -z "$as_dir" && as_dir=.
4988 for ac_exec_ext in '' $ac_executable_extensions; do
4989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4990 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4992 break 2
4993 fi
4994done
4995 done
4996IFS=$as_save_IFS
4997
4998 ;;
4999esac
5000fi
5001CXX=$ac_cv_path_CXX
5002if test -n "$CXX"; then
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5004$as_echo "$CXX" >&6; }
5005else
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5007$as_echo "no" >&6; }
5008fi
5009
5010
5011fi
5012if test -z "$ac_cv_path_CXX"; then
5013 ac_pt_CXX=$CXX
5014 # Extract the first word of "icpc", so it can be a program name with args.
5015set dummy icpc; ac_word=$2
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5017$as_echo_n "checking for $ac_word... " >&6; }
5018if ${ac_cv_path_ac_pt_CXX+:} false; then :
5019 $as_echo_n "(cached) " >&6
5020else
5021 case $ac_pt_CXX in
5022 [\\/]* | ?:[\\/]*)
5023 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5024 ;;
5025 *)
5026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5027for as_dir in notfound
5028do
5029 IFS=$as_save_IFS
5030 test -z "$as_dir" && as_dir=.
5031 for ac_exec_ext in '' $ac_executable_extensions; do
5032 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5033 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5035 break 2
5036 fi
5037done
5038 done
5039IFS=$as_save_IFS
5040
5041 ;;
5042esac
5043fi
5044ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5045if test -n "$ac_pt_CXX"; then
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5047$as_echo "$ac_pt_CXX" >&6; }
5048else
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5050$as_echo "no" >&6; }
5051fi
5052
5053 if test "x$ac_pt_CXX" = x; then
5054 CXX="icpc"
5055 else
5056 case $cross_compiling:$ac_tool_warned in
5057yes:)
5058{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5059$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5060ac_tool_warned=yes ;;
5061esac
5062 CXX=$ac_pt_CXX
5063 fi
5064else
5065 CXX="$ac_cv_path_CXX"
5066fi
5067 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005068 esac
5069 if test "$CXX" = "notfound"
5070 then
5071 CXX=""
5072 fi
5073fi
5074if test -z "$CXX"
5075then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005076 if test -n "$ac_tool_prefix"; then
5077 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5078 do
5079 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5080set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5082$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005083if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005085else
5086 if test -n "$CXX"; then
5087 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5088else
5089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5090for as_dir in $PATH
5091do
5092 IFS=$as_save_IFS
5093 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005096 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005098 break 2
5099 fi
5100done
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005103
5104fi
5105fi
5106CXX=$ac_cv_prog_CXX
5107if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5109$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005110else
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5112$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113fi
5114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005115
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005116 test -n "$CXX" && break
5117 done
5118fi
5119if test -z "$CXX"; then
5120 ac_ct_CXX=$CXX
5121 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5122do
5123 # Extract the first word of "$ac_prog", so it can be a program name with args.
5124set dummy $ac_prog; ac_word=$2
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
5127if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5128 $as_echo_n "(cached) " >&6
5129else
5130 if test -n "$ac_ct_CXX"; then
5131 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5132else
5133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136 IFS=$as_save_IFS
5137 test -z "$as_dir" && as_dir=.
5138 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005140 ac_cv_prog_ac_ct_CXX="$ac_prog"
5141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142 break 2
5143 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005144done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005145 done
5146IFS=$as_save_IFS
5147
5148fi
5149fi
5150ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5151if test -n "$ac_ct_CXX"; then
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5153$as_echo "$ac_ct_CXX" >&6; }
5154else
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156$as_echo "no" >&6; }
5157fi
5158
5159
5160 test -n "$ac_ct_CXX" && break
5161done
5162
5163 if test "x$ac_ct_CXX" = x; then
5164 CXX="notfound"
5165 else
5166 case $cross_compiling:$ac_tool_warned in
5167yes:)
5168{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5169$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5170ac_tool_warned=yes ;;
5171esac
5172 CXX=$ac_ct_CXX
5173 fi
5174fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005175
5176 if test "$CXX" = "notfound"
5177 then
5178 CXX=""
5179 fi
5180fi
5181if test "$preset_cxx" != "$CXX"
5182then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005183 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005184
5185 By default, distutils will build C++ extension modules with \"$CXX\".
5186 If this is not intended, then set CXX on the configure command line.
5187 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005188$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005189
5190 By default, distutils will build C++ extension modules with \"$CXX\".
5191 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005192 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193fi
5194
5195
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5197
5198
5199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5200$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5201cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005202#undef bfin
5203#undef cris
5204#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005205#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005206#undef hppa
5207#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005209#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005210#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005211#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005212#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005213#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005214 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005215#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005216# if defined(__x86_64__) && defined(__LP64__)
5217 x86_64-linux-gnu
5218# elif defined(__x86_64__) && defined(__ILP32__)
5219 x86_64-linux-gnux32
5220# elif defined(__i386__)
5221 i386-linux-gnu
5222# elif defined(__aarch64__) && defined(__AARCH64EL__)
5223# if defined(__ILP32__)
5224 aarch64_ilp32-linux-gnu
5225# else
5226 aarch64-linux-gnu
5227# endif
5228# elif defined(__aarch64__) && defined(__AARCH64EB__)
5229# if defined(__ILP32__)
5230 aarch64_be_ilp32-linux-gnu
5231# else
5232 aarch64_be-linux-gnu
5233# endif
5234# elif defined(__alpha__)
5235 alpha-linux-gnu
5236# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5237# if defined(__ARMEL__)
5238 arm-linux-gnueabihf
5239# else
5240 armeb-linux-gnueabihf
5241# endif
5242# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5243# if defined(__ARMEL__)
5244 arm-linux-gnueabi
5245# else
5246 armeb-linux-gnueabi
5247# endif
5248# elif defined(__hppa__)
5249 hppa-linux-gnu
5250# elif defined(__ia64__)
5251 ia64-linux-gnu
5252# elif defined(__m68k__) && !defined(__mcoldfire__)
5253 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005254# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5255# if _MIPS_SIM == _ABIO32
5256 mipsisa32r6el-linux-gnu
5257# elif _MIPS_SIM == _ABIN32
5258 mipsisa64r6el-linux-gnuabin32
5259# elif _MIPS_SIM == _ABI64
5260 mipsisa64r6el-linux-gnuabi64
5261# else
5262# error unknown platform triplet
5263# endif
5264# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5265# if _MIPS_SIM == _ABIO32
5266 mipsisa32r6-linux-gnu
5267# elif _MIPS_SIM == _ABIN32
5268 mipsisa64r6-linux-gnuabin32
5269# elif _MIPS_SIM == _ABI64
5270 mipsisa64r6-linux-gnuabi64
5271# else
5272# error unknown platform triplet
5273# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005274# elif defined(__mips_hard_float) && defined(_MIPSEL)
5275# if _MIPS_SIM == _ABIO32
5276 mipsel-linux-gnu
5277# elif _MIPS_SIM == _ABIN32
5278 mips64el-linux-gnuabin32
5279# elif _MIPS_SIM == _ABI64
5280 mips64el-linux-gnuabi64
5281# else
5282# error unknown platform triplet
5283# endif
5284# elif defined(__mips_hard_float)
5285# if _MIPS_SIM == _ABIO32
5286 mips-linux-gnu
5287# elif _MIPS_SIM == _ABIN32
5288 mips64-linux-gnuabin32
5289# elif _MIPS_SIM == _ABI64
5290 mips64-linux-gnuabi64
5291# else
5292# error unknown platform triplet
5293# endif
5294# elif defined(__or1k__)
5295 or1k-linux-gnu
5296# elif defined(__powerpc__) && defined(__SPE__)
5297 powerpc-linux-gnuspe
5298# elif defined(__powerpc64__)
5299# if defined(__LITTLE_ENDIAN__)
5300 powerpc64le-linux-gnu
5301# else
5302 powerpc64-linux-gnu
5303# endif
5304# elif defined(__powerpc__)
5305 powerpc-linux-gnu
5306# elif defined(__s390x__)
5307 s390x-linux-gnu
5308# elif defined(__s390__)
5309 s390-linux-gnu
5310# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5311 sh4-linux-gnu
5312# elif defined(__sparc__) && defined(__arch64__)
5313 sparc64-linux-gnu
5314# elif defined(__sparc__)
5315 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005316# elif defined(__riscv)
5317# if __riscv_xlen == 32
5318 riscv32-linux-gnu
5319# elif __riscv_xlen == 64
5320 riscv64-linux-gnu
5321# else
5322# error unknown platform triplet
5323# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005324# else
5325# error unknown platform triplet
5326# endif
5327#elif defined(__FreeBSD_kernel__)
5328# if defined(__LP64__)
5329 x86_64-kfreebsd-gnu
5330# elif defined(__i386__)
5331 i386-kfreebsd-gnu
5332# else
5333# error unknown platform triplet
5334# endif
5335#elif defined(__gnu_hurd__)
5336 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005337#elif defined(__APPLE__)
5338 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005339#elif defined(__VXWORKS__)
5340 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005341#else
5342# error unknown platform triplet
5343#endif
5344
5345EOF
5346
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005347if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005348 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5350$as_echo "$PLATFORM_TRIPLET" >&6; }
5351else
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5353$as_echo "none" >&6; }
5354fi
5355rm -f conftest.c conftest.out
5356
5357if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5358 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5359 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5360 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005361elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5362 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005363fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005364
doko@ubuntu.com55532312016-06-14 08:55:19 +02005365if test x$MULTIARCH != x; then
5366 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5367fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005368
5369
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5371$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5372save_LDFLAGS="$LDFLAGS"
5373LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005374
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5376/* end confdefs.h. */
5377
5378int
5379main ()
5380{
5381
5382 ;
5383 return 0;
5384}
5385_ACEOF
5386if ac_fn_c_try_link "$LINENO"; then :
5387 NO_AS_NEEDED="-Wl,--no-as-needed"
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5389$as_echo "yes" >&6; }
5390else
5391 NO_AS_NEEDED=""
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395rm -f core conftest.err conftest.$ac_objext \
5396 conftest$ac_exeext conftest.$ac_ext
5397LDFLAGS="$save_LDFLAGS"
5398
5399
5400
5401# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5404$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005405if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407else
5408 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5409 then ac_cv_path_EGREP="$GREP -E"
5410 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 # Loop through the user's path and test for each of PROGNAME-LIST
5414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5416do
5417 IFS=$as_save_IFS
5418 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 for ac_prog in egrep; do
5420 for ac_exec_ext in '' $ac_executable_extensions; do
5421 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005422 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005423# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 # Check for GNU $ac_path_EGREP
5425case `"$ac_path_EGREP" --version 2>&1` in
5426*GNU*)
5427 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5428*)
5429 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 while :
5432 do
5433 cat "conftest.in" "conftest.in" >"conftest.tmp"
5434 mv "conftest.tmp" "conftest.in"
5435 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5438 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005439 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005440 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5441 # Best one so far, save it but keep looking for a better one
5442 ac_cv_path_EGREP="$ac_path_EGREP"
5443 ac_path_EGREP_max=$ac_count
5444 fi
5445 # 10*(2^10) chars as input seems more than enough
5446 test $ac_count -gt 10 && break
5447 done
5448 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5449esac
5450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 $ac_path_EGREP_found && break 3
5452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005457 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 +00005458 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459else
5460 ac_cv_path_EGREP=$EGREP
5461fi
5462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005463 fi
5464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5466$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005467 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005468
5469
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5471$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005472if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 $as_echo_n "(cached) " >&6
5474else
5475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005476/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005477#include <stdlib.h>
5478#include <stdarg.h>
5479#include <string.h>
5480#include <float.h>
5481
5482int
5483main ()
5484{
5485
5486 ;
5487 return 0;
5488}
5489_ACEOF
5490if ac_fn_c_try_compile "$LINENO"; then :
5491 ac_cv_header_stdc=yes
5492else
5493 ac_cv_header_stdc=no
5494fi
5495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5496
5497if test $ac_cv_header_stdc = yes; then
5498 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5500/* end confdefs.h. */
5501#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005502
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005503_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005505 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005507else
Matthias Kloseb9621712010-04-24 17:59:49 +00005508 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005509fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005510rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511
Matthias Kloseb9621712010-04-24 17:59:49 +00005512fi
5513
5514if test $ac_cv_header_stdc = yes; then
5515 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517/* end confdefs.h. */
5518#include <stdlib.h>
5519
5520_ACEOF
5521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5522 $EGREP "free" >/dev/null 2>&1; then :
5523
5524else
5525 ac_cv_header_stdc=no
5526fi
5527rm -f conftest*
5528
5529fi
5530
5531if test $ac_cv_header_stdc = yes; then
5532 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5533 if test "$cross_compiling" = yes; then :
5534 :
5535else
5536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5537/* end confdefs.h. */
5538#include <ctype.h>
5539#include <stdlib.h>
5540#if ((' ' & 0x0FF) == 0x020)
5541# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5542# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5543#else
5544# define ISLOWER(c) \
5545 (('a' <= (c) && (c) <= 'i') \
5546 || ('j' <= (c) && (c) <= 'r') \
5547 || ('s' <= (c) && (c) <= 'z'))
5548# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5549#endif
5550
5551#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5552int
5553main ()
5554{
5555 int i;
5556 for (i = 0; i < 256; i++)
5557 if (XOR (islower (i), ISLOWER (i))
5558 || toupper (i) != TOUPPER (i))
5559 return 2;
5560 return 0;
5561}
5562_ACEOF
5563if ac_fn_c_try_run "$LINENO"; then :
5564
5565else
5566 ac_cv_header_stdc=no
5567fi
5568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5569 conftest.$ac_objext conftest.beam conftest.$ac_ext
5570fi
5571
5572fi
5573fi
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5575$as_echo "$ac_cv_header_stdc" >&6; }
5576if test $ac_cv_header_stdc = yes; then
5577
5578$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5579
5580fi
5581
5582# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5583for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5584 inttypes.h stdint.h unistd.h
5585do :
5586 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5587ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5588"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005589if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005590 cat >>confdefs.h <<_ACEOF
5591#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5592_ACEOF
5593
5594fi
5595
5596done
5597
5598
5599
5600 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 +02005601if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005602 MINIX=yes
5603else
5604 MINIX=
5605fi
5606
5607
5608 if test "$MINIX" = yes; then
5609
5610$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5611
5612
5613$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5614
5615
5616$as_echo "#define _MINIX 1" >>confdefs.h
5617
5618 fi
5619
5620
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5622$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005623if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005624 $as_echo_n "(cached) " >&6
5625else
5626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5627/* end confdefs.h. */
5628
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005629# define __EXTENSIONS__ 1
5630 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005631int
5632main ()
5633{
5634
5635 ;
5636 return 0;
5637}
5638_ACEOF
5639if ac_fn_c_try_compile "$LINENO"; then :
5640 ac_cv_safe_to_define___extensions__=yes
5641else
5642 ac_cv_safe_to_define___extensions__=no
5643fi
5644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5645fi
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5647$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5648 test $ac_cv_safe_to_define___extensions__ = yes &&
5649 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5650
5651 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5652
5653 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5654
5655 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5656
5657 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5658
5659
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660
Xavier de Gaye95750b12016-07-09 11:05:42 +02005661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5662$as_echo_n "checking for the Android API level... " >&6; }
5663cat >> conftest.c <<EOF
5664#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005665android_api = __ANDROID_API__
5666arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005667#else
5668#error not Android
5669#endif
5670EOF
5671
5672if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005673 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5674 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5676$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005677 if test -z "$ANDROID_API_LEVEL"; then
5678 echo 'Fatal: you must define __ANDROID_API__'
5679 exit 1
5680 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005681
5682cat >>confdefs.h <<_ACEOF
5683#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5684_ACEOF
5685
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005686
5687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5688$as_echo_n "checking for the Android arm ABI... " >&6; }
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5690$as_echo "$_arm_arch" >&6; }
5691 if test "$_arm_arch" = 7; then
5692 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5693 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5694 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005695else
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5697$as_echo "not Android" >&6; }
5698fi
5699rm -f conftest.c conftest.out
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701# Check for unsupported systems
5702case $ac_sys_system/$ac_sys_release in
5703atheos*|Linux*/1*)
5704 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5705 echo See README for details.
5706 exit 1;;
5707esac
5708
5709
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5711$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
5713# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005714if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715 withval=$with_suffix;
5716 case $withval in
5717 no) EXEEXT=;;
5718 yes) EXEEXT=.exe;;
5719 *) EXEEXT=$withval;;
5720 esac
5721fi
5722
Matthias Kloseb9621712010-04-24 17:59:49 +00005723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5724$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
5726# Test whether we're running on a non-case-sensitive system, in which
5727# case we give a warning if no ext is given
5728
Matthias Kloseb9621712010-04-24 17:59:49 +00005729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5730$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731if test ! -d CaseSensitiveTestDir; then
5732mkdir CaseSensitiveTestDir
5733fi
5734
5735if test -d casesensitivetestdir
5736then
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5738$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739 BUILDEXEEXT=.exe
5740else
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5742$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 BUILDEXEEXT=$EXEEXT
5744fi
5745rmdir CaseSensitiveTestDir
5746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747case $ac_sys_system in
5748hp*|HP*)
5749 case $CC in
5750 cc|*/cc) CC="$CC -Ae";;
5751 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752esac
5753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
Matthias Kloseb9621712010-04-24 17:59:49 +00005755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5756$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757if test -z "$LIBRARY"
5758then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005759 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5762$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763
5764# LDLIBRARY is the name of the library to link against (as opposed to the
5765# name of the library into which to insert object files). BLDLIBRARY is also
5766# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5767# is blank as the main program is not linked directly against LDLIBRARY.
5768# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5769# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5770# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5771# DLLLIBRARY is the shared (i.e., DLL) library.
5772#
5773# RUNSHARED is used to run shared python without installed libraries
5774#
5775# INSTSONAME is the name of the shared library that will be use to install
5776# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005777#
5778# LDVERSION is the shared library version number, normally the Python version
5779# with the ABI build flags appended.
5780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782
5783
5784
5785
5786
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788LDLIBRARY="$LIBRARY"
5789BLDLIBRARY='$(LDLIBRARY)'
5790INSTSONAME='$(LDLIBRARY)'
5791DLLLIBRARY=''
5792LDLIBRARYDIR=''
5793RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005794LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795
5796# LINKCC is the command that links the python executable -- default is $(CC).
5797# If CXX is set, and if it is needed to link a main function that was
5798# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5799# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5802$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803if test -z "$LINKCC"
5804then
5805 LINKCC='$(PURIFY) $(MAINCC)'
5806 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 QNX*)
5808 # qcc must be used because the other compilers do not
5809 # support -N.
5810 LINKCC=qcc;;
5811 esac
5812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5814$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815
Miss Islington (bot)88b86a92020-08-29 09:36:40 -07005816# EXPORTSYMS holds the list of exported symbols for AIX.
5817# EXPORTSFROM holds the module name exporting symbols on AIX.
5818EXPORTSYMS=
5819EXPORTSFROM=
5820
5821
5822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5823$as_echo_n "checking EXPORTSYMS... " >&6; }
5824case $ac_sys_system in
5825AIX*)
5826 EXPORTSYMS="Modules/python.exp"
5827 if test $ac_sys_release -ge 5 -o \
5828 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5829 EXPORTSFROM=. # the main executable
5830 fi
5831 ;;
5832esac
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5834$as_echo "$EXPORTSYMS" >&6; }
5835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5837# make sure we default having it set to "no": this is used by
5838# distutils.unixccompiler to know if it should add --enable-new-dtags
5839# to linker command lines, and failing to detect GNU ld simply results
5840# in the same bahaviour as before.
5841
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5843$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844ac_prog=ld
5845if test "$GCC" = yes; then
5846 ac_prog=`$CC -print-prog-name=ld`
5847fi
5848case `"$ac_prog" -V 2>&1 < /dev/null` in
5849 *GNU*)
5850 GNULD=yes;;
5851 *)
5852 GNULD=no;;
5853esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5855$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5858$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005860if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861 enableval=$enable_shared;
5862fi
5863
5864
5865if test -z "$enable_shared"
5866then
5867 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005868 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869 enable_shared="yes";;
5870 *)
5871 enable_shared="no";;
5872 esac
5873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5875$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876
Matthias Kloseb9621712010-04-24 17:59:49 +00005877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5878$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005880if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881 enableval=$enable_profiling;
5882fi
5883
5884if test "x$enable_profiling" = xyes; then
5885 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005886 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888/* end confdefs.h. */
5889int main() { return 0; }
5890_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005891if ac_fn_c_try_link "$LINENO"; then :
5892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005894 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005896rm -f core conftest.err conftest.$ac_objext \
5897 conftest$ac_exeext conftest.$ac_ext
5898 CC="$ac_save_cc"
5899else
5900 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5903$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904
doko@ubuntu.comba015832012-06-30 16:52:05 +02005905if test "x$enable_profiling" = xyes; then
5906 BASECFLAGS="-pg $BASECFLAGS"
5907 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908fi
5909
Matthias Kloseb9621712010-04-24 17:59:49 +00005910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5911$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912
5913# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5914# library that we build, but we do not want to link against it (we
5915# will find it with a -framework option). For this reason there is an
5916# extra variable BLDLIBRARY against which Python and the extension
5917# modules are linked, BLDLIBRARY. This is normally the same as
5918# LDLIBRARY, but empty for MacOSX framework builds.
5919if test "$enable_framework"
5920then
5921 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 BLDLIBRARY=''
5924else
5925 BLDLIBRARY='$(LDLIBRARY)'
5926fi
5927
5928# Other platforms follow
5929if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005930 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931
Matthias Kloseb9621712010-04-24 17:59:49 +00005932$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
5934 case $ac_sys_system in
5935 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).dll.a'
5937 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
5939 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).so'
5941 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005942 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005944 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005945 then
5946 PY3LIBRARY=libpython3.so
5947 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005949 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).so'
5951 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005952 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005954 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005955 then
5956 PY3LIBRARY=libpython3.so
5957 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 ;;
5959 hp*|HP*)
5960 case `uname -m` in
5961 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ;;
5964 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005965 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
5967 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005969 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 LDLIBRARY='libpython$(LDVERSION).dylib'
5973 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005974 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005976 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005977 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005978 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005979 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980
5981 esac
5982else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005983 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 case $ac_sys_system in
5985 CYGWIN*)
5986 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005987 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 ;;
5989 esac
5990fi
5991
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005992if test "$cross_compiling" = yes; then
5993 RUNSHARED=
5994fi
5995
Matthias Kloseb9621712010-04-24 17:59:49 +00005996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5997$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006000if test -n "$ac_tool_prefix"; then
6001 for ac_prog in ar aal
6002 do
6003 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6004set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6006$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006007if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009else
6010 if test -n "$AR"; then
6011 ac_cv_prog_AR="$AR" # Let the user override the test.
6012else
6013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014for as_dir in $PATH
6015do
6016 IFS=$as_save_IFS
6017 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006020 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022 break 2
6023 fi
6024done
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026IFS=$as_save_IFS
6027
6028fi
6029fi
6030AR=$ac_cv_prog_AR
6031if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6033$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034else
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6036$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037fi
6038
6039
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006040 test -n "$AR" && break
6041 done
6042fi
6043if test -z "$AR"; then
6044 ac_ct_AR=$AR
6045 for ac_prog in ar aal
6046do
6047 # Extract the first word of "$ac_prog", so it can be a program name with args.
6048set dummy $ac_prog; ac_word=$2
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6050$as_echo_n "checking for $ac_word... " >&6; }
6051if ${ac_cv_prog_ac_ct_AR+:} false; then :
6052 $as_echo_n "(cached) " >&6
6053else
6054 if test -n "$ac_ct_AR"; then
6055 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6056else
6057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060 IFS=$as_save_IFS
6061 test -z "$as_dir" && as_dir=.
6062 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006064 ac_cv_prog_ac_ct_AR="$ac_prog"
6065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6066 break 2
6067 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006069 done
6070IFS=$as_save_IFS
6071
6072fi
6073fi
6074ac_ct_AR=$ac_cv_prog_ac_ct_AR
6075if test -n "$ac_ct_AR"; then
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6077$as_echo "$ac_ct_AR" >&6; }
6078else
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
6081fi
6082
6083
6084 test -n "$ac_ct_AR" && break
6085done
6086
6087 if test "x$ac_ct_AR" = x; then
6088 AR="ar"
6089 else
6090 case $cross_compiling:$ac_tool_warned in
6091yes:)
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6093$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6094ac_tool_warned=yes ;;
6095esac
6096 AR=$ac_ct_AR
6097 fi
6098fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099
6100
6101# tweak ARFLAGS only if the user didn't set it on the command line
6102
6103if test -z "$ARFLAGS"
6104then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006105 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106fi
6107
doko@ubuntu.com58844492012-06-30 18:25:32 +02006108if test -n "$ac_tool_prefix"; then
6109 for ac_prog in readelf
6110 do
6111 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6112set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6114$as_echo_n "checking for $ac_word... " >&6; }
6115if ${ac_cv_prog_READELF+:} false; then :
6116 $as_echo_n "(cached) " >&6
6117else
6118 if test -n "$READELF"; then
6119 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6120else
6121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6122for as_dir in $PATH
6123do
6124 IFS=$as_save_IFS
6125 test -z "$as_dir" && as_dir=.
6126 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006127 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006128 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6130 break 2
6131 fi
6132done
6133 done
6134IFS=$as_save_IFS
6135
6136fi
6137fi
6138READELF=$ac_cv_prog_READELF
6139if test -n "$READELF"; then
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6141$as_echo "$READELF" >&6; }
6142else
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6144$as_echo "no" >&6; }
6145fi
6146
6147
6148 test -n "$READELF" && break
6149 done
6150fi
6151if test -z "$READELF"; then
6152 ac_ct_READELF=$READELF
6153 for ac_prog in readelf
6154do
6155 # Extract the first word of "$ac_prog", so it can be a program name with args.
6156set dummy $ac_prog; ac_word=$2
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6158$as_echo_n "checking for $ac_word... " >&6; }
6159if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6160 $as_echo_n "(cached) " >&6
6161else
6162 if test -n "$ac_ct_READELF"; then
6163 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6164else
6165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH
6167do
6168 IFS=$as_save_IFS
6169 test -z "$as_dir" && as_dir=.
6170 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006172 ac_cv_prog_ac_ct_READELF="$ac_prog"
6173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6174 break 2
6175 fi
6176done
6177 done
6178IFS=$as_save_IFS
6179
6180fi
6181fi
6182ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6183if test -n "$ac_ct_READELF"; then
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6185$as_echo "$ac_ct_READELF" >&6; }
6186else
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6188$as_echo "no" >&6; }
6189fi
6190
6191
6192 test -n "$ac_ct_READELF" && break
6193done
6194
6195 if test "x$ac_ct_READELF" = x; then
6196 READELF=":"
6197 else
6198 case $cross_compiling:$ac_tool_warned in
6199yes:)
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6201$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6202ac_tool_warned=yes ;;
6203esac
6204 READELF=$ac_ct_READELF
6205 fi
6206fi
6207
6208if test "$cross_compiling" = yes; then
6209 case "$READELF" in
6210 readelf|:)
6211 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6212 ;;
6213 esac
6214fi
6215
6216
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006219hp*|HP*)
6220 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221 if test -z "$INSTALL"
6222 then
6223 INSTALL="${srcdir}/install-sh -c"
6224 fi
6225esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226# Find a good install program. We prefer a C program (faster),
6227# so one script is as good as another. But avoid the broken or
6228# incompatible versions:
6229# SysV /etc/install, /usr/sbin/install
6230# SunOS /usr/etc/install
6231# IRIX /sbin/install
6232# AIX /bin/install
6233# AmigaOS /C/install, which installs bootblocks on floppy discs
6234# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6235# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6236# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6237# OS/2's system install, which has a completely different semantic
6238# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006239# Reject install programs that cannot install multiple files.
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6241$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006243if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006244 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245else
6246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247for as_dir in $PATH
6248do
6249 IFS=$as_save_IFS
6250 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006251 # Account for people who put trailing slashes in PATH elements.
6252case $as_dir/ in #((
6253 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006254 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006255 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256 /usr/ucb/* ) ;;
6257 *)
6258 # OSF1 and SCO ODT 3.0 have their own names for install.
6259 # Don't use installbsd from OSF since it installs stuff as root
6260 # by default.
6261 for ac_prog in ginstall scoinst install; do
6262 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006263 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264 if test $ac_prog = install &&
6265 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6266 # AIX install. It has an incompatible calling convention.
6267 :
6268 elif test $ac_prog = install &&
6269 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6270 # program-specific install script used by HP pwplus--don't use.
6271 :
6272 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006273 rm -rf conftest.one conftest.two conftest.dir
6274 echo one > conftest.one
6275 echo two > conftest.two
6276 mkdir conftest.dir
6277 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6278 test -s conftest.one && test -s conftest.two &&
6279 test -s conftest.dir/conftest.one &&
6280 test -s conftest.dir/conftest.two
6281 then
6282 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6283 break 3
6284 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285 fi
6286 fi
6287 done
6288 done
6289 ;;
6290esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006291
6292 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293IFS=$as_save_IFS
6294
Matthias Kloseb9621712010-04-24 17:59:49 +00006295rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296
6297fi
6298 if test "${ac_cv_path_install+set}" = set; then
6299 INSTALL=$ac_cv_path_install
6300 else
6301 # As a last resort, use the slow shell script. Don't cache a
6302 # value for INSTALL within a source directory, because that will
6303 # break other packages using the cache if that directory is
6304 # removed, or if the value is a relative name.
6305 INSTALL=$ac_install_sh
6306 fi
6307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6309$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310
6311# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6312# It thinks the first close brace ends the variable substitution.
6313test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6314
6315test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6316
6317test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6318
Matthias Klose93a0ef12012-03-15 18:08:34 +01006319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6320$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6321if test -z "$MKDIR_P"; then
6322 if ${ac_cv_path_mkdir+:} false; then :
6323 $as_echo_n "(cached) " >&6
6324else
6325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6327do
6328 IFS=$as_save_IFS
6329 test -z "$as_dir" && as_dir=.
6330 for ac_prog in mkdir gmkdir; do
6331 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006332 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006333 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6334 'mkdir (GNU coreutils) '* | \
6335 'mkdir (coreutils) '* | \
6336 'mkdir (fileutils) '4.1*)
6337 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6338 break 3;;
6339 esac
6340 done
6341 done
6342 done
6343IFS=$as_save_IFS
6344
6345fi
6346
6347 test -d ./--version && rmdir ./--version
6348 if test "${ac_cv_path_mkdir+set}" = set; then
6349 MKDIR_P="$ac_cv_path_mkdir -p"
6350 else
6351 # As a last resort, use the slow shell script. Don't cache a
6352 # value for MKDIR_P within a source directory, because that will
6353 # break other packages using the cache if that directory is
6354 # removed, or if the value is a relative name.
6355 MKDIR_P="$ac_install_sh -d"
6356 fi
6357fi
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6359$as_echo "$MKDIR_P" >&6; }
6360
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361
6362# Not every filesystem supports hard links
6363
6364if test -z "$LN" ; then
6365 case $ac_sys_system in
6366 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367 *) LN=ln;;
6368 esac
6369fi
6370
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006371# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006372
6373ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006374
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6377$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378
6379# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006380if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381 withval=$with_pydebug;
6382if test "$withval" != no
6383then
6384
Matthias Kloseb9621712010-04-24 17:59:49 +00006385$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
Matthias Kloseb9621712010-04-24 17:59:49 +00006387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6388$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006389 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006390 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006391else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393fi
6394else
Matthias Kloseb9621712010-04-24 17:59:49 +00006395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006397fi
6398
6399
Victor Stinnerf4e47032019-04-25 00:56:28 +02006400# Check for --with-trace-refs
6401# --with-trace-refs
6402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6403$as_echo_n "checking for --with-trace-refs... " >&6; }
6404
6405# Check whether --with-trace-refs was given.
6406if test "${with_trace_refs+set}" = set; then :
6407 withval=$with_trace_refs;
6408else
6409 with_trace_refs=no
6410fi
6411
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6413$as_echo "$with_trace_refs" >&6; }
6414
6415if test "$with_trace_refs" = "yes"
6416then
6417
6418$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6419
6420fi
6421
6422# Check for --with-assertions.
6423# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006424assertions='false'
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6426$as_echo_n "checking for --with-assertions... " >&6; }
6427
6428# Check whether --with-assertions was given.
6429if test "${with_assertions+set}" = set; then :
6430 withval=$with_assertions;
6431if test "$withval" != no
6432then
6433 assertions='true'
6434fi
6435fi
6436
6437if test "$assertions" = 'true'; then
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6439$as_echo "yes" >&6; }
6440elif test "$Py_DEBUG" = 'true'; then
6441 assertions='true'
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6443$as_echo "implied by --with-pydebug" >&6; }
6444else
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6446$as_echo "no" >&6; }
6447fi
6448
Brett Cannon63d98bc2016-09-06 17:12:40 -07006449# Enable optimization flags
6450
6451
6452Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6454$as_echo_n "checking for --enable-optimizations... " >&6; }
6455# Check whether --enable-optimizations was given.
6456if test "${enable_optimizations+set}" = set; then :
6457 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006458if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006459then
6460 Py_OPT='true'
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6462$as_echo "yes" >&6; };
6463else
6464 Py_OPT='false'
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; };
6467fi
6468else
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; }
6471fi
6472
6473if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006474 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6475 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006476 # 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 +00006477 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006478 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006479 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006480 DEF_MAKE_RULE="build_all"
6481else
6482 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006484 DEF_MAKE_RULE="all"
6485fi
6486
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006487
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6489$as_echo_n "checking PROFILE_TASK... " >&6; }
6490if test -z "$PROFILE_TASK"
6491then
6492 PROFILE_TASK='-m test --pgo'
6493fi
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6495$as_echo "$PROFILE_TASK" >&6; }
6496
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006497# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6498# normal names in the default $PATH (ie: Ubuntu). They exist under the
6499# non-suffixed name in their versioned llvm directory.
6500
6501llvm_bin_dir=''
6502llvm_path="${PATH}"
6503if test "${CC}" = "clang"
6504then
6505 clang_bin=`which clang`
6506 # Some systems install clang elsewhere as a symlink to the real path
6507 # which is where the related llvm tools are located.
6508 if test -L "${clang_bin}"
6509 then
6510 clang_dir=`dirname "${clang_bin}"`
6511 clang_bin=`readlink "${clang_bin}"`
6512 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6513 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6514 fi
6515fi
6516
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006517# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6519$as_echo_n "checking for --with-lto... " >&6; }
6520
6521# Check whether --with-lto was given.
6522if test "${with_lto+set}" = set; then :
6523 withval=$with_lto;
6524if test "$withval" != no
6525then
6526 Py_LTO='true'
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6528$as_echo "yes" >&6; };
6529else
6530 Py_LTO='false'
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6532$as_echo "no" >&6; };
6533fi
6534else
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539if test "$Py_LTO" = 'true' ; then
6540 case $CC in
6541 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006542
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006543 if test -n "$ac_tool_prefix"; then
6544 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6545set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6547$as_echo_n "checking for $ac_word... " >&6; }
6548if ${ac_cv_path_LLVM_AR+:} false; then :
6549 $as_echo_n "(cached) " >&6
6550else
6551 case $LLVM_AR in
6552 [\\/]* | ?:[\\/]*)
6553 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6554 ;;
6555 *)
6556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6557for as_dir in ${llvm_path}
6558do
6559 IFS=$as_save_IFS
6560 test -z "$as_dir" && as_dir=.
6561 for ac_exec_ext in '' $ac_executable_extensions; do
6562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6563 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6565 break 2
6566 fi
6567done
6568 done
6569IFS=$as_save_IFS
6570
6571 ;;
6572esac
6573fi
6574LLVM_AR=$ac_cv_path_LLVM_AR
6575if test -n "$LLVM_AR"; then
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6577$as_echo "$LLVM_AR" >&6; }
6578else
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6580$as_echo "no" >&6; }
6581fi
6582
6583
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006584fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006585if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006586 ac_pt_LLVM_AR=$LLVM_AR
6587 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006588set dummy llvm-ar; ac_word=$2
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590$as_echo_n "checking for $ac_word... " >&6; }
6591if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6592 $as_echo_n "(cached) " >&6
6593else
6594 case $ac_pt_LLVM_AR in
6595 [\\/]* | ?:[\\/]*)
6596 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6597 ;;
6598 *)
6599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6600for as_dir in ${llvm_path}
6601do
6602 IFS=$as_save_IFS
6603 test -z "$as_dir" && as_dir=.
6604 for ac_exec_ext in '' $ac_executable_extensions; do
6605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6606 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6608 break 2
6609 fi
6610done
6611 done
6612IFS=$as_save_IFS
6613
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006614 ;;
6615esac
6616fi
6617ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6618if test -n "$ac_pt_LLVM_AR"; then
6619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6620$as_echo "$ac_pt_LLVM_AR" >&6; }
6621else
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623$as_echo "no" >&6; }
6624fi
6625
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006626 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006627 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006628 else
6629 case $cross_compiling:$ac_tool_warned in
6630yes:)
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6632$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6633ac_tool_warned=yes ;;
6634esac
6635 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006636 fi
6637else
6638 LLVM_AR="$ac_cv_path_LLVM_AR"
6639fi
6640
6641
6642 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6643 then
6644 LLVM_AR_FOUND="found"
6645 else
6646 LLVM_AR_FOUND="not-found"
6647 fi
6648 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6649 then
6650 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6651 if test -n "${found_llvm_ar}"
6652 then
6653 LLVM_AR='/usr/bin/xcrun llvm-ar'
6654 LLVM_AR_FOUND=found
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6656$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6657 fi
6658 fi
6659 if test $LLVM_AR_FOUND = not-found
6660 then
6661 LLVM_PROFR_ERR=yes
6662 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6663 else
6664 LLVM_AR_ERR=no
6665 fi
6666 AR="${LLVM_AR}"
6667 case $ac_sys_system in
6668 Darwin*)
6669 # Any changes made here should be reflected in the GCC+Darwin case below
6670 LTOFLAGS="-flto -Wl,-export_dynamic"
6671 ;;
6672 *)
6673 LTOFLAGS="-flto"
6674 ;;
6675 esac
6676 ;;
6677 *gcc*)
6678 case $ac_sys_system in
6679 Darwin*)
6680 LTOFLAGS="-flto -Wl,-export_dynamic"
6681 ;;
6682 *)
6683 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6684 ;;
6685 esac
6686 ;;
6687 esac
6688
6689 if test "$ac_cv_prog_cc_g" = "yes"
6690 then
6691 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6692 # to get debug symbols.
6693 LTOFLAGS="$LTOFLAGS -g"
6694 fi
6695
stratakisf92c7aa2018-12-04 15:54:01 +01006696 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006697 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006698fi
6699
6700# Enable PGO flags.
6701
6702
6703
6704
6705
6706
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006707if test -n "$ac_tool_prefix"; then
6708 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6709set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711$as_echo_n "checking for $ac_word... " >&6; }
6712if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6713 $as_echo_n "(cached) " >&6
6714else
6715 case $LLVM_PROFDATA in
6716 [\\/]* | ?:[\\/]*)
6717 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6718 ;;
6719 *)
6720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6721for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006722do
6723 IFS=$as_save_IFS
6724 test -z "$as_dir" && as_dir=.
6725 for ac_exec_ext in '' $ac_executable_extensions; do
6726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006727 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6729 break 2
6730 fi
6731done
6732 done
6733IFS=$as_save_IFS
6734
Gregory P. Smith799520c2016-09-07 16:10:00 -07006735 ;;
6736esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006737fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006738LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6739if test -n "$LLVM_PROFDATA"; then
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6741$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006742else
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744$as_echo "no" >&6; }
6745fi
6746
6747
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006748fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006749if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006750 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6751 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006752set dummy llvm-profdata; ac_word=$2
6753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6754$as_echo_n "checking for $ac_word... " >&6; }
6755if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6756 $as_echo_n "(cached) " >&6
6757else
6758 case $ac_pt_LLVM_PROFDATA in
6759 [\\/]* | ?:[\\/]*)
6760 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6761 ;;
6762 *)
6763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6764for as_dir in ${llvm_path}
6765do
6766 IFS=$as_save_IFS
6767 test -z "$as_dir" && as_dir=.
6768 for ac_exec_ext in '' $ac_executable_extensions; do
6769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6770 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6772 break 2
6773 fi
6774done
6775 done
6776IFS=$as_save_IFS
6777
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 ;;
6779esac
6780fi
6781ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6782if test -n "$ac_pt_LLVM_PROFDATA"; then
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6784$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6785else
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6787$as_echo "no" >&6; }
6788fi
6789
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006790 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006791 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006792 else
6793 case $cross_compiling:$ac_tool_warned in
6794yes:)
6795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6797ac_tool_warned=yes ;;
6798esac
6799 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800 fi
6801else
6802 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6803fi
6804
6805
6806if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6807then
6808 LLVM_PROF_FOUND="found"
6809else
6810 LLVM_PROF_FOUND="not-found"
6811fi
6812if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6813then
6814 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6815 if test -n "${found_llvm_profdata}"
6816 then
6817 # llvm-profdata isn't directly in $PATH in some cases.
6818 # https://apple.stackexchange.com/questions/197053/
6819 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6820 LLVM_PROF_FOUND=found
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6822$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6823 fi
6824fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825LLVM_PROF_ERR=no
6826case $CC in
6827 *clang*)
6828 # Any changes made here should be reflected in the GCC+Darwin case below
6829 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6830 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006831 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006832 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6833 if test $LLVM_PROF_FOUND = not-found
6834 then
6835 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006836 if test "${REQUIRE_PGO}" = "yes"
6837 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006838 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 -07006839 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006840 fi
6841 ;;
6842 *gcc*)
6843 case $ac_sys_system in
6844 Darwin*)
6845 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6846 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006847 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006848 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006849 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006850 then
6851 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006852 if test "${REQUIRE_PGO}" = "yes"
6853 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006854 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 -07006855 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006856 fi
6857 ;;
6858 *)
6859 PGO_PROF_GEN_FLAG="-fprofile-generate"
6860 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6861 LLVM_PROF_MERGER="true"
6862 LLVM_PROF_FILE=""
6863 ;;
6864 esac
6865 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006866 *icc*)
6867 PGO_PROF_GEN_FLAG="-prof-gen"
6868 PGO_PROF_USE_FLAG="-prof-use"
6869 LLVM_PROF_MERGER="true"
6870 LLVM_PROF_FILE=""
6871 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006872esac
6873
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6875# merged with this chunk of code?
6876
6877# Optimizer/debugger flags
6878# ------------------------
6879# (The following bit of code is complicated enough - please keep things
6880# indented properly. Just pretend you're editing Python code. ;-)
6881
6882# There are two parallel sets of case statements below, one that checks to
6883# see if OPT was set and one that does BASECFLAGS setting based upon
6884# compiler and platform. BASECFLAGS tweaks need to be made even if the
6885# user set OPT.
6886
Victor Stinner23a683a2019-04-12 21:27:37 +02006887case $CC in
6888 *clang*)
6889 cc_is_clang=1
6890 ;;
6891 *)
6892 if $CC --version 2>&1 | grep -q clang
6893 then
6894 cc_is_clang=1
6895 else
6896 cc_is_clang=
6897 fi
6898esac
6899
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900# tweak OPT based on compiler and platform, only if the user didn't set
6901# it on the command line
6902
Victor Stinner9ed34a82017-05-02 22:35:58 +02006903
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006904if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905then
6906 case $GCC in
6907 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6909 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6910 WRAP="-fwrapv"
6911 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006912
Victor Stinner35f3d242017-04-21 12:35:24 +02006913 if test -n "${cc_is_clang}"
6914 then
6915 # Clang also needs -fwrapv
6916 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006917 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6918 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006919 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006920 fi
6921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922 case $ac_cv_prog_cc_g in
6923 yes)
6924 if test "$Py_DEBUG" = 'true' ; then
6925 # Optimization messes up debuggers, so turn it off for
6926 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006927 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006928 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006929 else
Victor Stinner28205b22017-04-21 11:24:34 +02006930 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932 else
Victor Stinner28205b22017-04-21 11:24:34 +02006933 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934 fi
6935 ;;
6936 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006937 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938 ;;
6939 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006940
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006941 case $ac_sys_system in
6942 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6943 ;;
6944 esac
6945 ;;
6946
6947 *)
6948 OPT="-O"
6949 ;;
6950 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951fi
6952
6953
6954
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006955
stratakiscf10a752018-12-19 18:19:01 +01006956
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006957# The -arch flags for universal builds on OSX
6958UNIVERSAL_ARCH_FLAGS=
6959
6960
6961# tweak BASECFLAGS based on compiler and platform
6962case $GCC in
6963yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006964 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006965
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6967$as_echo_n "checking for -Wextra... " >&6; }
6968 ac_save_cc="$CC"
6969 CC="$CC -Wextra -Werror"
6970 if ${ac_cv_extra_warnings+:} false; then :
6971 $as_echo_n "(cached) " >&6
6972else
6973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6974/* end confdefs.h. */
6975
6976
6977int
6978main ()
6979{
6980
6981 ;
6982 return 0;
6983}
6984
6985_ACEOF
6986if ac_fn_c_try_compile "$LINENO"; then :
6987
6988 ac_cv_extra_warnings=yes
6989
6990else
6991
6992 ac_cv_extra_warnings=no
6993
6994fi
6995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6996fi
6997
6998 CC="$ac_save_cc"
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7000$as_echo "$ac_cv_extra_warnings" >&6; }
7001
7002 if test $ac_cv_extra_warnings = yes
7003 then
7004 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7005 fi
7006
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007007 # Python doesn't violate C99 aliasing rules, but older versions of
7008 # GCC produce warnings for legal Python code. Enable
7009 # -fno-strict-aliasing on versions of GCC that support but produce
7010 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7012$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007013 ac_save_cc="$CC"
7014 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007016 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007018else
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007020/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007021
Matthias Kloseb159a552010-04-25 21:00:44 +00007022
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007023int
7024main ()
7025{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007026
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007027 ;
7028 return 0;
7029}
Matthias Kloseb159a552010-04-25 21:00:44 +00007030
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007032if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007033
7034 CC="$ac_save_cc -fstrict-aliasing"
7035 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007037/* end confdefs.h. */
7038
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007039 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007040int
7041main ()
7042{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007043double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007044 ;
7045 return 0;
7046}
Matthias Kloseb159a552010-04-25 21:00:44 +00007047
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007049if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007050
7051 ac_cv_no_strict_aliasing=no
7052
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007053else
Matthias Kloseb159a552010-04-25 21:00:44 +00007054
7055 ac_cv_no_strict_aliasing=yes
7056
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007057fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007059
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007060else
Matthias Kloseb159a552010-04-25 21:00:44 +00007061
7062 ac_cv_no_strict_aliasing=no
7063
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007064fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007066fi
7067
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007068 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007069 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7071$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007072 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007073 then
7074 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7075 fi
7076
Zachary Ware5af85642015-12-21 12:09:17 -06007077 # ICC doesn't recognize the option, but only emits a warning
7078 ## XXX does it emit an unused result warning and can it be disabled?
7079 case "$CC" in
7080 *icc*)
7081 ac_cv_disable_unused_result_warning=no
7082 ;;
7083 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7085$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7086 ac_save_cc="$CC"
7087 CC="$CC -Wunused-result -Werror"
7088 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007089 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007090 $as_echo_n "(cached) " >&6
7091else
7092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7093/* end confdefs.h. */
7094
7095
7096int
7097main ()
7098{
7099
7100 ;
7101 return 0;
7102}
7103
7104_ACEOF
7105if ac_fn_c_try_compile "$LINENO"; then :
7106
7107 ac_cv_disable_unused_result_warning=yes
7108
7109else
7110
7111 ac_cv_disable_unused_result_warning=no
7112
7113fi
7114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7115fi
7116
7117 CFLAGS="$save_CFLAGS"
7118 CC="$ac_save_cc"
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7120$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007121 ;;
7122 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007123
7124 if test $ac_cv_disable_unused_result_warning = yes
7125 then
7126 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007127 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7128 fi
7129
7130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7131$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7132 ac_save_cc="$CC"
7133 CC="$CC -Wunused-parameter -Werror"
7134 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7135 $as_echo_n "(cached) " >&6
7136else
7137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7138/* end confdefs.h. */
7139
7140
7141int
7142main ()
7143{
7144
7145 ;
7146 return 0;
7147}
7148
7149_ACEOF
7150if ac_fn_c_try_compile "$LINENO"; then :
7151
7152 ac_cv_disable_unused_parameter_warning=yes
7153
7154else
7155
7156 ac_cv_disable_unused_parameter_warning=no
7157
7158fi
7159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7160fi
7161
7162 CC="$ac_save_cc"
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7164$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7165
7166 if test $ac_cv_disable_unused_parameter_warning = yes
7167 then
7168 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7169 fi
7170
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7172$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7173 ac_save_cc="$CC"
7174 CC="$CC -Wmissing-field-initializers -Werror"
7175 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7176 $as_echo_n "(cached) " >&6
7177else
7178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7179/* end confdefs.h. */
7180
7181
7182int
7183main ()
7184{
7185
7186 ;
7187 return 0;
7188}
7189
7190_ACEOF
7191if ac_fn_c_try_compile "$LINENO"; then :
7192
7193 ac_cv_disable_missing_field_initializers=yes
7194
7195else
7196
7197 ac_cv_disable_missing_field_initializers=no
7198
7199fi
7200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7201fi
7202
7203 CC="$ac_save_cc"
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7205$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7206
7207 if test $ac_cv_disable_missing_field_initializers = yes
7208 then
7209 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007210 fi
7211
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7213$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7214 ac_save_cc="$CC"
7215 CC="$CC -Wsign-compare"
7216 save_CFLAGS="$CFLAGS"
7217 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7218 $as_echo_n "(cached) " >&6
7219else
7220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7221/* end confdefs.h. */
7222
7223
7224int
7225main ()
7226{
7227
7228 ;
7229 return 0;
7230}
7231
7232_ACEOF
7233if ac_fn_c_try_compile "$LINENO"; then :
7234
7235 ac_cv_enable_sign_compare_warning=yes
7236
7237else
7238
7239 ac_cv_enable_sign_compare_warning=no
7240
7241fi
7242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7243fi
7244
7245 CFLAGS="$save_CFLAGS"
7246 CC="$ac_save_cc"
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7248$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7249
7250 if test $ac_cv_enable_sign_compare_warning = yes
7251 then
7252 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7253 fi
7254
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7256$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7257 ac_save_cc="$CC"
7258 CC="$CC -Wunreachable-code"
7259 save_CFLAGS="$CFLAGS"
7260 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7261 $as_echo_n "(cached) " >&6
7262else
7263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7264/* end confdefs.h. */
7265
7266
7267int
7268main ()
7269{
7270
7271 ;
7272 return 0;
7273}
7274
7275_ACEOF
7276if ac_fn_c_try_compile "$LINENO"; then :
7277
7278 ac_cv_enable_unreachable_code_warning=yes
7279
7280else
7281
7282 ac_cv_enable_unreachable_code_warning=no
7283
7284fi
7285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7286fi
7287
7288 CFLAGS="$save_CFLAGS"
7289 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007290
7291 # Don't enable unreachable code warning in debug mode, since it usually
7292 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007293 # Issue #24324: Unfortunately, the unreachable code warning does not work
7294 # correctly on gcc and has been silently removed from the compiler.
7295 # It is supported on clang but on OS X systems gcc may be an alias
7296 # for clang. Try to determine if the compiler is not really gcc and,
7297 # if so, only then enable the warning.
7298 if test $ac_cv_enable_unreachable_code_warning = yes && \
7299 test "$Py_DEBUG" != "true" && \
7300 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007301 then
7302 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007303 else
7304 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007305 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7307$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007308
INADA Naokie3364842018-06-05 20:40:53 +09007309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7310$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7311 ac_save_cc="$CC"
7312 CC="$CC -Werror -Wstrict-prototypes"
7313 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7314 $as_echo_n "(cached) " >&6
7315else
7316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7317/* end confdefs.h. */
7318
7319
7320int
7321main ()
7322{
7323
7324 ;
7325 return 0;
7326}
7327
7328_ACEOF
7329if ac_fn_c_try_compile "$LINENO"; then :
7330
7331 ac_cv_enable_strict_prototypes_warning=yes
7332
7333else
7334
7335 ac_cv_enable_strict_prototypes_warning=no
7336
7337fi
7338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7339fi
7340
7341 CC="$ac_save_cc"
7342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7343$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7344
7345 if test $ac_cv_enable_strict_prototypes_warning = yes
7346 then
7347 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7348 fi
7349
Victor Stinner193ee0a2017-02-06 14:24:00 +01007350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7351$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7352 ac_save_cc="$CC"
7353 CC="$CC -Werror=implicit-function-declaration"
7354 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7355 $as_echo_n "(cached) " >&6
7356else
7357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7358/* end confdefs.h. */
7359
7360
7361int
7362main ()
7363{
7364
7365 ;
7366 return 0;
7367}
7368
7369_ACEOF
7370if ac_fn_c_try_compile "$LINENO"; then :
7371
7372 ac_cv_enable_implicit_function_declaration_error=yes
7373
7374else
7375
7376 ac_cv_enable_implicit_function_declaration_error=no
7377
7378fi
7379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7380fi
7381
7382 CC="$ac_save_cc"
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7384$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7385
7386 if test $ac_cv_enable_implicit_function_declaration_error = yes
7387 then
7388 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7389 fi
7390
Vinay Sajip0b60f642019-10-15 08:26:12 +01007391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7392$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7393 ac_save_cc="$CC"
7394 CC="$CC -fvisibility=hidden"
7395 if ${ac_cv_enable_visibility+:} false; then :
7396 $as_echo_n "(cached) " >&6
7397else
7398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7399/* end confdefs.h. */
7400
7401
7402int
7403main ()
7404{
7405
7406 ;
7407 return 0;
7408}
7409
7410_ACEOF
7411if ac_fn_c_try_compile "$LINENO"; then :
7412
7413 ac_cv_enable_visibility=yes
7414
7415else
7416
7417 ac_cv_enable_visibility=no
7418
7419fi
7420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7421fi
7422
7423 CC="$ac_save_cc"
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7425$as_echo "$ac_cv_enable_visibility" >&6; }
7426
7427 if test $ac_cv_enable_visibility = yes
7428 then
7429 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7430 fi
7431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7433 # support. Without this, treatment of subnormals doesn't follow
7434 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007435 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436 alpha*)
7437 BASECFLAGS="$BASECFLAGS -mieee"
7438 ;;
7439 esac
7440
7441 case $ac_sys_system in
7442 SCO_SV*)
7443 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7444 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007445
Ned Deily87adb6e2013-10-18 21:09:56 -07007446 Darwin*)
7447 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7448 # used to be here, but non-Apple gcc doesn't accept them.
7449 if test "${CC}" = gcc
7450 then
7451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007452$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007453 case "${UNIVERSALSDK}" in
7454 */MacOSX10.4u.sdk)
7455 # Build using 10.4 SDK, force usage of gcc when the
7456 # compiler is gcc, otherwise the user will get very
7457 # confusing error messages when building on OSX 10.6
7458 CC=gcc-4.0
7459 CPP=cpp-4.0
7460 ;;
7461 esac
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007463$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007464 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465
Ned Deily87adb6e2013-10-18 21:09:56 -07007466 if test "${enable_universalsdk}"
7467 then
7468 case "$UNIVERSAL_ARCHS" in
7469 32-bit)
7470 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7471 LIPO_32BIT_FLAGS=""
7472 ARCH_RUN_32BIT=""
7473 ;;
7474 64-bit)
7475 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7476 LIPO_32BIT_FLAGS=""
7477 ARCH_RUN_32BIT="true"
7478 ;;
7479 all)
7480 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7481 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7482 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7483 ;;
7484 intel)
7485 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7486 LIPO_32BIT_FLAGS="-extract i386"
7487 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7488 ;;
7489 intel-32)
7490 UNIVERSAL_ARCH_FLAGS="-arch i386"
7491 LIPO_32BIT_FLAGS=""
7492 ARCH_RUN_32BIT=""
7493 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007494 intel-64)
7495 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7496 LIPO_32BIT_FLAGS=""
7497 ARCH_RUN_32BIT="true"
7498 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007499 3-way)
7500 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7501 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7502 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7503 ;;
7504 *)
7505 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7506 ;;
7507 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508
Ned Deily87adb6e2013-10-18 21:09:56 -07007509 if test "${UNIVERSALSDK}" != "/"
7510 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007511 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7512 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007513 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007514 else
7515 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7516 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007517 fi
7518 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519
Ned Deily87adb6e2013-10-18 21:09:56 -07007520 # Calculate an appropriate deployment target for this build:
7521 # The deployment target value is used explicitly to enable certain
7522 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007523 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007524 # component of the string returned by distutils.get_platform().
7525 #
7526 # Use the value from:
7527 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7528 # 2. the operating system version of the build machine if >= 10.6
7529 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7530 # below to pick either 10.3, 10.4, or 10.5 as the target.
7531 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532
Ned Deily87adb6e2013-10-18 21:09:56 -07007533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7534$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007535 cur_target_major=`sw_vers -productVersion | \
7536 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7537 cur_target_minor=`sw_vers -productVersion | \
7538 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7539 cur_target="${cur_target_major}.${cur_target_minor}"
7540 if test ${cur_target_major} -eq 10 && \
7541 test ${cur_target_minor} -ge 3 && \
7542 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007543 then
Ned Deily36820b62014-06-25 13:44:22 -07007544 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007545 cur_target=10.3
7546 if test ${enable_universalsdk}
7547 then
7548 case "$UNIVERSAL_ARCHS" in
7549 all|3-way|intel|64-bit)
7550 # These configurations were first supported in 10.5
7551 cur_target='10.5'
7552 ;;
7553 esac
7554 else
7555 if test `/usr/bin/arch` = "i386"
7556 then
7557 # 10.4 was the first release to support Intel archs
7558 cur_target="10.4"
7559 fi
7560 fi
7561 fi
7562 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007563
Ned Deily87adb6e2013-10-18 21:09:56 -07007564 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7565 # environment with a value that is the same as what we'll use
7566 # in the Makefile to ensure that we'll get the same compiler
7567 # environment during configure and build time.
7568 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7569 export MACOSX_DEPLOYMENT_TARGET
7570 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7572$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007573
Ned Deily87adb6e2013-10-18 21:09:56 -07007574 # end of Darwin* tests
7575 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576 esac
7577 ;;
7578
7579*)
7580 case $ac_sys_system in
7581 OpenUNIX*|UnixWare*)
7582 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7583 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584 SCO_SV*)
7585 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7586 ;;
7587 esac
7588 ;;
7589esac
7590
Zachary Ware5af85642015-12-21 12:09:17 -06007591# ICC needs -fp-model strict or floats behave badly
7592case "$CC" in
7593*icc*)
7594 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7595 ;;
7596esac
7597
T. Woutersddbfa2c2017-05-23 01:30:49 +02007598if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599 :
7600else
7601 OPT="-DNDEBUG $OPT"
7602fi
7603
7604if test "$ac_arch_flags"
7605then
7606 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7607fi
7608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609# On some compilers, pthreads are available without further options
7610# (e.g. MacOS X). On some of these systems, the compiler will not
7611# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7612# So we have to see first whether pthreads are available without
7613# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7615$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007616if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618else
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620 ac_cv_pthread_is_default=no
7621else
Matthias Kloseb9621712010-04-24 17:59:49 +00007622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623/* end confdefs.h. */
7624
Stefan Krah7dba5942012-11-22 22:49:11 +01007625#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626#include <pthread.h>
7627
7628void* routine(void* p){return NULL;}
7629
7630int main(){
7631 pthread_t p;
7632 if(pthread_create(&p,NULL,routine,NULL)!=0)
7633 return 1;
7634 (void)pthread_detach(p);
7635 return 0;
7636}
7637
7638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007639if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640
7641 ac_cv_pthread_is_default=yes
7642 ac_cv_kthread=no
7643 ac_cv_pthread=no
7644
7645else
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007650fi
7651
7652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653fi
7654
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7656$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657
7658
7659if test $ac_cv_pthread_is_default = yes
7660then
7661 ac_cv_kpthread=no
7662else
7663# -Kpthread, if available, provides the right #defines
7664# and linker options to make pthread_create available
7665# Some compilers won't report that they do not support -Kpthread,
7666# so we need to run a program to see whether it really made the
7667# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7669$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007670if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007671 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007672else
7673 ac_save_cc="$CC"
7674CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007675if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676 ac_cv_kpthread=no
7677else
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679/* end confdefs.h. */
7680
Stefan Krah7dba5942012-11-22 22:49:11 +01007681#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682#include <pthread.h>
7683
7684void* routine(void* p){return NULL;}
7685
7686int main(){
7687 pthread_t p;
7688 if(pthread_create(&p,NULL,routine,NULL)!=0)
7689 return 1;
7690 (void)pthread_detach(p);
7691 return 0;
7692}
7693
7694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007695if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696 ac_cv_kpthread=yes
7697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702fi
7703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704CC="$ac_save_cc"
7705fi
7706
Matthias Kloseb9621712010-04-24 17:59:49 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7708$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709fi
7710
7711if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7712then
7713# -Kthread, if available, provides the right #defines
7714# and linker options to make pthread_create available
7715# Some compilers won't report that they do not support -Kthread,
7716# so we need to run a program to see whether it really made the
7717# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7719$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007720if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722else
7723 ac_save_cc="$CC"
7724CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007725if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726 ac_cv_kthread=no
7727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729/* end confdefs.h. */
7730
Stefan Krah7dba5942012-11-22 22:49:11 +01007731#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732#include <pthread.h>
7733
7734void* routine(void* p){return NULL;}
7735
7736int main(){
7737 pthread_t p;
7738 if(pthread_create(&p,NULL,routine,NULL)!=0)
7739 return 1;
7740 (void)pthread_detach(p);
7741 return 0;
7742}
7743
7744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007745if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746 ac_cv_kthread=yes
7747else
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752fi
7753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754CC="$ac_save_cc"
7755fi
7756
Matthias Kloseb9621712010-04-24 17:59:49 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7758$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759fi
7760
7761if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7762then
7763# -pthread, if available, provides the right #defines
7764# and linker options to make pthread_create available
7765# Some compilers won't report that they do not support -pthread,
7766# so we need to run a program to see whether it really made the
7767# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7769$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007770if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007771 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772else
7773 ac_save_cc="$CC"
7774CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007775if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776 ac_cv_pthread=no
7777else
Matthias Kloseb9621712010-04-24 17:59:49 +00007778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779/* end confdefs.h. */
7780
Stefan Krah7dba5942012-11-22 22:49:11 +01007781#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007782#include <pthread.h>
7783
7784void* routine(void* p){return NULL;}
7785
7786int main(){
7787 pthread_t p;
7788 if(pthread_create(&p,NULL,routine,NULL)!=0)
7789 return 1;
7790 (void)pthread_detach(p);
7791 return 0;
7792}
7793
7794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007795if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796 ac_cv_pthread=yes
7797else
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802fi
7803
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007804CC="$ac_save_cc"
7805fi
7806
Matthias Kloseb9621712010-04-24 17:59:49 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7808$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809fi
7810
7811# If we have set a CC compiler flag for thread support then
7812# check if it works for CXX, too.
7813ac_cv_cxx_thread=no
7814if test ! -z "$CXX"
7815then
Matthias Kloseb9621712010-04-24 17:59:49 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7817$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007818ac_save_cxx="$CXX"
7819
7820if test "$ac_cv_kpthread" = "yes"
7821then
7822 CXX="$CXX -Kpthread"
7823 ac_cv_cxx_thread=yes
7824elif test "$ac_cv_kthread" = "yes"
7825then
7826 CXX="$CXX -Kthread"
7827 ac_cv_cxx_thread=yes
7828elif test "$ac_cv_pthread" = "yes"
7829then
7830 CXX="$CXX -pthread"
7831 ac_cv_cxx_thread=yes
7832fi
7833
7834if test $ac_cv_cxx_thread = yes
7835then
7836 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7837 $CXX -c conftest.$ac_ext 2>&5
7838 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7839 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7840 then
7841 ac_cv_cxx_thread=yes
7842 else
7843 ac_cv_cxx_thread=no
7844 fi
7845 rm -fr conftest*
7846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7848$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849fi
7850CXX="$ac_save_cxx"
7851
7852
7853# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7855$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007856if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007857 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007858else
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007860/* end confdefs.h. */
7861#include <stdlib.h>
7862#include <stdarg.h>
7863#include <string.h>
7864#include <float.h>
7865
7866int
7867main ()
7868{
7869
7870 ;
7871 return 0;
7872}
7873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007874if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875 ac_cv_header_stdc=yes
7876else
Matthias Kloseb9621712010-04-24 17:59:49 +00007877 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007878fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7880
7881if test $ac_cv_header_stdc = yes; then
7882 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007884/* end confdefs.h. */
7885#include <string.h>
7886
7887_ACEOF
7888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 $EGREP "memchr" >/dev/null 2>&1; then :
7890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007891else
7892 ac_cv_header_stdc=no
7893fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007894rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007895
7896fi
7897
7898if test $ac_cv_header_stdc = yes; then
7899 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007901/* end confdefs.h. */
7902#include <stdlib.h>
7903
7904_ACEOF
7905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 $EGREP "free" >/dev/null 2>&1; then :
7907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007908else
7909 ac_cv_header_stdc=no
7910fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007911rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007912
7913fi
7914
7915if test $ac_cv_header_stdc = yes; then
7916 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007918 :
7919else
Matthias Kloseb9621712010-04-24 17:59:49 +00007920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007921/* end confdefs.h. */
7922#include <ctype.h>
7923#include <stdlib.h>
7924#if ((' ' & 0x0FF) == 0x020)
7925# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7926# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7927#else
7928# define ISLOWER(c) \
7929 (('a' <= (c) && (c) <= 'i') \
7930 || ('j' <= (c) && (c) <= 'r') \
7931 || ('s' <= (c) && (c) <= 'z'))
7932# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7933#endif
7934
7935#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7936int
7937main ()
7938{
7939 int i;
7940 for (i = 0; i < 256; i++)
7941 if (XOR (islower (i), ISLOWER (i))
7942 || toupper (i) != TOUPPER (i))
7943 return 2;
7944 return 0;
7945}
7946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007947if ac_fn_c_try_run "$LINENO"; then :
7948
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007949else
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007954fi
7955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007956fi
7957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7959$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007960if test $ac_cv_header_stdc = yes; then
7961
Matthias Kloseb9621712010-04-24 17:59:49 +00007962$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007963
7964fi
7965
stratakise768c862018-01-23 16:11:24 +01007966for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007967fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007968ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007969sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007970utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007971poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007972sys/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 +01007973sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007974sys/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 +01007975sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007976sys/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 -07007977libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007978linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007979sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007980do :
7981 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7982ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007983if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007985#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007986_ACEOF
7987
7988fi
7989
Guido van Rossum627b2d71993-12-24 10:39:16 +00007990done
7991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007992ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007993for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7996$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007997if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007999else
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008001/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008002#include <sys/types.h>
8003#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008004
Martin v. Löwis11437992002-04-12 09:54:03 +00008005int
8006main ()
8007{
8008if ((DIR *) 0)
8009return 0;
8010 ;
8011 return 0;
8012}
8013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008021eval ac_res=\$$as_ac_Header
8022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8023$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008024if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008026#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008027_ACEOF
8028
8029ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008030fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008032done
8033# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8034if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8036$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008037if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008039else
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044/* Override any GCC internal prototype to avoid an error.
8045 Use char because int might match the return type of a GCC
8046 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008047#ifdef __cplusplus
8048extern "C"
8049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008050char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008051int
8052main ()
8053{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ;
8056 return 0;
8057}
8058_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059for ac_lib in '' dir; do
8060 if test -z "$ac_lib"; then
8061 ac_res="none required"
8062 else
8063 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008064 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008069rm -f core conftest.err conftest.$ac_objext \
8070 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008071 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074done
Victor Stinnere0be4232011-10-25 13:06:09 +02008075if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077else
8078 ac_cv_search_opendir=no
8079fi
8080rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008081LIBS=$ac_func_search_save_LIBS
8082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8084$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008086if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008089fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008090
Michael W. Hudson54241132001-12-07 15:38:26 +00008091else
Matthias Kloseb9621712010-04-24 17:59:49 +00008092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8093$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008094if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008096else
8097 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101/* Override any GCC internal prototype to avoid an error.
8102 Use char because int might match the return type of a GCC
8103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008104#ifdef __cplusplus
8105extern "C"
8106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008107char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008108int
8109main ()
8110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008111return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 ;
8113 return 0;
8114}
8115_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116for ac_lib in '' x; do
8117 if test -z "$ac_lib"; then
8118 ac_res="none required"
8119 else
8120 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008121 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008123 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008124 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008126rm -f core conftest.err conftest.$ac_objext \
8127 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008128 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131done
Victor Stinnere0be4232011-10-25 13:06:09 +02008132if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008134else
8135 ac_cv_search_opendir=no
8136fi
8137rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008138LIBS=$ac_func_search_save_LIBS
8139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8141$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008143if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008145
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008146fi
8147
8148fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8151$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008152if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008154else
Matthias Kloseb9621712010-04-24 17:59:49 +00008155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008156/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008157#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008158int
8159main ()
8160{
8161return makedev(0, 0);
8162 ;
8163 return 0;
8164}
8165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008166if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008167 ac_cv_header_sys_types_h_makedev=yes
8168else
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008171rm -f core conftest.err conftest.$ac_objext \
8172 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008173
8174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8176$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008177
8178if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008179ac_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 +02008180if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008181
Matthias Kloseb9621712010-04-24 17:59:49 +00008182$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008183
8184fi
8185
8186
8187
8188 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 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 +02008190if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008191
Matthias Kloseb9621712010-04-24 17:59:49 +00008192$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008193
8194fi
8195
8196
8197 fi
8198fi
8199
Michael W. Hudson54241132001-12-07 15:38:26 +00008200
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008201# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8202# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8203SAVE_CFLAGS=$CFLAGS
8204CFLAGS="-std=c99 $CFLAGS"
8205for ac_header in bluetooth/bluetooth.h
8206do :
8207 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8208if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8209 cat >>confdefs.h <<_ACEOF
8210#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8211_ACEOF
8212
8213fi
8214
8215done
8216
8217CFLAGS=$SAVE_CFLAGS
8218
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008219# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8220for ac_header in net/if.h
8221do :
8222 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8223#ifdef STDC_HEADERS
8224# include <stdlib.h>
8225# include <stddef.h>
8226#else
8227# ifdef HAVE_STDLIB_H
8228# include <stdlib.h>
8229# endif
8230#endif
8231#ifdef HAVE_SYS_SOCKET_H
8232# include <sys/socket.h>
8233#endif
8234
8235"
Victor Stinnere0be4232011-10-25 13:06:09 +02008236if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008237 cat >>confdefs.h <<_ACEOF
8238#define HAVE_NET_IF_H 1
8239_ACEOF
8240
8241fi
8242
8243done
8244
8245
Martin v. Löwis11017b12006-01-14 18:12:57 +00008246# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008247for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008248do :
8249 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 +00008250#ifdef HAVE_ASM_TYPES_H
8251#include <asm/types.h>
8252#endif
8253#ifdef HAVE_SYS_SOCKET_H
8254#include <sys/socket.h>
8255#endif
8256
Matthias Kloseb9621712010-04-24 17:59:49 +00008257"
Victor Stinnere0be4232011-10-25 13:06:09 +02008258if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008259 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008260#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008261_ACEOF
8262
8263fi
8264
8265done
8266
8267
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008268# On Linux, qrtr.h requires asm/types.h
8269for ac_header in linux/qrtr.h
8270do :
8271 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8272#ifdef HAVE_ASM_TYPES_H
8273#include <asm/types.h>
8274#endif
8275#ifdef HAVE_SYS_SOCKET_H
8276#include <sys/socket.h>
8277#endif
8278
8279"
8280if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8281 cat >>confdefs.h <<_ACEOF
8282#define HAVE_LINUX_QRTR_H 1
8283_ACEOF
8284
8285fi
8286
8287done
8288
8289
caaveryeffc12f2017-09-06 18:18:10 -04008290for ac_header in linux/vm_sockets.h
8291do :
8292 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8293#ifdef HAVE_SYS_SOCKET_H
8294#include <sys/socket.h>
8295#endif
8296
8297"
8298if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8299 cat >>confdefs.h <<_ACEOF
8300#define HAVE_LINUX_VM_SOCKETS_H 1
8301_ACEOF
8302
8303fi
8304
8305done
8306
8307
karl ding360371f2020-04-29 15:31:19 -07008308# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8309for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008310do :
8311 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8312ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8313#ifdef HAVE_SYS_SOCKET_H
8314#include <sys/socket.h>
8315#endif
8316
8317"
8318if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8319 cat >>confdefs.h <<_ACEOF
8320#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8321_ACEOF
8322
8323fi
8324
8325done
8326
8327
Guido van Rossum627b2d71993-12-24 10:39:16 +00008328# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008329was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8331$as_echo_n "checking for clock_t in time.h... " >&6; }
8332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008333/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008334#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008335
8336_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008339 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008340else
Martin v. Löwis11437992002-04-12 09:54:03 +00008341
8342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008344
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008345
Guido van Rossum627b2d71993-12-24 10:39:16 +00008346fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008347rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8350$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8353$as_echo_n "checking for makedev... " >&6; }
8354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008355/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008356
Jesus Cea740f53a2010-04-28 11:35:30 +00008357#if defined(MAJOR_IN_MKDEV)
8358#include <sys/mkdev.h>
8359#elif defined(MAJOR_IN_SYSMACROS)
8360#include <sys/sysmacros.h>
8361#else
8362#include <sys/types.h>
8363#endif
8364
Neal Norwitz11690112002-07-30 01:08:28 +00008365int
8366main ()
8367{
Jesus Cea740f53a2010-04-28 11:35:30 +00008368
8369 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008370 ;
8371 return 0;
8372}
Matthias Kloseb159a552010-04-25 21:00:44 +00008373
Neal Norwitz11690112002-07-30 01:08:28 +00008374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008375if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008376 ac_cv_has_makedev=yes
8377else
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008380rm -f core conftest.err conftest.$ac_objext \
8381 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8383$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008384if test "$ac_cv_has_makedev" = "yes"; then
8385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008387
8388fi
8389
Christian Heimes985ecdc2013-11-20 11:46:18 +01008390# byte swapping
8391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8392$as_echo_n "checking for le64toh... " >&6; }
8393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8394/* end confdefs.h. */
8395
8396#ifdef HAVE_ENDIAN_H
8397#include <endian.h>
8398#elif defined(HAVE_SYS_ENDIAN_H)
8399#include <sys/endian.h>
8400#endif
8401
8402int
8403main ()
8404{
8405
8406 le64toh(1)
8407 ;
8408 return 0;
8409}
8410
8411_ACEOF
8412if ac_fn_c_try_link "$LINENO"; then :
8413 ac_cv_has_le64toh=yes
8414else
8415 ac_cv_has_le64toh=no
8416fi
8417rm -f core conftest.err conftest.$ac_objext \
8418 conftest$ac_exeext conftest.$ac_ext
8419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8420$as_echo "$ac_cv_has_le64toh" >&6; }
8421if test "$ac_cv_has_le64toh" = "yes"; then
8422
8423$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8424
8425fi
8426
Martin v. Löwis399a6892002-10-04 10:22:02 +00008427use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008428# Don't use largefile support for GNU/Hurd
8429case $ac_sys_system in GNU*)
8430 use_lfs=no
8431esac
8432
Martin v. Löwis399a6892002-10-04 10:22:02 +00008433if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008434# Two defines needed to enable largefile support on various platforms
8435# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008436case $ac_sys_system/$ac_sys_release in
8437AIX*)
8438
8439$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8440
8441 ;;
8442esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008443
Matthias Kloseb9621712010-04-24 17:59:49 +00008444$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008445
8446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008448
Martin v. Löwis399a6892002-10-04 10:22:02 +00008449fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008450
Guido van Rossum84e7b241996-08-19 21:59:00 +00008451# Add some code to confdefs.h so that the test for off_t works on SCO
8452cat >> confdefs.h <<\EOF
8453#if defined(SCO_DS)
8454#undef _OFF_T
8455#endif
8456EOF
8457
Guido van Rossumef2255b2000-03-10 22:30:29 +00008458# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008459ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008460if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008462else
Martin v. Löwis11437992002-04-12 09:54:03 +00008463
8464cat >>confdefs.h <<_ACEOF
8465#define mode_t int
8466_ACEOF
8467
8468fi
8469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008471if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008472
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008473else
Martin v. Löwis11437992002-04-12 09:54:03 +00008474
8475cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008477_ACEOF
8478
8479fi
8480
Matthias Kloseb9621712010-04-24 17:59:49 +00008481ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008482if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008483
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008484else
Martin v. Löwis11437992002-04-12 09:54:03 +00008485
8486cat >>confdefs.h <<_ACEOF
8487#define pid_t int
8488_ACEOF
8489
8490fi
8491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008492
Martin v. Löwis11437992002-04-12 09:54:03 +00008493cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008494#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008495_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008496
Matthias Kloseb9621712010-04-24 17:59:49 +00008497ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008498if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008500else
Martin v. Löwis11437992002-04-12 09:54:03 +00008501
8502cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008504_ACEOF
8505
8506fi
8507
Matthias Kloseb9621712010-04-24 17:59:49 +00008508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8509$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008510if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008512else
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008515#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008516
8517_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008520 ac_cv_type_uid_t=yes
8521else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008522 ac_cv_type_uid_t=no
8523fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008524rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008525
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8528$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008529if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008530
Matthias Kloseb9621712010-04-24 17:59:49 +00008531$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008532
8533
Matthias Kloseb9621712010-04-24 17:59:49 +00008534$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008535
8536fi
8537
Mark Dickinson983bc162012-12-02 12:11:38 +00008538
Matthias Kloseb9621712010-04-24 17:59:49 +00008539ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008540if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541
Matthias Kloseb9621712010-04-24 17:59:49 +00008542$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008543
8544fi
8545
Stefan Krah1919b7e2012-03-21 18:25:23 +01008546ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8547if test "x$ac_cv_type___uint128_t" = xyes; then :
8548
8549$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8550
8551fi
8552
Jack Jansendd19cf82001-12-06 22:36:17 +00008553
Michael W. Hudson54241132001-12-07 15:38:26 +00008554# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008555# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556# The cast to long int works around a bug in the HP C Compiler
8557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8559# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8561$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008562if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 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 +00008566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 if test "$ac_cv_type_int" = yes; then
8569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008571as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008572See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 else
8574 ac_cv_sizeof_int=0
8575 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577
Martin v. Löwis11437992002-04-12 09:54:03 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8580$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581
8582
8583
Martin v. Löwis11437992002-04-12 09:54:03 +00008584cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008585#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008586_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008587
8588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8594$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 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 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 if test "$ac_cv_type_long" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008604as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008605See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 else
8607 ac_cv_sizeof_long=0
8608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8613$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614
8615
8616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008618#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008620
8621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8627$as_echo_n "checking size of long long... " >&6; }
8628if ${ac_cv_sizeof_long_long+:} false; then :
8629 $as_echo_n "(cached) " >&6
8630else
8631 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8632
8633else
8634 if test "$ac_cv_type_long_long" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8637as_fn_error 77 "cannot compute sizeof (long long)
8638See \`config.log' for more details" "$LINENO" 5; }
8639 else
8640 ac_cv_sizeof_long_long=0
8641 fi
8642fi
8643
8644fi
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8646$as_echo "$ac_cv_sizeof_long_long" >&6; }
8647
8648
8649
8650cat >>confdefs.h <<_ACEOF
8651#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8652_ACEOF
8653
8654
8655# The cast to long int works around a bug in the HP C Compiler
8656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8658# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8660$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008661if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008663else
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 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 +00008665
Martin v. Löwis11437992002-04-12 09:54:03 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 if test "$ac_cv_type_void_p" = yes; then
8668 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008670as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008671See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008672 else
8673 ac_cv_sizeof_void_p=0
8674 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8679$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680
8681
8682
Martin v. Löwis11437992002-04-12 09:54:03 +00008683cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008684#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008685_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008686
8687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688# The cast to long int works around a bug in the HP C Compiler
8689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8691# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8693$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008694if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008696else
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 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 +00008698
Martin v. Löwis11437992002-04-12 09:54:03 +00008699else
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 if test "$ac_cv_type_short" = yes; then
8701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008703as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008704See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705 else
8706 ac_cv_sizeof_short=0
8707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8712$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713
8714
8715
Martin v. Löwis11437992002-04-12 09:54:03 +00008716cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008717#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008718_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008719
8720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721# The cast to long int works around a bug in the HP C Compiler
8722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8726$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008727if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008729else
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 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 +00008731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732else
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 if test "$ac_cv_type_float" = yes; then
8734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008736as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008737See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738 else
8739 ac_cv_sizeof_float=0
8740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8745$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746
8747
8748
Martin v. Löwis11437992002-04-12 09:54:03 +00008749cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008750#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008751_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008752
8753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754# The cast to long int works around a bug in the HP C Compiler
8755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8759$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008760if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 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 +00008764
Martin v. Löwis11437992002-04-12 09:54:03 +00008765else
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 if test "$ac_cv_type_double" = yes; then
8767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008769as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008770See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771 else
8772 ac_cv_sizeof_double=0
8773 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775
Martin v. Löwis11437992002-04-12 09:54:03 +00008776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8778$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779
8780
8781
Martin v. Löwis11437992002-04-12 09:54:03 +00008782cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008783#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008784_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008785
8786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787# The cast to long int works around a bug in the HP C Compiler
8788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8790# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8792$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008793if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008795else
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 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 +00008797
Martin v. Löwis11437992002-04-12 09:54:03 +00008798else
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 if test "$ac_cv_type_fpos_t" = yes; then
8800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008802as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008803See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008804 else
8805 ac_cv_sizeof_fpos_t=0
8806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008808
Martin v. Löwis11437992002-04-12 09:54:03 +00008809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8811$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812
8813
8814
Martin v. Löwis11437992002-04-12 09:54:03 +00008815cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008816#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008817_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008818
Michael W. Hudson54241132001-12-07 15:38:26 +00008819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820# The cast to long int works around a bug in the HP C Compiler
8821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8823# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8825$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008826if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008828else
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 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 +00008830
Martin v. Löwis18e16552006-02-15 17:27:45 +00008831else
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 if test "$ac_cv_type_size_t" = yes; then
8833 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8834$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008835as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008836See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008837 else
8838 ac_cv_sizeof_size_t=0
8839 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841
Martin v. Löwis18e16552006-02-15 17:27:45 +00008842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8844$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845
8846
8847
Martin v. Löwis18e16552006-02-15 17:27:45 +00008848cat >>confdefs.h <<_ACEOF
8849#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8850_ACEOF
8851
8852
Christian Heimes400adb02008-02-01 08:12:03 +00008853# The cast to long int works around a bug in the HP C Compiler
8854# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8855# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8856# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8858$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008859if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008861else
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 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 +00008863
Christian Heimes400adb02008-02-01 08:12:03 +00008864else
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 if test "$ac_cv_type_pid_t" = yes; then
8866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008868as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008869See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008870 else
8871 ac_cv_sizeof_pid_t=0
8872 fi
8873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008874
Christian Heimes400adb02008-02-01 08:12:03 +00008875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8877$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008878
8879
8880
8881cat >>confdefs.h <<_ACEOF
8882#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8883_ACEOF
8884
8885
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008886# The cast to long int works around a bug in the HP C Compiler
8887# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8888# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8889# This bug is HP SR number 8606223364.
8890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8891$as_echo_n "checking size of uintptr_t... " >&6; }
8892if ${ac_cv_sizeof_uintptr_t+:} false; then :
8893 $as_echo_n "(cached) " >&6
8894else
8895 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8896
8897else
8898 if test "$ac_cv_type_uintptr_t" = yes; then
8899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8901as_fn_error 77 "cannot compute sizeof (uintptr_t)
8902See \`config.log' for more details" "$LINENO" 5; }
8903 else
8904 ac_cv_sizeof_uintptr_t=0
8905 fi
8906fi
8907
8908fi
8909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8910$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8911
8912
8913
8914cat >>confdefs.h <<_ACEOF
8915#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8916_ACEOF
8917
8918
Michael W. Hudson54241132001-12-07 15:38:26 +00008919
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008920
Eitan Adler3055c942018-05-15 22:58:09 -07008921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8922$as_echo_n "checking for long double... " >&6; }
8923if ${ac_cv_type_long_double+:} false; then :
8924 $as_echo_n "(cached) " >&6
8925else
8926 if test "$GCC" = yes; then
8927 ac_cv_type_long_double=yes
8928 else
8929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8930/* end confdefs.h. */
8931/* The Stardent Vistra knows sizeof (long double), but does
8932 not support it. */
8933 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008934int
8935main ()
8936{
Eitan Adler3055c942018-05-15 22:58:09 -07008937static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8938 sizeof (double) <= sizeof (long double))];
8939test_array [0] = 0;
8940return test_array [0];
8941
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008942 ;
8943 return 0;
8944}
8945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008946if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008947 ac_cv_type_long_double=yes
8948else
8949 ac_cv_type_long_double=no
8950fi
8951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8952 fi
8953fi
8954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8955$as_echo "$ac_cv_type_long_double" >&6; }
8956 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008957
Matthias Kloseb9621712010-04-24 17:59:49 +00008958$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008959
Eitan Adler3055c942018-05-15 22:58:09 -07008960 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008961
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008962# The cast to long int works around a bug in the HP C Compiler
8963# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8964# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8965# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8967$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008968if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008970else
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 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 +00008972
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008973else
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 if test "$ac_cv_type_long_double" = yes; then
8975 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008977as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008978See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008979 else
8980 ac_cv_sizeof_long_double=0
8981 fi
8982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008983
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8986$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008987
8988
8989
8990cat >>confdefs.h <<_ACEOF
8991#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8992_ACEOF
8993
8994
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996# The cast to long int works around a bug in the HP C Compiler
8997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8999# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9001$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009002if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00009004else
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 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 +00009006
Thomas Woutersb2137042007-02-01 18:02:27 +00009007else
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 if test "$ac_cv_type__Bool" = yes; then
9009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009011as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009012See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013 else
9014 ac_cv_sizeof__Bool=0
9015 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009017
Thomas Woutersb2137042007-02-01 18:02:27 +00009018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9020$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021
9022
9023
Thomas Woutersb2137042007-02-01 18:02:27 +00009024cat >>confdefs.h <<_ACEOF
9025#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9026_ACEOF
9027
9028
Thomas Woutersb2137042007-02-01 18:02:27 +00009029
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009030# The cast to long int works around a bug in the HP C Compiler
9031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9033# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9035$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009036if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038else
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009040#ifdef HAVE_SYS_TYPES_H
9041#include <sys/types.h>
9042#endif
9043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046else
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 if test "$ac_cv_type_off_t" = yes; then
9048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009050as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009051See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009052 else
9053 ac_cv_sizeof_off_t=0
9054 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009056
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9059$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009060
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009061
9062
Martin v. Löwis11437992002-04-12 09:54:03 +00009063cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009064#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009065_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009066
Michael W. Hudson54241132001-12-07 15:38:26 +00009067
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068
Matthias Kloseb9621712010-04-24 17:59:49 +00009069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9070$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009071if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009072 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009075
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9077$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009078else
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009081fi
9082
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009083# The cast to long int works around a bug in the HP C Compiler
9084# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9085# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9086# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9088$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009089if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009091else
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009093#ifdef HAVE_SYS_TYPES_H
9094#include <sys/types.h>
9095#endif
9096#ifdef HAVE_TIME_H
9097#include <time.h>
9098#endif
9099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009102else
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 if test "$ac_cv_type_time_t" = yes; then
9104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009106as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009107See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108 else
9109 ac_cv_sizeof_time_t=0
9110 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009112
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9115$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009117
9118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009120#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009121_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009122
Michael W. Hudson54241132001-12-07 15:38:26 +00009123
9124
Trent Mick635f6fb2000-08-23 21:33:05 +00009125# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009126ac_save_cc="$CC"
9127if test "$ac_cv_kpthread" = "yes"
9128then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009129elif test "$ac_cv_kthread" = "yes"
9130then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009131elif test "$ac_cv_pthread" = "yes"
9132then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009133fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9136$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009137have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009139/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009140
9141 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009142int
9143main ()
9144{
Guido van Rossum12580492000-09-24 16:47:19 +00009145pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 ;
9147 return 0;
9148}
Matthias Kloseb159a552010-04-25 21:00:44 +00009149
Martin v. Löwis11437992002-04-12 09:54:03 +00009150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009151if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009152 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9156$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009157if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009159# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9160# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9161# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9163$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009164if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009165 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009166else
Matthias Kloseb9621712010-04-24 17:59:49 +00009167 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009168#ifdef HAVE_PTHREAD_H
9169#include <pthread.h>
9170#endif
9171
Matthias Kloseb9621712010-04-24 17:59:49 +00009172"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009174else
Matthias Kloseb9621712010-04-24 17:59:49 +00009175 if test "$ac_cv_type_pthread_t" = yes; then
9176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009178as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009179See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009180 else
9181 ac_cv_sizeof_pthread_t=0
9182 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009184
Trent Mick635f6fb2000-08-23 21:33:05 +00009185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9187$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009188
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009189
9190
Martin v. Löwis11437992002-04-12 09:54:03 +00009191cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009192#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009193_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009194
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009195
Trent Mick635f6fb2000-08-23 21:33:05 +00009196fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009197
9198# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9199# This checking will be unnecessary after removing deprecated TLS API.
9200# The cast to long int works around a bug in the HP C Compiler
9201# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9202# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9203# This bug is HP SR number 8606223364.
9204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9205$as_echo_n "checking size of pthread_key_t... " >&6; }
9206if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9207 $as_echo_n "(cached) " >&6
9208else
9209 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9210"; then :
9211
9212else
9213 if test "$ac_cv_type_pthread_key_t" = yes; then
9214 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9216as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9217See \`config.log' for more details" "$LINENO" 5; }
9218 else
9219 ac_cv_sizeof_pthread_key_t=0
9220 fi
9221fi
9222
9223fi
9224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9225$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9226
9227
9228
9229cat >>confdefs.h <<_ACEOF
9230#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9231_ACEOF
9232
9233
9234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9235$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9236if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9238/* end confdefs.h. */
9239#include <pthread.h>
9240int
9241main ()
9242{
9243pthread_key_t k; k * 1;
9244 ;
9245 return 0;
9246}
9247_ACEOF
9248if ac_fn_c_try_compile "$LINENO"; then :
9249 ac_pthread_key_t_is_arithmetic_type=yes
9250else
9251 ac_pthread_key_t_is_arithmetic_type=no
9252
9253fi
9254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9256$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9257 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9258
9259$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9260
9261 fi
9262else
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9264$as_echo "no" >&6; }
9265fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009266CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009267
Michael W. Hudson54241132001-12-07 15:38:26 +00009268
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009269case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009270 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009271 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9272 ;;
9273 Darwin/*)
9274 OTHER_LIBTOOL_OPT=""
9275 ;;
9276esac
9277
9278
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009279
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009280case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009281 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009282 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9283 if test "${enable_universalsdk}"; then
9284 :
9285 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009286 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009287 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009290 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009291 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009292 if test ${gcc_version} '<' 4.0
9293 then
9294 LIBTOOL_CRUFT="-lcc_dynamic"
9295 else
9296 LIBTOOL_CRUFT=""
9297 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009298 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009299 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009300else
Matthias Kloseb9621712010-04-24 17:59:49 +00009301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009302/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009303
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009304 #include <unistd.h>
9305 int main(int argc, char*argv[])
9306 {
9307 if (sizeof(long) == 4) {
9308 return 0;
9309 } else {
9310 return 1;
9311 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009312 }
9313
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009315if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009316 ac_osx_32bit=yes
9317else
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9321 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009322fi
9323
9324
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009325 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009326 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009327 i386)
9328 MACOSX_DEFAULT_ARCH="i386"
9329 ;;
9330 ppc)
9331 MACOSX_DEFAULT_ARCH="ppc"
9332 ;;
9333 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009334 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009335 ;;
9336 esac
9337 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009338 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009339 i386)
9340 MACOSX_DEFAULT_ARCH="x86_64"
9341 ;;
9342 ppc)
9343 MACOSX_DEFAULT_ARCH="ppc64"
9344 ;;
9345 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009346 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009347 ;;
9348 esac
9349
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009350 fi
9351
9352 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009353 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009354 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009355esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9357$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009358if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009359then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009360 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009362 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009363
Matthias Kloseb9621712010-04-24 17:59:49 +00009364$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009365
Matthias Kloseb9621712010-04-24 17:59:49 +00009366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9367$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009368 if test $enable_shared = "yes"
9369 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009370 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 +00009371 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009372else
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9374$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009375fi
9376
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9378$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009379case $ac_sys_system/$ac_sys_release in
9380 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009381
Matthias Kloseb9621712010-04-24 17:59:49 +00009382$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009383
Matthias Kloseb9621712010-04-24 17:59:49 +00009384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9385$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009386 ;;
9387 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9389$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009390 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009391esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009392
Guido van Rossum0a516c91994-09-12 10:58:40 +00009393# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009394
Michael W. Hudson54241132001-12-07 15:38:26 +00009395
9396
9397
9398
Benjamin Peterson99f03762010-04-11 22:15:28 +00009399
Thomas Wouters477c8d52006-05-27 19:21:47 +00009400
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009401# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9402# -- usually .so, .sl on HP-UX, .dll on Cygwin
9403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9404$as_echo_n "checking the extension of shared libraries... " >&6; }
9405if test -z "$SHLIB_SUFFIX"; then
9406 case $ac_sys_system in
9407 hp*|HP*)
9408 case `uname -m` in
9409 ia64) SHLIB_SUFFIX=.so;;
9410 *) SHLIB_SUFFIX=.sl;;
9411 esac
9412 ;;
9413 CYGWIN*) SHLIB_SUFFIX=.dll;;
9414 *) SHLIB_SUFFIX=.so;;
9415 esac
9416fi
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9418$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009419
Guido van Rossum0a516c91994-09-12 10:58:40 +00009420# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009421# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009422# (Shared libraries in this instance are shared modules to be loaded into
9423# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9425$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009426if test -z "$LDSHARED"
9427then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009428 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009429 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009430 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009431 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009432 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009434 if test "$GCC" = "yes" ; then
9435 LDSHARED='$(CC) -shared'
9436 LDCXXSHARED='$(CXX) -shared'
9437 else
9438 LDSHARED='$(CC) -G'
9439 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009440 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009441 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009442 if test "$GCC" = "yes" ; then
9443 LDSHARED='$(CC) -shared'
9444 LDCXXSHARED='$(CXX) -shared'
9445 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009446 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009447 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009448 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009449 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009450 LDSHARED='$(CC) -bundle'
9451 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009452 if test "$enable_framework" ; then
9453 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009454 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9455 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009456 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009457 else
9458 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009459 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009460 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009461 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009462 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009463 LDSHARED='$(CC) -bundle'
9464 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009465 if test "$enable_framework" ; then
9466 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009467 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9468 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009469 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009470 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009471 # No framework, use the Python app as bundle-loader
9472 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009473 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009474 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009475 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009476 Darwin/*)
9477 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9478 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009479
Ned Deily36820b62014-06-25 13:44:22 -07009480 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9481 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9482 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9483 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9484 if test ${dep_target_major} -eq 10 && \
9485 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009486 then
Ned Deily36820b62014-06-25 13:44:22 -07009487 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009488 LDSHARED='$(CC) -bundle'
9489 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009490 if test "$enable_framework" ; then
9491 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009492 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9493 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009494 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009495 else
9496 # No framework, use the Python app as bundle-loader
9497 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9498 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009499 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009500 fi
Ned Deily36820b62014-06-25 13:44:22 -07009501 else
9502 # building for OS X 10.3 and later
9503 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9504 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9505 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009506 fi
9507 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009508 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009509 LDSHARED='$(CC) -shared'
9510 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009511 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009512 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009513 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009514 LDSHARED='$(CC) -shared'
9515 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009516 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009517 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009518 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009519 OpenBSD*)
9520 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9521 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009522 LDSHARED='$(CC) -shared $(CCSHARED)'
9523 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009524 else
9525 case `uname -r` in
9526 [01].* | 2.[0-7] | 2.[0-7].*)
9527 LDSHARED="ld -Bshareable ${LDFLAGS}"
9528 ;;
9529 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009530 LDSHARED='$(CC) -shared $(CCSHARED)'
9531 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009532 ;;
9533 esac
9534 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009535 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009536 LDSHARED='$(CC) -shared'
9537 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009538 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009539 if test "$GCC" = "yes" ; then
9540 LDSHARED='$(CC) -shared'
9541 LDCXXSHARED='$(CXX) -shared'
9542 else
9543 LDSHARED='$(CC) -G'
9544 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009545 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009546 SCO_SV*)
9547 LDSHARED='$(CC) -Wl,-G,-Bexport'
9548 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9549 CYGWIN*)
9550 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9551 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009552 *) LDSHARED="ld";;
9553 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9556$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009557LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009558BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009559# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009560# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9562$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009563if test -z "$CCSHARED"
9564then
Guido van Rossum07397971997-04-29 21:49:50 +00009565 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009566 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009567 then CCSHARED="-fPIC";
9568 elif test `uname -p` = sparc;
9569 then CCSHARED="-xcode=pic32";
9570 else CCSHARED="-Kpic";
9571 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009572 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009573 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009574 else CCSHARED="+z";
9575 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009576 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009577 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009578 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009579 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009580 if test "$GCC" = "yes"
9581 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009582 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009583 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009584 SCO_SV*)
9585 if test "$GCC" = "yes"
9586 then CCSHARED="-fPIC"
9587 else CCSHARED="-Kpic -belf"
9588 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009589 VxWorks*)
9590 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009591 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9594$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009595# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009596# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9598$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009599if test -z "$LINKFORSHARED"
9600then
Guido van Rossum07397971997-04-29 21:49:50 +00009601 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009602 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009603 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009604 LINKFORSHARED="-Wl,-E -Wl,+s";;
9605# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009606 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009607 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009608 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009610 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009611
9612 # Issue #18075: the default maximum stack size (8MBytes) is too
9613 # small for the default recursion limit. Increase the stack size
9614 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009615 # Note: This matches the value of THREAD_STACK_SIZE in
9616 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009617 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9618
Jack Jansene578a632001-08-15 01:27:14 +00009619 if test "$enable_framework"
9620 then
Jack Jansenda49e192005-01-07 13:08:22 +00009621 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009622 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009623 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009624 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009625 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009626 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009627 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009628 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9629 then
9630 LINKFORSHARED="-Wl,--export-dynamic"
9631 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009632 SunOS/5*) case $CC in
9633 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009634 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009635 then
9636 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009637 fi;;
9638 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009639 CYGWIN*)
9640 if test $enable_shared = "no"
9641 then
9642 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9643 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009644 QNX*)
9645 # -Wl,-E causes the symbols to be added to the dynamic
9646 # symbol table so that they can be found when a module
9647 # is loaded. -N 2048K causes the stack size to be set
9648 # to 2048 kilobytes so that the stack doesn't overflow
9649 # when running test_compile.py.
9650 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009651 VxWorks*)
9652 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009653 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9656$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009657
Michael W. Hudson54241132001-12-07 15:38:26 +00009658
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009659
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9661$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009662if test ! "$LIBRARY" = "$LDLIBRARY"
9663then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009664 case $ac_sys_system in
9665 CYGWIN*)
9666 # Cygwin needs CCSHARED when building extension DLLs
9667 # but not when building the interpreter DLL.
9668 CFLAGSFORSHARED='';;
9669 *)
9670 CFLAGSFORSHARED='$(CCSHARED)'
9671 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9674$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009675
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009676# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9677# library (with --enable-shared).
9678# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009679# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9680# if it is not required, since it creates a dependency of the shared library
9681# to LIBS. This, in turn, means that applications linking the shared libpython
9682# don't need to link LIBS explicitly. The default should be only changed
9683# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009684
Matthias Kloseb9621712010-04-24 17:59:49 +00009685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9686$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009687case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009688 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009689 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009690esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9692$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009693
9694
Guido van Rossum627b2d71993-12-24 10:39:16 +00009695# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9697$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009698if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009699 $as_echo_n "(cached) " >&6
9700else
9701 ac_check_lib_save_LIBS=$LIBS
9702LIBS="-lsendfile $LIBS"
9703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9704/* end confdefs.h. */
9705
9706/* Override any GCC internal prototype to avoid an error.
9707 Use char because int might match the return type of a GCC
9708 builtin and then its argument prototype would still apply. */
9709#ifdef __cplusplus
9710extern "C"
9711#endif
9712char sendfile ();
9713int
9714main ()
9715{
9716return sendfile ();
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721if ac_fn_c_try_link "$LINENO"; then :
9722 ac_cv_lib_sendfile_sendfile=yes
9723else
9724 ac_cv_lib_sendfile_sendfile=no
9725fi
9726rm -f core conftest.err conftest.$ac_objext \
9727 conftest$ac_exeext conftest.$ac_ext
9728LIBS=$ac_check_lib_save_LIBS
9729fi
9730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9731$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009732if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009733 cat >>confdefs.h <<_ACEOF
9734#define HAVE_LIBSENDFILE 1
9735_ACEOF
9736
9737 LIBS="-lsendfile $LIBS"
9738
9739fi
9740
Matthias Kloseb9621712010-04-24 17:59:49 +00009741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9742$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009743if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009745else
Martin v. Löwis11437992002-04-12 09:54:03 +00009746 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009747LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009751/* Override any GCC internal prototype to avoid an error.
9752 Use char because int might match the return type of a GCC
9753 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009754#ifdef __cplusplus
9755extern "C"
9756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009757char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009758int
9759main ()
9760{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 ;
9763 return 0;
9764}
9765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009766if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009768else
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009771rm -f core conftest.err conftest.$ac_objext \
9772 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009773LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9776$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009777if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 cat >>confdefs.h <<_ACEOF
9779#define HAVE_LIBDL 1
9780_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009781
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009782 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009783
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009784fi
9785 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9787$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009788if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009790else
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009792LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796/* Override any GCC internal prototype to avoid an error.
9797 Use char because int might match the return type of a GCC
9798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009799#ifdef __cplusplus
9800extern "C"
9801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009802char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
9805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 ;
9808 return 0;
9809}
9810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009813else
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009816rm -f core conftest.err conftest.$ac_objext \
9817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009818LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9821$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009822if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 cat >>confdefs.h <<_ACEOF
9824#define HAVE_LIBDLD 1
9825_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009826
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009827 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009828
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009829fi
9830 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009831
Michael Felt0d3ccb42017-12-30 22:39:20 +01009832# checks for uuid.h location
9833for ac_header in uuid/uuid.h uuid.h
9834do :
9835 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9836ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9837if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9838 cat >>confdefs.h <<_ACEOF
9839#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9840_ACEOF
9841
9842fi
9843
9844done
9845
9846
Berker Peksag9a10ff42017-11-08 23:09:16 +03009847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9848$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9850/* end confdefs.h. */
9851#include <uuid/uuid.h>
9852int
9853main ()
9854{
9855
9856#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009857void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009858#endif
9859
9860 ;
9861 return 0;
9862}
9863_ACEOF
9864if ac_fn_c_try_compile "$LINENO"; then :
9865
9866$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9867
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9869$as_echo "yes" >&6; }
9870else
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9872$as_echo "no" >&6; }
9873
9874fi
9875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9876
Michael Felt0d3ccb42017-12-30 22:39:20 +01009877# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009878# FreeBSD and OpenBSD provides support as well
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9880$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9882/* end confdefs.h. */
9883#include <uuid.h>
9884int
9885main ()
9886{
9887
9888#ifndef uuid_create
9889void *x = uuid_create
9890#endif
9891
9892 ;
9893 return 0;
9894}
9895_ACEOF
9896if ac_fn_c_try_compile "$LINENO"; then :
9897
9898$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9899
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9901$as_echo "yes" >&6; }
9902else
9903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904$as_echo "no" >&6; }
9905
9906fi
9907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9908
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009909# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9910# stream in big-endian byte-order
9911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9912$as_echo_n "checking for uuid_enc_be... " >&6; }
9913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9914/* end confdefs.h. */
9915#include <uuid.h>
9916int
9917main ()
9918{
9919
9920#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009921void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009922#endif
9923
9924 ;
9925 return 0;
9926}
9927_ACEOF
9928if ac_fn_c_try_compile "$LINENO"; then :
9929
9930$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9931
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9933$as_echo "yes" >&6; }
9934else
9935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9936$as_echo "no" >&6; }
9937
9938fi
9939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9940
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009941# 'Real Time' functions on Solaris
9942# posix4 on Solaris 2.6
9943# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009945$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009946if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009948else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009949 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953/* Override any GCC internal prototype to avoid an error.
9954 Use char because int might match the return type of a GCC
9955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009956#ifdef __cplusplus
9957extern "C"
9958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009959char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009960int
9961main ()
9962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009963return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009964 ;
9965 return 0;
9966}
9967_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968for ac_lib in '' pthread rt posix4; do
9969 if test -z "$ac_lib"; then
9970 ac_res="none required"
9971 else
9972 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009973 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009974 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009976 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009978rm -f core conftest.err conftest.$ac_objext \
9979 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009980 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009983done
Victor Stinnere0be4232011-10-25 13:06:09 +02009984if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986else
9987 ac_cv_search_sem_init=no
9988fi
9989rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009990LIBS=$ac_func_search_save_LIBS
9991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9993$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009995if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009997
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009998fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009999
Martin v. Löwis519adae2003-09-20 10:47:47 +000010000
Martin v. Löwis19d17342003-06-14 21:03:05 +000010001# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +000010002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10003$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010004if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000010006else
10007 ac_check_lib_save_LIBS=$LIBS
10008LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010010/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012/* Override any GCC internal prototype to avoid an error.
10013 Use char because int might match the return type of a GCC
10014 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010015#ifdef __cplusplus
10016extern "C"
10017#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010018char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010019int
10020main ()
10021{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010023 ;
10024 return 0;
10025}
10026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010027if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010028 ac_cv_lib_intl_textdomain=yes
10029else
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010032rm -f core conftest.err conftest.$ac_objext \
10033 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010034LIBS=$ac_check_lib_save_LIBS
10035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10037$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010038if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010039
Matthias Kloseb9621712010-04-24 17:59:49 +000010040$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010041
Brett Cannonc6d936e2009-06-07 20:09:53 +000010042 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010043fi
10044
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010045
10046# checks for system dependent C++ extensions support
10047case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10049$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010052
Georg Brandl59e87bd2011-02-15 19:48:59 +000010053 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010054int
10055main ()
10056{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010057loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010058 ;
10059 return 0;
10060}
Matthias Kloseb159a552010-04-25 21:00:44 +000010061
Martin v. Löwis11437992002-04-12 09:54:03 +000010062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010063if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010064
Matthias Kloseb159a552010-04-25 21:00:44 +000010065
Matthias Kloseb9621712010-04-24 17:59:49 +000010066$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010067
Matthias Kloseb159a552010-04-25 21:00:44 +000010068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010069$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010070
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010071else
Matthias Kloseb159a552010-04-25 21:00:44 +000010072
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010074$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010075
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010077rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010078 conftest$ac_exeext conftest.$ac_ext
10079# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10080# of the AIX system used to build/package Python executable. This tag serves
10081# as a baseline for bdist module packages
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10083$as_echo_n "checking for the system builddate... " >&6; }
10084 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10085
10086cat >>confdefs.h <<_ACEOF
10087#define AIX_BUILDDATE $AIX_BUILDDATE
10088_ACEOF
10089
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10091$as_echo "$AIX_BUILDDATE" >&6; }
10092 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010093 *) ;;
10094esac
10095
Christian Heimes985ecdc2013-11-20 11:46:18 +010010096# check for systems that require aligned memory access
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10098$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010099if ${ac_cv_aligned_required+:} false; then :
10100 $as_echo_n "(cached) " >&6
10101else
10102 if test "$cross_compiling" = yes; then :
10103 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010104else
10105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10106/* end confdefs.h. */
10107
10108int main()
10109{
10110 char s[16];
10111 int i, *p1, *p2;
10112 for (i=0; i < 16; i++)
10113 s[i] = i;
10114 p1 = (int*)(s+1);
10115 p2 = (int*)(s+2);
10116 if (*p1 == *p2)
10117 return 1;
10118 return 0;
10119}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010120_ACEOF
10121if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010122 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010123else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010124 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010125fi
10126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10127 conftest.$ac_objext conftest.beam conftest.$ac_ext
10128fi
10129
10130
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010131fi
10132
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10134$as_echo "$ac_cv_aligned_required" >&6; }
10135if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010136
10137$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10138
10139fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010140
10141# str, bytes and memoryview hash algorithm
10142
10143
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10145$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10146
10147# Check whether --with-hash_algorithm was given.
10148if test "${with_hash_algorithm+set}" = set; then :
10149 withval=$with_hash_algorithm;
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10151$as_echo "$withval" >&6; }
10152case "$withval" in
10153 siphash24)
10154 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10155
10156 ;;
10157 fnv)
10158 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10159
10160 ;;
10161 *)
10162 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10163 ;;
10164esac
10165
10166else
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10168$as_echo "default" >&6; }
10169fi
10170
10171
Paul Ganssle62972d92020-05-16 04:20:06 -040010172validate_tzpath() {
10173 # Checks that each element of hte path is an absolute path
10174 if test -z "$1"; then
10175 # Empty string is allowed: it indicates no system TZPATH
10176 return 0
10177 fi
10178
10179 # Bad paths are those that don't start with /
10180 if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
10181 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10182 return 1;
10183 fi
10184}
10185
10186TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10188$as_echo_n "checking for --with-tzpath... " >&6; }
10189
10190# Check whether --with-tzpath was given.
10191if test "${with_tzpath+set}" = set; then :
10192 withval=$with_tzpath;
10193case "$withval" in
10194 yes)
10195 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10196 ;;
10197 *)
10198 validate_tzpath "$withval"
10199 TZPATH="$withval"
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10201$as_echo "\"$withval\"" >&6; }
10202 ;;
10203esac
10204
10205else
10206 validate_tzpath "$TZPATH"
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10208$as_echo "\"$TZPATH\"" >&6; }
10209fi
10210
10211
10212
Charles-François Natalid30b0222014-05-08 23:08:51 +010010213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10214$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10215
10216# Check whether --with-address_sanitizer was given.
10217if test "${with_address_sanitizer+set}" = set; then :
10218 withval=$with_address_sanitizer;
10219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10220$as_echo "$withval" >&6; }
10221BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10222LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010223# ASan works by controlling memory allocation, our own malloc interferes.
10224with_pymalloc="no"
10225
10226else
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10228$as_echo "no" >&6; }
10229fi
10230
10231
10232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10233$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10234
10235# Check whether --with-memory_sanitizer was given.
10236if test "${with_memory_sanitizer+set}" = set; then :
10237 withval=$with_memory_sanitizer;
10238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10239$as_echo "$withval" >&6; }
10240BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10241LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10242# MSan works by controlling memory allocation, our own malloc interferes.
10243with_pymalloc="no"
10244
10245else
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10247$as_echo "no" >&6; }
10248fi
10249
10250
10251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10252$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10253
10254# Check whether --with-undefined_behavior_sanitizer was given.
10255if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10256 withval=$with_undefined_behavior_sanitizer;
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10258$as_echo "$withval" >&6; }
10259BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10260LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010261
10262else
10263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10264$as_echo "no" >&6; }
10265fi
10266
10267
Guido van Rossum70c7f481998-03-26 18:44:10 +000010268# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10270$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010271if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010273else
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010275LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279/* Override any GCC internal prototype to avoid an error.
10280 Use char because int might match the return type of a GCC
10281 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010282#ifdef __cplusplus
10283extern "C"
10284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010285char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010286int
10287main ()
10288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 ;
10291 return 0;
10292}
10293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010294if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010296else
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010299rm -f core conftest.err conftest.$ac_objext \
10300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010301LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10304$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010305if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010306 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010307fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010308 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10310$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010311if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010313else
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010315LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319/* Override any GCC internal prototype to avoid an error.
10320 Use char because int might match the return type of a GCC
10321 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010322#ifdef __cplusplus
10323extern "C"
10324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010325char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010326int
10327main ()
10328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ;
10331 return 0;
10332}
10333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010334if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010336else
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010339rm -f core conftest.err conftest.$ac_objext \
10340 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010341LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10344$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010345if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010346 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010347fi
10348 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10351$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010354if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10357$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010358LIBS="$withval $LIBS"
10359
10360else
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10362$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363fi
10364
Guido van Rossum7f43da71994-08-01 12:15:30 +000010365
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010366
10367
10368
10369
10370
10371
Victor Stinnerb477d192020-01-22 22:48:16 +010010372
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010373if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10374 if test -n "$ac_tool_prefix"; then
10375 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10376set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10378$as_echo_n "checking for $ac_word... " >&6; }
10379if ${ac_cv_path_PKG_CONFIG+:} false; then :
10380 $as_echo_n "(cached) " >&6
10381else
10382 case $PKG_CONFIG in
10383 [\\/]* | ?:[\\/]*)
10384 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10385 ;;
10386 *)
10387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10388for as_dir in $PATH
10389do
10390 IFS=$as_save_IFS
10391 test -z "$as_dir" && as_dir=.
10392 for ac_exec_ext in '' $ac_executable_extensions; do
10393 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10394 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10395 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10396 break 2
10397 fi
10398done
10399 done
10400IFS=$as_save_IFS
10401
10402 ;;
10403esac
10404fi
10405PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10406if test -n "$PKG_CONFIG"; then
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10408$as_echo "$PKG_CONFIG" >&6; }
10409else
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411$as_echo "no" >&6; }
10412fi
10413
10414
10415fi
10416if test -z "$ac_cv_path_PKG_CONFIG"; then
10417 ac_pt_PKG_CONFIG=$PKG_CONFIG
10418 # Extract the first word of "pkg-config", so it can be a program name with args.
10419set dummy pkg-config; ac_word=$2
10420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10421$as_echo_n "checking for $ac_word... " >&6; }
10422if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10423 $as_echo_n "(cached) " >&6
10424else
10425 case $ac_pt_PKG_CONFIG in
10426 [\\/]* | ?:[\\/]*)
10427 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10428 ;;
10429 *)
10430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10431for as_dir in $PATH
10432do
10433 IFS=$as_save_IFS
10434 test -z "$as_dir" && as_dir=.
10435 for ac_exec_ext in '' $ac_executable_extensions; do
10436 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10437 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10438 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10439 break 2
10440 fi
10441done
10442 done
10443IFS=$as_save_IFS
10444
10445 ;;
10446esac
10447fi
10448ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10449if test -n "$ac_pt_PKG_CONFIG"; then
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10451$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10452else
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10454$as_echo "no" >&6; }
10455fi
10456
10457 if test "x$ac_pt_PKG_CONFIG" = x; then
10458 PKG_CONFIG=""
10459 else
10460 case $cross_compiling:$ac_tool_warned in
10461yes:)
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10464ac_tool_warned=yes ;;
10465esac
10466 PKG_CONFIG=$ac_pt_PKG_CONFIG
10467 fi
10468else
10469 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10470fi
10471
10472fi
10473if test -n "$PKG_CONFIG"; then
10474 _pkg_min_version=0.9.0
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10476$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10477 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10479$as_echo "yes" >&6; }
10480 else
10481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10482$as_echo "no" >&6; }
10483 PKG_CONFIG=""
10484 fi
10485fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010486
10487# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10489$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010490
10491# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010492if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010493 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010494else
10495 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010496fi
10497
10498
Matthias Kloseb9621712010-04-24 17:59:49 +000010499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10500$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010501
10502# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10504$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010505
10506# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010507if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010508 withval=$with_system_ffi;
10509fi
10510
10511
Zachary Waref40d4dd2016-09-17 01:25:24 -050010512if test "$ac_sys_system" = "Darwin"
10513then
10514 case "$with_system_ffi" in
10515 "")
10516 with_system_ffi="no"
10517 ;;
10518 yes|no)
10519 ;;
10520 *)
10521 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10522 ;;
10523 esac
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10525$as_echo "$with_system_ffi" >&6; }
10526else
10527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10528$as_echo "yes" >&6; }
10529 if test "$with_system_ffi" != ""
10530 then
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10532$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10533 fi
10534 with_system_ffi="yes"
10535fi
Zachary Ware935043d2016-09-09 17:01:21 -070010536
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010537if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010538 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10539else
10540 LIBFFI_INCLUDEDIR=""
10541fi
10542
10543
Stefan Krah60187b52012-03-23 19:06:27 +010010544# Check for use of the system libmpdec library
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10546$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10547
10548# Check whether --with-system_libmpdec was given.
10549if test "${with_system_libmpdec+set}" = set; then :
10550 withval=$with_system_libmpdec;
10551else
10552 with_system_libmpdec="no"
10553fi
10554
10555
10556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10557$as_echo "$with_system_libmpdec" >&6; }
10558
Stefan Krah815280e2020-02-29 19:43:42 +010010559# Check whether _decimal should use a coroutine-local or thread-local context
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10561$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10562
10563# Check whether --with-decimal_contextvar was given.
10564if test "${with_decimal_contextvar+set}" = set; then :
10565 withval=$with_decimal_contextvar;
10566else
10567 with_decimal_contextvar="yes"
10568fi
10569
10570
10571if test "$with_decimal_contextvar" != "no"
10572then
10573
10574$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10575
10576fi
10577
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10579$as_echo "$with_decimal_contextvar" >&6; }
10580
Benjamin Peterson076ed002010-10-31 17:11:02 +000010581# Check for support for loadable sqlite extensions
10582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10583$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10584# Check whether --enable-loadable-sqlite-extensions was given.
10585if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10586 enableval=$enable_loadable_sqlite_extensions;
10587else
10588 enable_loadable_sqlite_extensions="no"
10589fi
10590
10591
10592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10593$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10594
Ned Deilyd819b932013-09-06 01:07:05 -070010595# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10596
10597
10598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10599$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10600
10601# Check whether --with-tcltk-includes was given.
10602if test "${with_tcltk_includes+set}" = set; then :
10603 withval=$with_tcltk_includes;
10604else
10605 with_tcltk_includes="default"
10606fi
10607
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10609$as_echo "$with_tcltk_includes" >&6; }
10610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10611$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10612
10613# Check whether --with-tcltk-libs was given.
10614if test "${with_tcltk_libs+set}" = set; then :
10615 withval=$with_tcltk_libs;
10616else
10617 with_tcltk_libs="default"
10618fi
10619
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10621$as_echo "$with_tcltk_libs" >&6; }
10622if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10623then
10624 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10625 then
10626 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10627 fi
10628 TCLTK_INCLUDES=""
10629 TCLTK_LIBS=""
10630else
10631 TCLTK_INCLUDES="$with_tcltk_includes"
10632 TCLTK_LIBS="$with_tcltk_libs"
10633fi
10634
Matthias Klose55708cc2009-04-30 08:06:49 +000010635# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10637$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010638
10639# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010640if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010641 withval=$with_dbmliborder;
10642if test x$with_dbmliborder = xyes
10643then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010644as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010645else
10646 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10647 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10648 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010649 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010650 fi
10651 done
10652fi
10653fi
10654
Matthias Kloseb9621712010-04-24 17:59:49 +000010655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10656$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010657
Martin v. Löwis11437992002-04-12 09:54:03 +000010658# Templates for things AC_DEFINEd more than once.
10659# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010660
10661
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010662if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010663then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010664 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010666
10667 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010668 if test "$ac_sys_system" = "SunOS"; then
10669 CFLAGS="$CFLAGS -D_REENTRANT"
10670 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010671elif test "$ac_cv_kpthread" = "yes"
10672then
10673 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010674 if test "$ac_cv_cxx_thread" = "yes"; then
10675 CXX="$CXX -Kpthread"
10676 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010677 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010678elif test "$ac_cv_kthread" = "yes"
10679then
10680 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010681 if test "$ac_cv_cxx_thread" = "yes"; then
10682 CXX="$CXX -Kthread"
10683 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010684 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685elif test "$ac_cv_pthread" = "yes"
10686then
10687 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010688 if test "$ac_cv_cxx_thread" = "yes"; then
10689 CXX="$CXX -pthread"
10690 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010691 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010692else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010693 if test ! -z "$withval" -a -d "$withval"
10694 then LDFLAGS="$LDFLAGS -L$withval"
10695 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010696
10697 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010698 # define _POSIX_THREADS in unistd.h. Some apparently don't
10699 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10701$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010703/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010704
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010705#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010706#ifdef _POSIX_THREADS
10707yes
10708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010709
10710_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010713 unistd_defines_pthreads=yes
10714else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010715 unistd_defines_pthreads=no
10716fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010717rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010718
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10720$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010721
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010723
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010724 # Just looking for pthread_create in libpthread is not enough:
10725 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10726 # So we really have to include pthread.h, and then link.
10727 _libs=$LIBS
10728 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10730$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010733
10734#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010735#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010736
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010737void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010738int
10739main ()
10740{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010741
10742pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010743 ;
10744 return 0;
10745}
10746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010747if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10750$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010751 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010752
Guido van Rossum02a1c402000-02-25 19:26:31 +000010753else
Martin v. Löwis11437992002-04-12 09:54:03 +000010754
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010755 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010757if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010758
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010759 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010760
Guido van Rossumad678af1998-10-02 14:42:15 +000010761else
Guido van Rossumad678af1998-10-02 14:42:15 +000010762
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10764$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010765if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010767else
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010769LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010773/* Override any GCC internal prototype to avoid an error.
10774 Use char because int might match the return type of a GCC
10775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010776#ifdef __cplusplus
10777extern "C"
10778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010779char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010780int
10781main ()
10782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 ;
10785 return 0;
10786}
10787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010790else
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010793rm -f core conftest.err conftest.$ac_objext \
10794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010795LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10798$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010799if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010800
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010801 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010802 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010803
Greg Steinadf63d62000-07-05 10:38:09 +000010804else
Greg Steinadf63d62000-07-05 10:38:09 +000010805
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10807$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010808if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010810else
Martin v. Löwis11437992002-04-12 09:54:03 +000010811 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010812LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816/* Override any GCC internal prototype to avoid an error.
10817 Use char because int might match the return type of a GCC
10818 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010819#ifdef __cplusplus
10820extern "C"
10821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010822char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010823int
10824main ()
10825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010826return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010827 ;
10828 return 0;
10829}
10830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010831if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010832 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010833else
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010836rm -f core conftest.err conftest.$ac_objext \
10837 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010838LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10841$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010842if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010844 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010845 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010846
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010847else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010848
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10850$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010851if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010853else
Martin v. Löwis11437992002-04-12 09:54:03 +000010854 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010855LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859/* Override any GCC internal prototype to avoid an error.
10860 Use char because int might match the return type of a GCC
10861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010862#ifdef __cplusplus
10863extern "C"
10864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010865char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010866int
10867main ()
10868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010869return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010870 ;
10871 return 0;
10872}
10873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010876else
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010879rm -f core conftest.err conftest.$ac_objext \
10880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010881LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10884$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010885if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010886
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010887 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010888 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010889
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010890else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10893$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010894if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010896else
Martin v. Löwis11437992002-04-12 09:54:03 +000010897 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010898LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010902/* Override any GCC internal prototype to avoid an error.
10903 Use char because int might match the return type of a GCC
10904 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010905#ifdef __cplusplus
10906extern "C"
10907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010908char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010909int
10910main ()
10911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010912return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 ;
10914 return 0;
10915}
10916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010917if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010919else
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010922rm -f core conftest.err conftest.$ac_objext \
10923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010924LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10927$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010928if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010929
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010930 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010931 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010932
Guido van Rossumb93a8621998-05-07 13:27:32 +000010933else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010934
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010935 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10936
Guido van Rossum2d38f911996-06-26 19:47:01 +000010937fi
10938
Guido van Rossum627b2d71993-12-24 10:39:16 +000010939
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010940fi
10941
Guido van Rossum0be3e491997-05-22 20:33:33 +000010942fi
10943
Guido van Rossum49545951997-12-02 19:28:29 +000010944fi
10945
Guido van Rossumb93a8621998-05-07 13:27:32 +000010946fi
10947
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010949rm -f core conftest.err conftest.$ac_objext \
10950 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10953$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010954if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956else
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010958LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962/* Override any GCC internal prototype to avoid an error.
10963 Use char because int might match the return type of a GCC
10964 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010965#ifdef __cplusplus
10966extern "C"
10967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010968char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010969int
10970main ()
10971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 ;
10974 return 0;
10975}
10976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010977if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010979else
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010982rm -f core conftest.err conftest.$ac_objext \
10983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010984LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10987$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010988if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010989
Martin v. Löwis130fb172001-07-19 11:00:41 +000010990 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010991
Guido van Rossum627b2d71993-12-24 10:39:16 +000010992fi
10993
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010994
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010995fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010996
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010997if test "$posix_threads" = "yes"; then
10998 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011001
11002 fi
11003
11004 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11005 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011006 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011007$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011008
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011009 ;;
11010 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011011$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011012
11013 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011014 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011016
11017 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011018 esac
11019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11021$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011022 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011024else
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011026 ac_cv_pthread_system_supported=no
11027else
Matthias Kloseb9621712010-04-24 17:59:49 +000011028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011029/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011030
11031 #include <stdio.h>
11032 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011033 void *foo(void *parm) {
11034 return NULL;
11035 }
11036 main() {
11037 pthread_attr_t attr;
11038 pthread_t id;
11039 if (pthread_attr_init(&attr)) exit(-1);
11040 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11041 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11042 exit(0);
11043 }
11044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011045if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011046 ac_cv_pthread_system_supported=yes
11047else
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11051 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011052fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054
Guido van Rossum627b2d71993-12-24 10:39:16 +000011055fi
11056
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11058$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011059 if test "$ac_cv_pthread_system_supported" = "yes"; then
11060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011062
11063 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 for ac_func in pthread_sigmask
11065do :
11066 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011067if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011068 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011069#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011070_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011071 case $ac_sys_system in
11072 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011075
11076 ;;
11077 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011078fi
11079done
11080
pdoxe14679c2017-10-05 00:01:56 -070011081 for ac_func in pthread_getcpuclockid
11082do :
11083 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11084if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11085 cat >>confdefs.h <<_ACEOF
11086#define HAVE_PTHREAD_GETCPUCLOCKID 1
11087_ACEOF
11088
11089fi
11090done
11091
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011092fi
11093
11094
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011095# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11098$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011099# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011100if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011102 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105 ipv6=no
11106 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011107 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11108$as_echo "yes" >&6; }
11109 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110
11111 ipv6=yes
11112 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114else
Martin v. Löwis11437992002-04-12 09:54:03 +000011115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011117/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118 /* AF_INET6 available check */
11119#include <sys/types.h>
11120#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011121int
11122main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011124int domain = AF_INET6;
11125 ;
11126 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011127}
Martin v. Löwis11437992002-04-12 09:54:03 +000011128_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011129if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011130
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11132$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011135else
Matthias Kloseb159a552010-04-25 21:00:44 +000011136
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11138$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011140
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011144if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11146$as_echo_n "checking if RFC2553 API is available... " >&6; }
11147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011148/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011149
11150 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011151#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011152int
11153main ()
11154{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011155struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011156 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 ;
11158 return 0;
11159}
Matthias Kloseb159a552010-04-25 21:00:44 +000011160
Martin v. Löwis11437992002-04-12 09:54:03 +000011161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011162if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011163
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011165$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011166 ipv6=yes
11167
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011168else
Matthias Kloseb159a552010-04-25 21:00:44 +000011169
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011172 ipv6=no
11173
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011176fi
11177
11178if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011179 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011180
11181fi
11182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183fi
11184
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011185
11186ipv6type=unknown
11187ipv6lib=none
11188ipv6trylibc=no
11189
11190if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11192$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011193 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11194 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011195 case $i in
11196 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011198/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011199
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011200#include <netinet/in.h>
11201#ifdef IPV6_INRIA_VERSION
11202yes
11203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011204_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011207 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011208fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011209rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011210
11211 ;;
11212 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011214/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011215
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011216#include <netinet/in.h>
11217#ifdef __KAME__
11218yes
11219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011220_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011222 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011223 ipv6type=$i;
11224 ipv6lib=inet6
11225 ipv6libdir=/usr/local/v6/lib
11226 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011227fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011228rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011229
11230 ;;
11231 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011233/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011234
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011235#include <features.h>
11236#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11237yes
11238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011239_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011240if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011242 ipv6type=$i;
11243 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011244fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011245rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011246
11247 ;;
11248 linux-inet6)
11249 if test -d /usr/inet6; then
11250 ipv6type=$i
11251 ipv6lib=inet6
11252 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011253 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011254 fi
11255 ;;
11256 solaris)
11257 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011258 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011259 ipv6type=$i
11260 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011261 fi
11262 fi
11263 ;;
11264 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011266/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011267
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011268#include <sys/param.h>
11269#ifdef _TOSHIBA_INET6
11270yes
11271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011272_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011275 ipv6type=$i;
11276 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011277 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011278fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011279rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011280
11281 ;;
11282 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011284/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011285
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011286#include </usr/local/v6/include/sys/v6config.h>
11287#ifdef __V6D__
11288yes
11289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011290_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011293 ipv6type=$i;
11294 ipv6lib=v6;
11295 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011296 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011297fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011298rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011299
11300 ;;
11301 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011304
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011305#include <sys/param.h>
11306#ifdef _ZETA_MINAMI_INET6
11307yes
11308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011309_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011312 ipv6type=$i;
11313 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011314 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011315fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011316rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011317
11318 ;;
11319 esac
11320 if test "$ipv6type" != "unknown"; then
11321 break
11322 fi
11323 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11325$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011326fi
11327
11328if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11329 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11330 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11331 echo "using lib$ipv6lib"
11332 else
11333 if test $ipv6trylibc = "yes"; then
11334 echo "using libc"
11335 else
11336 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11337 echo "You need to fetch lib$ipv6lib.a from appropriate"
11338 echo 'ipv6 kit and compile beforehand.'
11339 exit 1
11340 fi
11341 fi
11342fi
11343
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11345$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11347/* end confdefs.h. */
11348 /* CAN_RAW_FD_FRAMES available check */
11349#include <linux/can/raw.h>
11350int
11351main ()
11352{
11353int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11354 ;
11355 return 0;
11356}
11357_ACEOF
11358if ac_fn_c_try_compile "$LINENO"; then :
11359
11360
11361$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11362
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11364$as_echo "yes" >&6; }
11365
11366else
11367
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
11370
11371fi
11372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11373
Zackery Spytz97e0de02020-04-09 06:03:49 -060011374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11375$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11377/* end confdefs.h. */
11378
11379#include <linux/can/raw.h>
11380int
11381main ()
11382{
11383int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11384 ;
11385 return 0;
11386}
11387_ACEOF
11388if ac_fn_c_try_compile "$LINENO"; then :
11389
11390
11391$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11392
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11394$as_echo "yes" >&6; }
11395
11396else
11397
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11399$as_echo "no" >&6; }
11400
11401fi
11402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11403
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011404# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11406$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011408# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011409if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410 withval=$with_doc_strings;
11411fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011412
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011413
11414if test -z "$with_doc_strings"
11415then with_doc_strings="yes"
11416fi
11417if test "$with_doc_strings" != "no"
11418then
11419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011421
11422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11424$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011425
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011426# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11428$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011431if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432 withval=$with_pymalloc;
11433fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011434
Neil Schemenauera35c6882001-02-27 04:45:05 +000011435
Neil Schemenauer16c22972002-03-22 15:34:49 +000011436if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011437then
11438 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011439fi
11440if test "$with_pymalloc" != "no"
11441then
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Matthias Kloseb9621712010-04-24 17:59:49 +000011443$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011444
11445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11447$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011448
Nick Coghlan6ea41862017-06-11 13:16:15 +100011449# Check for --with-c-locale-coercion
11450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11451$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11452
11453# Check whether --with-c-locale-coercion was given.
11454if test "${with_c_locale_coercion+set}" = set; then :
11455 withval=$with_c_locale_coercion;
11456fi
11457
11458
11459if test -z "$with_c_locale_coercion"
11460then
11461 with_c_locale_coercion="yes"
11462fi
11463if test "$with_c_locale_coercion" != "no"
11464then
11465
11466$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11467
11468fi
11469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11470$as_echo "$with_c_locale_coercion" >&6; }
11471
Benjamin Peterson05159c42009-12-03 03:01:27 +000011472# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11474$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011475
11476# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011477if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011478 withval=$with_valgrind;
11479else
11480 with_valgrind=no
11481fi
11482
Matthias Kloseb9621712010-04-24 17:59:49 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11484$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011485if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 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 +020011487if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011488
Matthias Kloseb9621712010-04-24 17:59:49 +000011489$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011490
11491else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011492 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011493
11494fi
11495
11496
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011497 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011498fi
11499
Łukasz Langaa785c872016-09-09 17:37:37 -070011500# Check for DTrace support
11501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11502$as_echo_n "checking for --with-dtrace... " >&6; }
11503
11504# Check whether --with-dtrace was given.
11505if test "${with_dtrace+set}" = set; then :
11506 withval=$with_dtrace;
11507else
11508 with_dtrace=no
11509fi
11510
11511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11512$as_echo "$with_dtrace" >&6; }
11513
11514
11515
11516
11517
11518DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011519DTRACE_HEADERS=
11520DTRACE_OBJS=
11521
11522if test "$with_dtrace" = "yes"
11523then
11524 # Extract the first word of "dtrace", so it can be a program name with args.
11525set dummy dtrace; ac_word=$2
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11527$as_echo_n "checking for $ac_word... " >&6; }
11528if ${ac_cv_path_DTRACE+:} false; then :
11529 $as_echo_n "(cached) " >&6
11530else
11531 case $DTRACE in
11532 [\\/]* | ?:[\\/]*)
11533 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11534 ;;
11535 *)
11536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11537for as_dir in $PATH
11538do
11539 IFS=$as_save_IFS
11540 test -z "$as_dir" && as_dir=.
11541 for ac_exec_ext in '' $ac_executable_extensions; do
11542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11543 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11545 break 2
11546 fi
11547done
11548 done
11549IFS=$as_save_IFS
11550
11551 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11552 ;;
11553esac
11554fi
11555DTRACE=$ac_cv_path_DTRACE
11556if test -n "$DTRACE"; then
11557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11558$as_echo "$DTRACE" >&6; }
11559else
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561$as_echo "no" >&6; }
11562fi
11563
11564
11565 if test "$DTRACE" = "not found"; then
11566 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11567 fi
11568
11569$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11570
11571 DTRACE_HEADERS="Include/pydtrace_probes.h"
11572
11573 # On OS X, DTrace providers do not need to be explicitly compiled and
11574 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11575 # generation flag '-G'. We check for presence of this flag, rather than
11576 # hardcoding support by OS, in the interest of robustness.
11577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11578$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11579if ${ac_cv_dtrace_link+:} false; then :
11580 $as_echo_n "(cached) " >&6
11581else
11582 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011583 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011584 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011585 ac_cv_dtrace_link=yes
11586
11587fi
11588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11589$as_echo "$ac_cv_dtrace_link" >&6; }
11590 if test "$ac_cv_dtrace_link" = "yes"; then
11591 DTRACE_OBJS="Python/pydtrace.o"
11592 fi
11593fi
11594
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011595# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011596
Guido van Rossum98935bf2001-09-05 19:13:16 +000011597DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011598
Guido van Rossume97ee181999-12-20 21:27:22 +000011599# the dlopen() function means we might want to use dynload_shlib.o. some
11600# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011601for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011602do :
11603 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011604if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011605 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011606#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011607_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011608
Guido van Rossume97ee181999-12-20 21:27:22 +000011609fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011610done
Guido van Rossume97ee181999-12-20 21:27:22 +000011611
Michael W. Hudson54241132001-12-07 15:38:26 +000011612
Guido van Rossume97ee181999-12-20 21:27:22 +000011613# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11614# loading of modules.
11615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11617$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011618if test -z "$DYNLOADFILE"
11619then
11620 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011621 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11622 if test "$ac_cv_func_dlopen" = yes
11623 then DYNLOADFILE="dynload_shlib.o"
11624 else DYNLOADFILE="dynload_aix.o"
11625 fi
11626 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011627 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011628 *)
11629 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11630 # out any dynamic loading
11631 if test "$ac_cv_func_dlopen" = yes
11632 then DYNLOADFILE="dynload_shlib.o"
11633 else DYNLOADFILE="dynload_stub.o"
11634 fi
11635 ;;
11636 esac
11637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11639$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011640if test "$DYNLOADFILE" != "dynload_stub.o"
11641then
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011644
11645fi
11646
Neil Schemenauer4e425612001-06-19 15:44:15 +000011647# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11648
Michael W. Hudson54241132001-12-07 15:38:26 +000011649
Matthias Kloseb9621712010-04-24 17:59:49 +000011650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11651$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011652if test -z "$MACHDEP_OBJS"
11653then
Jack Jansene578a632001-08-15 01:27:14 +000011654 MACHDEP_OBJS=$extra_machdep_objs
11655else
11656 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011657fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011658if test -z "$MACHDEP_OBJS"; then
11659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11660$as_echo "none" >&6; }
11661else
11662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11663$as_echo "$MACHDEP_OBJS" >&6; }
11664fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011665
Guido van Rossum627b2d71993-12-24 10:39:16 +000011666# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011667for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011668 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11669 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011670 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011671 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011672 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011673 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011674 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011675 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011676 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011677 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011678 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011679 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011680 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011681 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011682 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011683 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011684 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011685 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11686 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011687 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011688 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011689 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011690 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011691 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011692do :
11693 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11694ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011695if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011696 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011697#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011698_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011699
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011700fi
11701done
11702
Michael W. Hudson54241132001-12-07 15:38:26 +000011703
Benjamin Peterson40caa052018-09-12 15:52:40 -070011704# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11705# links. Some libc implementations have a stub lchmod implementation that always
11706# returns an error.
11707if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011708 for ac_func in lchmod
11709do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011710 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11711if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011712 cat >>confdefs.h <<_ACEOF
11713#define HAVE_LCHMOD 1
11714_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011715
11716fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011717done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011718
11719fi
11720
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011721ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11722 #include <dirent.h>
11723"
11724if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11725
11726$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11727
11728fi
11729
11730
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011731# For some functions, having a definition is not sufficient, since
11732# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11734$as_echo_n "checking for chroot... " >&6; }
11735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011736/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011737#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011738int
11739main ()
11740{
11741void *x=chroot
11742 ;
11743 return 0;
11744}
11745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011747
Matthias Kloseb9621712010-04-24 17:59:49 +000011748$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011749
Matthias Kloseb159a552010-04-25 21:00:44 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011751$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011752else
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11754$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011755
11756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11759$as_echo_n "checking for link... " >&6; }
11760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011761/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011762#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011763int
11764main ()
11765{
11766void *x=link
11767 ;
11768 return 0;
11769}
11770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011771if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011772
Matthias Kloseb9621712010-04-24 17:59:49 +000011773$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011774
Matthias Kloseb159a552010-04-25 21:00:44 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011776$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011777else
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11779$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011780
11781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11784$as_echo_n "checking for symlink... " >&6; }
11785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011786/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011787#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011788int
11789main ()
11790{
11791void *x=symlink
11792 ;
11793 return 0;
11794}
11795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011796if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011797
Matthias Kloseb9621712010-04-24 17:59:49 +000011798$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11804$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011805
11806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11809$as_echo_n "checking for fchdir... " >&6; }
11810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011811/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011812#include <unistd.h>
11813int
11814main ()
11815{
11816void *x=fchdir
11817 ;
11818 return 0;
11819}
11820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011821if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011824
Matthias Kloseb159a552010-04-25 21:00:44 +000011825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011826$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011827else
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11829$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011830
11831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11834$as_echo_n "checking for fsync... " >&6; }
11835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011836/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011837#include <unistd.h>
11838int
11839main ()
11840{
11841void *x=fsync
11842 ;
11843 return 0;
11844}
11845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011846if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011847
Matthias Kloseb9621712010-04-24 17:59:49 +000011848$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011849
Matthias Kloseb159a552010-04-25 21:00:44 +000011850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011851$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011852else
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011855
11856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11859$as_echo_n "checking for fdatasync... " >&6; }
11860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011861/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011862#include <unistd.h>
11863int
11864main ()
11865{
11866void *x=fdatasync
11867 ;
11868 return 0;
11869}
11870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011871if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011872
Matthias Kloseb9621712010-04-24 17:59:49 +000011873$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011874
Matthias Kloseb159a552010-04-25 21:00:44 +000011875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011876$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11879$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011880
11881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11884$as_echo_n "checking for epoll... " >&6; }
11885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011886/* end confdefs.h. */
11887#include <sys/epoll.h>
11888int
11889main ()
11890{
11891void *x=epoll_create
11892 ;
11893 return 0;
11894}
11895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011897
Matthias Kloseb9621712010-04-24 17:59:49 +000011898$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011899
Matthias Kloseb159a552010-04-25 21:00:44 +000011900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011901$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011902else
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11904$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011905
11906fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11909$as_echo_n "checking for epoll_create1... " >&6; }
11910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11911/* end confdefs.h. */
11912#include <sys/epoll.h>
11913int
11914main ()
11915{
11916void *x=epoll_create1
11917 ;
11918 return 0;
11919}
11920_ACEOF
11921if ac_fn_c_try_compile "$LINENO"; then :
11922
11923$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11924
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11926$as_echo "yes" >&6; }
11927else
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11929$as_echo "no" >&6; }
11930
11931fi
11932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11934$as_echo_n "checking for kqueue... " >&6; }
11935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011936/* end confdefs.h. */
11937
11938#include <sys/types.h>
11939#include <sys/event.h>
11940
11941int
11942main ()
11943{
11944int x=kqueue()
11945 ;
11946 return 0;
11947}
11948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011949if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011952
Matthias Kloseb159a552010-04-25 21:00:44 +000011953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011954$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011955else
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11957$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011958
11959fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11962$as_echo_n "checking for prlimit... " >&6; }
11963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11964/* end confdefs.h. */
11965
11966#include <sys/time.h>
11967#include <sys/resource.h>
11968
11969int
11970main ()
11971{
11972void *x=prlimit
11973 ;
11974 return 0;
11975}
11976_ACEOF
11977if ac_fn_c_try_compile "$LINENO"; then :
11978
11979$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11980
11981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11982$as_echo "yes" >&6; }
11983else
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11985$as_echo "no" >&6; }
11986
11987fi
11988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11991$as_echo_n "checking for memfd_create... " >&6; }
11992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11993/* end confdefs.h. */
11994
11995#ifdef HAVE_SYS_MMAN_H
11996#include <sys/mman.h>
11997#endif
11998#ifdef HAVE_SYS_MEMFD_H
11999#include <sys/memfd.h>
12000#endif
12001
12002int
12003main ()
12004{
12005void *x=memfd_create
12006 ;
12007 return 0;
12008}
12009_ACEOF
12010if ac_fn_c_try_compile "$LINENO"; then :
12011
12012$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12013
12014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12015$as_echo "yes" >&6; }
12016else
12017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12018$as_echo "no" >&6; }
12019
12020fi
12021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12022
Martin v. Löwisd5843682002-11-21 20:41:28 +000012023# On some systems (eg. FreeBSD 5), we would find a definition of the
12024# functions ctermid_r, setgroups in the library, but no prototype
12025# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12026# address to avoid compiler warnings and potential miscompilations
12027# because of the missing prototypes.
12028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12030$as_echo_n "checking for ctermid_r... " >&6; }
12031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012032/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012033
Martin v. Löwisd5843682002-11-21 20:41:28 +000012034#include <stdio.h>
12035
Martin v. Löwisd5843682002-11-21 20:41:28 +000012036int
12037main ()
12038{
12039void* p = ctermid_r
12040 ;
12041 return 0;
12042}
12043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012047
Matthias Kloseb159a552010-04-25 21:00:44 +000012048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012049$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012050else
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12052$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012053
12054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12056
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12058$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012059if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012060 $as_echo_n "(cached) " >&6
12061else
12062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012064#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012065int
12066main ()
12067{
12068void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012069
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012070 ;
12071 return 0;
12072}
12073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012074if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012075 ac_cv_flock_decl=yes
12076else
12077 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012078
12079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012081
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012082fi
12083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12084$as_echo "$ac_cv_flock_decl" >&6; }
12085if test "x${ac_cv_flock_decl}" = xyes; then
12086 for ac_func in flock
12087do :
12088 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012089if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012090 cat >>confdefs.h <<_ACEOF
12091#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012092_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012093
Antoine Pitroua3000072010-09-07 14:52:42 +000012094else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012096$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012097if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012098 $as_echo_n "(cached) " >&6
12099else
12100 ac_check_lib_save_LIBS=$LIBS
12101LIBS="-lbsd $LIBS"
12102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12103/* end confdefs.h. */
12104
12105/* Override any GCC internal prototype to avoid an error.
12106 Use char because int might match the return type of a GCC
12107 builtin and then its argument prototype would still apply. */
12108#ifdef __cplusplus
12109extern "C"
12110#endif
12111char flock ();
12112int
12113main ()
12114{
12115return flock ();
12116 ;
12117 return 0;
12118}
12119_ACEOF
12120if ac_fn_c_try_link "$LINENO"; then :
12121 ac_cv_lib_bsd_flock=yes
12122else
12123 ac_cv_lib_bsd_flock=no
12124fi
12125rm -f core conftest.err conftest.$ac_objext \
12126 conftest$ac_exeext conftest.$ac_ext
12127LIBS=$ac_check_lib_save_LIBS
12128fi
12129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12130$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012131if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012132 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012133
12134
12135$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12136
12137
12138fi
12139
12140
12141fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012142done
12143
Antoine Pitroua3000072010-09-07 14:52:42 +000012144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012145
Matthias Kloseb9621712010-04-24 17:59:49 +000012146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12147$as_echo_n "checking for getpagesize... " >&6; }
12148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012149/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012150
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012151#include <unistd.h>
12152
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012153int
12154main ()
12155{
12156void* p = getpagesize
12157 ;
12158 return 0;
12159}
12160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012161if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012164
Matthias Kloseb159a552010-04-25 21:00:44 +000012165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012166$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012167else
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12169$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012170
12171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012173
Victor Stinner984890f2011-11-24 13:53:38 +010012174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12175$as_echo_n "checking for broken unsetenv... " >&6; }
12176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12177/* end confdefs.h. */
12178
12179#include <stdlib.h>
12180
12181int
12182main ()
12183{
12184int res = unsetenv("DUMMY")
12185 ;
12186 return 0;
12187}
12188_ACEOF
12189if ac_fn_c_try_compile "$LINENO"; then :
12190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12191$as_echo "no" >&6; }
12192else
12193
12194$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12195
12196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12197$as_echo "yes" >&6; }
12198
12199fi
12200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12201
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012202for ac_prog in true
12203do
12204 # Extract the first word of "$ac_prog", so it can be a program name with args.
12205set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12207$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012208if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012210else
12211 if test -n "$TRUE"; then
12212 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12213else
12214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12215for as_dir in $PATH
12216do
12217 IFS=$as_save_IFS
12218 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012220 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012221 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 $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 +000012223 break 2
12224 fi
12225done
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012228
12229fi
12230fi
12231TRUE=$ac_cv_prog_TRUE
12232if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12234$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012235else
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12237$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012238fi
12239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012241 test -n "$TRUE" && break
12242done
12243test -n "$TRUE" || TRUE="/bin/true"
12244
12245
Matthias Kloseb9621712010-04-24 17:59:49 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12247$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012248if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012250else
12251 ac_check_lib_save_LIBS=$LIBS
12252LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012254/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256/* Override any GCC internal prototype to avoid an error.
12257 Use char because int might match the return type of a GCC
12258 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012259#ifdef __cplusplus
12260extern "C"
12261#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012262char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012263int
12264main ()
12265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012267 ;
12268 return 0;
12269}
12270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012272 ac_cv_lib_c_inet_aton=yes
12273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012276rm -f core conftest.err conftest.$ac_objext \
12277 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012278LIBS=$ac_check_lib_save_LIBS
12279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12281$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012282if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012283 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012284else
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12286$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012287if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012289else
12290 ac_check_lib_save_LIBS=$LIBS
12291LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012293/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295/* Override any GCC internal prototype to avoid an error.
12296 Use char because int might match the return type of a GCC
12297 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012298#ifdef __cplusplus
12299extern "C"
12300#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012301char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012302int
12303main ()
12304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012306 ;
12307 return 0;
12308}
12309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012310if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012311 ac_cv_lib_resolv_inet_aton=yes
12312else
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012315rm -f core conftest.err conftest.$ac_objext \
12316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012317LIBS=$ac_check_lib_save_LIBS
12318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12320$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012321if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012322 cat >>confdefs.h <<_ACEOF
12323#define HAVE_LIBRESOLV 1
12324_ACEOF
12325
12326 LIBS="-lresolv $LIBS"
12327
12328fi
12329
12330
12331fi
12332
12333
Christian Heimesd0764e22007-12-04 15:00:33 +000012334# On Tru64, chflags seems to be present, but calling it will
12335# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12337$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012338if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012340else
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012342 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012345/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012346
Christian Heimesd0764e22007-12-04 15:00:33 +000012347#include <sys/stat.h>
12348#include <unistd.h>
12349int main(int argc, char*argv[])
12350{
12351 if(chflags(argv[0], 0) != 0)
12352 return 1;
12353 return 0;
12354}
Ned Deily3eb67d52011-06-28 00:00:28 -070012355
Christian Heimesd0764e22007-12-04 15:00:33 +000012356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012357if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012358 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012359else
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12363 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012364fi
12365
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012366
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12369$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012370if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012372if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012373 ac_cv_have_chflags="yes"
12374else
12375 ac_cv_have_chflags="no"
12376fi
12377
12378fi
12379if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012380
Matthias Kloseb9621712010-04-24 17:59:49 +000012381$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012382
12383fi
12384
Matthias Kloseb9621712010-04-24 17:59:49 +000012385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12386$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012387if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012389else
Matthias Kloseb9621712010-04-24 17:59:49 +000012390 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012391 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012392else
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012394/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012395
Christian Heimesd0764e22007-12-04 15:00:33 +000012396#include <sys/stat.h>
12397#include <unistd.h>
12398int main(int argc, char*argv[])
12399{
12400 if(lchflags(argv[0], 0) != 0)
12401 return 1;
12402 return 0;
12403}
Ned Deily3eb67d52011-06-28 00:00:28 -070012404
Christian Heimesd0764e22007-12-04 15:00:33 +000012405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012406if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012407 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012408else
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12412 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012413fi
12414
12415
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12418$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012419if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012421if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012422 ac_cv_have_lchflags="yes"
12423else
12424 ac_cv_have_lchflags="no"
12425fi
12426
12427fi
12428if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012429
Matthias Kloseb9621712010-04-24 17:59:49 +000012430$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012431
12432fi
12433
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012434case $ac_sys_system/$ac_sys_release in
12435Darwin/*)
12436 _CUR_CFLAGS="${CFLAGS}"
12437 _CUR_LDFLAGS="${LDFLAGS}"
12438 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12439 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12440 ;;
12441esac
12442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12444$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012445if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012447else
12448 ac_check_lib_save_LIBS=$LIBS
12449LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012451/* end confdefs.h. */
12452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453/* Override any GCC internal prototype to avoid an error.
12454 Use char because int might match the return type of a GCC
12455 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012456#ifdef __cplusplus
12457extern "C"
12458#endif
12459char inflateCopy ();
12460int
12461main ()
12462{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012464 ;
12465 return 0;
12466}
12467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012468if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012469 ac_cv_lib_z_inflateCopy=yes
12470else
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012473rm -f core conftest.err conftest.$ac_objext \
12474 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012475LIBS=$ac_check_lib_save_LIBS
12476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12478$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012479if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012482
12483fi
12484
12485
12486case $ac_sys_system/$ac_sys_release in
12487Darwin/*)
12488 CFLAGS="${_CUR_CFLAGS}"
12489 LDFLAGS="${_CUR_LDFLAGS}"
12490 ;;
12491esac
12492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12494$as_echo_n "checking for hstrerror... " >&6; }
12495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012496/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012497
Martin v. Löwise9416172003-05-03 10:12:45 +000012498#include <netdb.h>
12499
Martin v. Löwise9416172003-05-03 10:12:45 +000012500int
12501main ()
12502{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012503void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012504 ;
12505 return 0;
12506}
12507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012509
Matthias Kloseb9621712010-04-24 17:59:49 +000012510$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012511
Matthias Kloseb159a552010-04-25 21:00:44 +000012512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012513$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012514else
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12516$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012517
12518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012519rm -f core conftest.err conftest.$ac_objext \
12520 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521
Matthias Kloseb9621712010-04-24 17:59:49 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12523$as_echo_n "checking for inet_aton... " >&6; }
12524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012525/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012526
Martin v. Löwis86d66262006-02-17 08:40:11 +000012527#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012528#include <sys/socket.h>
12529#include <netinet/in.h>
12530#include <arpa/inet.h>
12531
Martin v. Löwise9416172003-05-03 10:12:45 +000012532int
12533main ()
12534{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012535void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +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öwise9416172003-05-03 10:12:45 +000012541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012543
Matthias Kloseb159a552010-04-25 21:00:44 +000012544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012545$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012546else
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12548$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012549
12550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012551rm -f core conftest.err conftest.$ac_objext \
12552 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12555$as_echo_n "checking for inet_pton... " >&6; }
12556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012557/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012558
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012559#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012560#include <sys/socket.h>
12561#include <netinet/in.h>
12562#include <arpa/inet.h>
12563
Martin v. Löwise9416172003-05-03 10:12:45 +000012564int
12565main ()
12566{
12567void* p = inet_pton
12568 ;
12569 return 0;
12570}
12571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012575
Matthias Kloseb159a552010-04-25 21:00:44 +000012576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012577$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012578else
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12580$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012581
12582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012584
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012585# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12587$as_echo_n "checking for setgroups... " >&6; }
12588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012589/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012590
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012591#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012592#ifdef HAVE_GRP_H
12593#include <grp.h>
12594#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012595
Martin v. Löwisd5843682002-11-21 20:41:28 +000012596int
12597main ()
12598{
12599void* p = setgroups
12600 ;
12601 return 0;
12602}
12603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012605
Matthias Kloseb9621712010-04-24 17:59:49 +000012606$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012607
Matthias Kloseb159a552010-04-25 21:00:44 +000012608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012609$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012610else
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012613
12614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012616
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012617# check for openpty and forkpty
12618
12619for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012620do :
12621 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012622if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012624#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012625_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012627else
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12629$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012630if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012631 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012632else
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012634LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012638/* Override any GCC internal prototype to avoid an error.
12639 Use char because int might match the return type of a GCC
12640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012641#ifdef __cplusplus
12642extern "C"
12643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012644char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012645int
12646main ()
12647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 ;
12650 return 0;
12651}
12652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012655else
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012658rm -f core conftest.err conftest.$ac_objext \
12659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012660LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12663$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012664if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012666 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012667else
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12669$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012670if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012672else
12673 ac_check_lib_save_LIBS=$LIBS
12674LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012676/* end confdefs.h. */
12677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678/* Override any GCC internal prototype to avoid an error.
12679 Use char because int might match the return type of a GCC
12680 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012681#ifdef __cplusplus
12682extern "C"
12683#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012684char openpty ();
12685int
12686main ()
12687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012689 ;
12690 return 0;
12691}
12692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012694 ac_cv_lib_bsd_openpty=yes
12695else
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012698rm -f core conftest.err conftest.$ac_objext \
12699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012700LIBS=$ac_check_lib_save_LIBS
12701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12703$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012704if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012706 LIBS="$LIBS -lbsd"
12707fi
12708
12709
12710fi
12711
Fred Drake8cef4cf2000-06-28 16:40:38 +000012712
12713fi
12714done
12715
12716for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012717do :
12718 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012719if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012721#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012722_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012723
Fred Drake8cef4cf2000-06-28 16:40:38 +000012724else
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12726$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012727if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012729else
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012731LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735/* Override any GCC internal prototype to avoid an error.
12736 Use char because int might match the return type of a GCC
12737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012738#ifdef __cplusplus
12739extern "C"
12740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012741char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012742int
12743main ()
12744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012745return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012752else
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012755rm -f core conftest.err conftest.$ac_objext \
12756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012757LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12760$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012761if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012763 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12766$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012767if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012769else
12770 ac_check_lib_save_LIBS=$LIBS
12771LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012773/* end confdefs.h. */
12774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775/* Override any GCC internal prototype to avoid an error.
12776 Use char because int might match the return type of a GCC
12777 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012778#ifdef __cplusplus
12779extern "C"
12780#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012781char forkpty ();
12782int
12783main ()
12784{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012786 ;
12787 return 0;
12788}
12789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012790if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012791 ac_cv_lib_bsd_forkpty=yes
12792else
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012795rm -f core conftest.err conftest.$ac_objext \
12796 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012797LIBS=$ac_check_lib_save_LIBS
12798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12800$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012801if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012803 LIBS="$LIBS -lbsd"
12804fi
12805
12806
12807fi
12808
Fred Drake8cef4cf2000-06-28 16:40:38 +000012809
12810fi
12811done
12812
Jack Jansendd19cf82001-12-06 22:36:17 +000012813
Michael W. Hudson54241132001-12-07 15:38:26 +000012814# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012815for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012816do :
12817 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12818ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012819if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012820 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012821#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012822_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012823
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012824fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012825done
12826
Michael W. Hudson54241132001-12-07 15:38:26 +000012827
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012828ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012829if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012830 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012831
Martin v. Löwis1142de32002-03-29 16:28:31 +000012832else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012834 *" dup2.$ac_objext "* ) ;;
12835 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012837esac
12838
Martin v. Löwis1142de32002-03-29 16:28:31 +000012839fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012840
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012841ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012842if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012843 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12844
12845else
12846 case " $LIBOBJS " in
12847 *" strdup.$ac_objext "* ) ;;
12848 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12849 ;;
12850esac
12851
12852fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012853
12854
12855for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012856do :
12857 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012858if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012860#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012863/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012864#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012865int
12866main ()
12867{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012868getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 ;
12870 return 0;
12871}
12872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012873if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012876
Guido van Rossum627b2d71993-12-24 10:39:16 +000012877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012879
Guido van Rossum627b2d71993-12-24 10:39:16 +000012880fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012881done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012882
Jack Jansen150753c2003-03-29 22:07:47 +000012883for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012884do :
12885 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012886if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012887 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012888#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012891/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012892#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012893int
12894main ()
12895{
12896setpgrp(0,0);
12897 ;
12898 return 0;
12899}
12900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012901if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012904
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012907
12908fi
12909done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012910
Michael W. Hudson54241132001-12-07 15:38:26 +000012911
Gregory P. Smith387512c2018-12-30 15:42:32 -080012912# We search for both crypt and crypt_r as one or the other may be defined
12913# This gets us our -lcrypt in LIBS when required on the target platform.
12914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12915$as_echo_n "checking for library containing crypt... " >&6; }
12916if ${ac_cv_search_crypt+:} false; then :
12917 $as_echo_n "(cached) " >&6
12918else
12919 ac_func_search_save_LIBS=$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 crypt ();
12930int
12931main ()
12932{
12933return crypt ();
12934 ;
12935 return 0;
12936}
12937_ACEOF
12938for ac_lib in '' crypt; do
12939 if test -z "$ac_lib"; then
12940 ac_res="none required"
12941 else
12942 ac_res=-l$ac_lib
12943 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12944 fi
12945 if ac_fn_c_try_link "$LINENO"; then :
12946 ac_cv_search_crypt=$ac_res
12947fi
12948rm -f core conftest.err conftest.$ac_objext \
12949 conftest$ac_exeext
12950 if ${ac_cv_search_crypt+:} false; then :
12951 break
12952fi
12953done
12954if ${ac_cv_search_crypt+:} false; then :
12955
12956else
12957 ac_cv_search_crypt=no
12958fi
12959rm conftest.$ac_ext
12960LIBS=$ac_func_search_save_LIBS
12961fi
12962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12963$as_echo "$ac_cv_search_crypt" >&6; }
12964ac_res=$ac_cv_search_crypt
12965if test "$ac_res" != no; then :
12966 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12967
12968fi
12969
12970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12971$as_echo_n "checking for library containing crypt_r... " >&6; }
12972if ${ac_cv_search_crypt_r+:} false; then :
12973 $as_echo_n "(cached) " >&6
12974else
12975 ac_func_search_save_LIBS=$LIBS
12976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12977/* end confdefs.h. */
12978
12979/* Override any GCC internal prototype to avoid an error.
12980 Use char because int might match the return type of a GCC
12981 builtin and then its argument prototype would still apply. */
12982#ifdef __cplusplus
12983extern "C"
12984#endif
12985char crypt_r ();
12986int
12987main ()
12988{
12989return crypt_r ();
12990 ;
12991 return 0;
12992}
12993_ACEOF
12994for ac_lib in '' crypt; do
12995 if test -z "$ac_lib"; then
12996 ac_res="none required"
12997 else
12998 ac_res=-l$ac_lib
12999 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13000 fi
13001 if ac_fn_c_try_link "$LINENO"; then :
13002 ac_cv_search_crypt_r=$ac_res
13003fi
13004rm -f core conftest.err conftest.$ac_objext \
13005 conftest$ac_exeext
13006 if ${ac_cv_search_crypt_r+:} false; then :
13007 break
13008fi
13009done
13010if ${ac_cv_search_crypt_r+:} false; then :
13011
13012else
13013 ac_cv_search_crypt_r=no
13014fi
13015rm conftest.$ac_ext
13016LIBS=$ac_func_search_save_LIBS
13017fi
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13019$as_echo "$ac_cv_search_crypt_r" >&6; }
13020ac_res=$ac_cv_search_crypt_r
13021if test "$ac_res" != no; then :
13022 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13023
13024fi
13025
13026
13027ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13028if test "x$ac_cv_func_crypt_r" = xyes; then :
13029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13030/* end confdefs.h. */
13031
13032#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13033#include <crypt.h>
13034
13035int
13036main ()
13037{
13038
13039struct crypt_data d;
13040char *r = crypt_r("", "", &d);
13041
13042 ;
13043 return 0;
13044}
13045_ACEOF
13046if ac_fn_c_try_compile "$LINENO"; then :
13047
13048$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13049
13050fi
13051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13052
13053fi
13054
13055
Victor Stinnere0be4232011-10-25 13:06:09 +020013056for ac_func in clock_gettime
13057do :
13058 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13059if test "x$ac_cv_func_clock_gettime" = xyes; then :
13060 cat >>confdefs.h <<_ACEOF
13061#define HAVE_CLOCK_GETTIME 1
13062_ACEOF
13063
13064else
13065
13066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13067$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13068if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13069 $as_echo_n "(cached) " >&6
13070else
13071 ac_check_lib_save_LIBS=$LIBS
13072LIBS="-lrt $LIBS"
13073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13074/* end confdefs.h. */
13075
13076/* Override any GCC internal prototype to avoid an error.
13077 Use char because int might match the return type of a GCC
13078 builtin and then its argument prototype would still apply. */
13079#ifdef __cplusplus
13080extern "C"
13081#endif
13082char clock_gettime ();
13083int
13084main ()
13085{
13086return clock_gettime ();
13087 ;
13088 return 0;
13089}
13090_ACEOF
13091if ac_fn_c_try_link "$LINENO"; then :
13092 ac_cv_lib_rt_clock_gettime=yes
13093else
13094 ac_cv_lib_rt_clock_gettime=no
13095fi
13096rm -f core conftest.err conftest.$ac_objext \
13097 conftest$ac_exeext conftest.$ac_ext
13098LIBS=$ac_check_lib_save_LIBS
13099fi
13100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13101$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13102if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13103
Victor Stinner7efb8332014-08-29 15:41:08 +020013104 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013105 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13106
13107
13108$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13109
13110
13111fi
13112
13113
13114fi
13115done
13116
13117
13118for ac_func in clock_getres
13119do :
13120 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13121if test "x$ac_cv_func_clock_getres" = xyes; then :
13122 cat >>confdefs.h <<_ACEOF
13123#define HAVE_CLOCK_GETRES 1
13124_ACEOF
13125
13126else
13127
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13129$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13130if ${ac_cv_lib_rt_clock_getres+:} false; then :
13131 $as_echo_n "(cached) " >&6
13132else
13133 ac_check_lib_save_LIBS=$LIBS
13134LIBS="-lrt $LIBS"
13135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13136/* end confdefs.h. */
13137
13138/* Override any GCC internal prototype to avoid an error.
13139 Use char because int might match the return type of a GCC
13140 builtin and then its argument prototype would still apply. */
13141#ifdef __cplusplus
13142extern "C"
13143#endif
13144char clock_getres ();
13145int
13146main ()
13147{
13148return clock_getres ();
13149 ;
13150 return 0;
13151}
13152_ACEOF
13153if ac_fn_c_try_link "$LINENO"; then :
13154 ac_cv_lib_rt_clock_getres=yes
13155else
13156 ac_cv_lib_rt_clock_getres=no
13157fi
13158rm -f core conftest.err conftest.$ac_objext \
13159 conftest$ac_exeext conftest.$ac_ext
13160LIBS=$ac_check_lib_save_LIBS
13161fi
13162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13163$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13164if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13165
13166 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13167
13168
13169fi
13170
13171
13172fi
13173done
13174
13175
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013176for ac_func in clock_settime
13177do :
13178 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13179if test "x$ac_cv_func_clock_settime" = xyes; then :
13180 cat >>confdefs.h <<_ACEOF
13181#define HAVE_CLOCK_SETTIME 1
13182_ACEOF
13183
13184else
13185
13186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13187$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13188if ${ac_cv_lib_rt_clock_settime+:} false; then :
13189 $as_echo_n "(cached) " >&6
13190else
13191 ac_check_lib_save_LIBS=$LIBS
13192LIBS="-lrt $LIBS"
13193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13194/* end confdefs.h. */
13195
13196/* Override any GCC internal prototype to avoid an error.
13197 Use char because int might match the return type of a GCC
13198 builtin and then its argument prototype would still apply. */
13199#ifdef __cplusplus
13200extern "C"
13201#endif
13202char clock_settime ();
13203int
13204main ()
13205{
13206return clock_settime ();
13207 ;
13208 return 0;
13209}
13210_ACEOF
13211if ac_fn_c_try_link "$LINENO"; then :
13212 ac_cv_lib_rt_clock_settime=yes
13213else
13214 ac_cv_lib_rt_clock_settime=no
13215fi
13216rm -f core conftest.err conftest.$ac_objext \
13217 conftest$ac_exeext conftest.$ac_ext
13218LIBS=$ac_check_lib_save_LIBS
13219fi
13220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13221$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13222if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13223
13224 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13225
13226
13227fi
13228
13229
13230fi
13231done
13232
13233
Matthias Kloseb9621712010-04-24 17:59:49 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13235$as_echo_n "checking for major... " >&6; }
13236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013237/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013238
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013239#if defined(MAJOR_IN_MKDEV)
13240#include <sys/mkdev.h>
13241#elif defined(MAJOR_IN_SYSMACROS)
13242#include <sys/sysmacros.h>
13243#else
13244#include <sys/types.h>
13245#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013246
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013247int
13248main ()
13249{
13250
13251 makedev(major(0),minor(0));
13252
13253 ;
13254 return 0;
13255}
13256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013257if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013258
13259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13263$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013264
13265else
Skip Montanaro6dead952003-09-25 14:50:04 +000013266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13268$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013269
13270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013271rm -f core conftest.err conftest.$ac_objext \
13272 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013273
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013274# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013275# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13277$as_echo_n "checking for getaddrinfo... " >&6; }
13278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013279/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013280
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013281#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013282#include <sys/socket.h>
13283#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013284#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285
Martin v. Löwis11437992002-04-12 09:54:03 +000013286int
13287main ()
13288{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013289getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013290 ;
13291 return 0;
13292}
13293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013294if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013295 have_getaddrinfo=yes
13296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013299rm -f core conftest.err conftest.$ac_objext \
13300 conftest$ac_exeext conftest.$ac_ext
13301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13302$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013303if test $have_getaddrinfo = yes
13304then
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13306$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013307 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013311
13312if test "${enable_ipv6+set}" = set; then
13313 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13314else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013315 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013316fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013319/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013320
Stefan Krah19c21392012-11-22 23:47:32 +010013321#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013322#include <sys/types.h>
13323#include <netdb.h>
13324#include <string.h>
13325#include <sys/socket.h>
13326#include <netinet/in.h>
13327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013328int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013329{
13330 int passive, gaierr, inet4 = 0, inet6 = 0;
13331 struct addrinfo hints, *ai, *aitop;
13332 char straddr[INET6_ADDRSTRLEN], strport[16];
13333
13334 for (passive = 0; passive <= 1; passive++) {
13335 memset(&hints, 0, sizeof(hints));
13336 hints.ai_family = AF_UNSPEC;
13337 hints.ai_flags = passive ? AI_PASSIVE : 0;
13338 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013339 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013340 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13341 (void)gai_strerror(gaierr);
13342 goto bad;
13343 }
13344 for (ai = aitop; ai; ai = ai->ai_next) {
13345 if (ai->ai_addr == NULL ||
13346 ai->ai_addrlen == 0 ||
13347 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13348 straddr, sizeof(straddr), strport, sizeof(strport),
13349 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13350 goto bad;
13351 }
13352 switch (ai->ai_family) {
13353 case AF_INET:
13354 if (strcmp(strport, "54321") != 0) {
13355 goto bad;
13356 }
13357 if (passive) {
13358 if (strcmp(straddr, "0.0.0.0") != 0) {
13359 goto bad;
13360 }
13361 } else {
13362 if (strcmp(straddr, "127.0.0.1") != 0) {
13363 goto bad;
13364 }
13365 }
13366 inet4++;
13367 break;
13368 case AF_INET6:
13369 if (strcmp(strport, "54321") != 0) {
13370 goto bad;
13371 }
13372 if (passive) {
13373 if (strcmp(straddr, "::") != 0) {
13374 goto bad;
13375 }
13376 } else {
13377 if (strcmp(straddr, "::1") != 0) {
13378 goto bad;
13379 }
13380 }
13381 inet6++;
13382 break;
13383 case AF_UNSPEC:
13384 goto bad;
13385 break;
13386 default:
13387 /* another family support? */
13388 break;
13389 }
13390 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013391 freeaddrinfo(aitop);
13392 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013393 }
13394
13395 if (!(inet4 == 0 || inet4 == 2))
13396 goto bad;
13397 if (!(inet6 == 0 || inet6 == 2))
13398 goto bad;
13399
13400 if (aitop)
13401 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013403
13404 bad:
13405 if (aitop)
13406 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013407 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013408}
13409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013411if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013412 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013413else
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13417 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013420fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013421
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13425$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13426
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013427if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013428then
13429 if test $ipv6 = yes
13430 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013431 echo 'Fatal: You must get working getaddrinfo() function.'
13432 echo ' or you can specify "--disable-ipv6"'.
13433 exit 1
13434 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013435else
Martin v. Löwis11437992002-04-12 09:54:03 +000013436
Matthias Kloseb9621712010-04-24 17:59:49 +000013437$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013438
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013439fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013440
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013441for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013442do :
13443 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013444if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013446#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013447_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013448
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013449fi
13450done
13451
Michael W. Hudson54241132001-12-07 15:38:26 +000013452
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013453# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13455$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013456if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013457 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013458else
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013460/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013461#include <sys/types.h>
13462#include <sys/time.h>
13463#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
Martin v. Löwis11437992002-04-12 09:54:03 +000013465int
13466main ()
13467{
13468if ((struct tm *) 0)
13469return 0;
13470 ;
13471 return 0;
13472}
13473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013474if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013475 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013476else
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13482$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013483if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486
13487fi
13488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13490$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013491if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013493else
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013495/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013496#include <sys/types.h>
13497#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013498
Martin v. Löwis11437992002-04-12 09:54:03 +000013499int
13500main ()
13501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013502struct tm tm;
13503 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 ;
13506 return 0;
13507}
13508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013509if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013510 ac_cv_struct_tm=time.h
13511else
Matthias Kloseb9621712010-04-24 17:59:49 +000013512 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13517$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013518if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521
13522fi
13523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524ac_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 +000013525#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527"
Victor Stinnere0be4232011-10-25 13:06:09 +020013528if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013529
13530cat >>confdefs.h <<_ACEOF
13531#define HAVE_STRUCT_TM_TM_ZONE 1
13532_ACEOF
13533
13534
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013535fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013536
Martin v. Löwis11437992002-04-12 09:54:03 +000013537if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13538
Matthias Kloseb9621712010-04-24 17:59:49 +000013539$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013540
13541else
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13543"
Victor Stinnere0be4232011-10-25 13:06:09 +020013544if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548fi
13549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013550cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013551#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013552_ACEOF
13553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13555$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013556if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558else
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013560/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013561#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013562#if !HAVE_DECL_TZNAME
13563extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
Martin v. Löwis11437992002-04-12 09:54:03 +000013566int
13567main ()
13568{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 ;
13571 return 0;
13572}
13573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013574if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575 ac_cv_var_tzname=yes
13576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013579rm -f core conftest.err conftest.$ac_objext \
13580 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13583$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013584 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013587
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588 fi
13589fi
13590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591ac_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 +020013592if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
13594cat >>confdefs.h <<_ACEOF
13595#define HAVE_STRUCT_STAT_ST_RDEV 1
13596_ACEOF
13597
13598
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013599fi
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601ac_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 +020013602if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604cat >>confdefs.h <<_ACEOF
13605#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13606_ACEOF
13607
13608
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013609fi
13610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611ac_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 +020013612if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013613
13614cat >>confdefs.h <<_ACEOF
13615#define HAVE_STRUCT_STAT_ST_FLAGS 1
13616_ACEOF
13617
13618
13619fi
13620
Matthias Kloseb9621712010-04-24 17:59:49 +000013621ac_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 +020013622if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013623
13624cat >>confdefs.h <<_ACEOF
13625#define HAVE_STRUCT_STAT_ST_GEN 1
13626_ACEOF
13627
13628
13629fi
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631ac_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 +020013632if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013633
13634cat >>confdefs.h <<_ACEOF
13635#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13636_ACEOF
13637
13638
13639fi
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641ac_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 +020013642if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013643
Martin v. Löwis11437992002-04-12 09:54:03 +000013644cat >>confdefs.h <<_ACEOF
13645#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13646_ACEOF
13647
13648
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013649fi
13650
Stefan Krah267b6392016-04-26 01:09:18 +020013651ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13652 #include <sys/types.h>
13653 #include <pwd.h>
13654
13655"
13656if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13657
13658cat >>confdefs.h <<_ACEOF
13659#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13660_ACEOF
13661
13662
13663fi
13664ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13665 #include <sys/types.h>
13666 #include <pwd.h>
13667
13668"
13669if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13670
13671cat >>confdefs.h <<_ACEOF
13672#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13673_ACEOF
13674
13675
13676fi
13677
Zachary Ware6a6967e2016-10-01 00:47:27 -050013678# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13679ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13680"
13681if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13682
13683cat >>confdefs.h <<_ACEOF
13684#define HAVE_SIGINFO_T_SI_BAND 1
13685_ACEOF
13686
13687
13688fi
13689
Michael W. Hudson54241132001-12-07 15:38:26 +000013690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13692$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013693if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013695else
Matthias Kloseb159a552010-04-25 21:00:44 +000013696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013698/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013699#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013700int
13701main ()
13702{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013703return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 ;
13705 return 0;
13706}
13707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013708if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013709 ac_cv_header_time_altzone=yes
13710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013715fi
13716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13718$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013719if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013722
13723fi
13724
Guido van Rossumda88dad1995-01-26 00:46:29 +000013725was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13727$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013729/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013730
13731#include <sys/types.h>
13732#include <sys/select.h>
13733#include <sys/time.h>
13734
Martin v. Löwis11437992002-04-12 09:54:03 +000013735int
13736main ()
13737{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738;
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 ;
13740 return 0;
13741}
13742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013743if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
13745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013748 was_it_defined=yes
13749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13753$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13756$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013757if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013759else
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013761/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013762#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013763int
13764main ()
13765{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013766struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 ;
13768 return 0;
13769}
13770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013771if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013772 ac_cv_struct_addrinfo=yes
13773else
Matthias Kloseb9621712010-04-24 17:59:49 +000013774 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13777fi
13778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13780$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013781if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013784
13785fi
13786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13788$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013789if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013791else
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013793/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013794
13795# include <sys/types.h>
13796# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013797int
13798main ()
13799{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013800struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 ;
13802 return 0;
13803}
13804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013805if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013806 ac_cv_struct_sockaddr_storage=yes
13807else
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13811fi
13812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13814$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013815if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013818
13819fi
13820
Christian Heimesdffa3942016-09-05 23:54:41 +020013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13822$as_echo_n "checking for sockaddr_alg... " >&6; }
13823if ${ac_cv_struct_sockaddr_alg+:} false; then :
13824 $as_echo_n "(cached) " >&6
13825else
13826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13827/* end confdefs.h. */
13828
13829# include <sys/types.h>
13830# include <sys/socket.h>
13831# include <linux/if_alg.h>
13832int
13833main ()
13834{
13835struct sockaddr_alg s
13836 ;
13837 return 0;
13838}
13839_ACEOF
13840if ac_fn_c_try_compile "$LINENO"; then :
13841 ac_cv_struct_sockaddr_alg=yes
13842else
13843 ac_cv_struct_sockaddr_alg=no
13844fi
13845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13846fi
13847
13848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13849$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13850if test $ac_cv_struct_sockaddr_alg = yes; then
13851
13852$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13853
13854fi
13855
Guido van Rossum627b2d71993-12-24 10:39:16 +000013856# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13859$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013860if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013862else
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013865$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013866int
13867main ()
13868{
13869static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013870test_array [0] = 0;
13871return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013872
13873 ;
13874 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013875}
Martin v. Löwis11437992002-04-12 09:54:03 +000013876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013877if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013878 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013879else
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13885$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013886if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888
13889fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13892$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013893if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013897/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013898
Martin v. Löwis11437992002-04-12 09:54:03 +000013899int
13900main ()
13901{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013902
Martin v. Löwis11437992002-04-12 09:54:03 +000013903#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013904 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013906 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908 char const *const *pcpcc;
13909 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 /* NEC SVR4.0.2 mips cc rejects this. */
13911 struct point {int x, y;};
13912 static struct point const zero = {0,0};
13913 /* AIX XL C 1.02.0.0 rejects this.
13914 It does not let you subtract one const X* pointer from another in
13915 an arm of an if-expression whose if-part is not a constant
13916 expression */
13917 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920 ++pcpcc;
13921 ppc = (char**) pcpcc;
13922 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013923 { /* SCO 3.2v4 cc rejects this sort of thing. */
13924 char tx;
13925 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013927
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 }
13931 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13932 int x[] = {25, 17};
13933 const int *foo = &x[0];
13934 ++foo;
13935 }
13936 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13937 typedef const int *iptr;
13938 iptr p = 0;
13939 ++p;
13940 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013941 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013943 struct s { int j; const int *ap[3]; } bx;
13944 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 }
13946 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13947 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013951#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013952
Martin v. Löwis11437992002-04-12 09:54:03 +000013953 ;
13954 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013955}
Martin v. Löwis11437992002-04-12 09:54:03 +000013956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013958 ac_cv_c_const=yes
13959else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13965$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013966if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013969
13970fi
13971
Michael W. Hudson54241132001-12-07 15:38:26 +000013972
Guido van Rossumda88dad1995-01-26 00:46:29 +000013973works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13975$as_echo_n "checking for working signed char... " >&6; }
13976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013977/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013978
Martin v. Löwis11437992002-04-12 09:54:03 +000013979int
13980main ()
13981{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013982signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ;
13984 return 0;
13985}
13986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013987if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013988 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013989else
Skip Montanaro6dead952003-09-25 14:50:04 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013992
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013993
Guido van Rossum7f43da71994-08-01 12:15:30 +000013994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13997$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013998
Guido van Rossumda88dad1995-01-26 00:46:29 +000013999have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14001$as_echo_n "checking for prototypes... " >&6; }
14002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014003/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014004int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014005int
14006main ()
14007{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014008return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014009 ;
14010 return 0;
14011}
14012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014016
Matthias Kloseb159a552010-04-25 21:00:44 +000014017 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14021$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014022
Guido van Rossumda88dad1995-01-26 00:46:29 +000014023works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14025$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014027/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014028
14029#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014030int foo(int x, ...) {
14031 va_list va;
14032 va_start(va, x);
14033 va_arg(va, int);
14034 va_arg(va, char *);
14035 va_arg(va, double);
14036 return 0;
14037}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039int
14040main ()
14041{
Guido van Rossum90eea071996-08-30 20:58:57 +000014042return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014043 ;
14044 return 0;
14045}
14046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014048
14049
Matthias Kloseb9621712010-04-24 17:59:49 +000014050$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014051
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014052 works=yes
14053
Guido van Rossum627b2d71993-12-24 10:39:16 +000014054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14057$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014058
Martin v. Löwisd6320502004-08-12 13:45:08 +000014059# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14061$as_echo_n "checking for socketpair... " >&6; }
14062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014063/* end confdefs.h. */
14064
14065#include <sys/types.h>
14066#include <sys/socket.h>
14067
14068int
14069main ()
14070{
14071void *x=socketpair
14072 ;
14073 return 0;
14074}
14075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014079
Matthias Kloseb159a552010-04-25 21:00:44 +000014080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014081$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014082else
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14084$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014085
14086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014088
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014089# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14091$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014093/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014094#include <sys/types.h>
14095#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014096int
14097main ()
14098{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014099struct sockaddr x;
14100x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 ;
14102 return 0;
14103}
14104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014105if ac_fn_c_try_compile "$LINENO"; then :
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14107$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014108
Matthias Kloseb9621712010-04-24 17:59:49 +000014109$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014110
14111else
Matthias Kloseb9621712010-04-24 17:59:49 +000014112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14113$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014114
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014117
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014118# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014119
14120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014122if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014123
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014125
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14127$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014128 OLD_CFLAGS=$CFLAGS
14129 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014131/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014132
14133# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014134
Martin v. Löwis11437992002-04-12 09:54:03 +000014135int
14136main ()
14137{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014138
14139 char *name;
14140 struct hostent *he, *res;
14141 char buffer[2048];
14142 int buflen = 2048;
14143 int h_errnop;
14144
14145 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014146
14147 ;
14148 return 0;
14149}
14150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014154
Martin v. Löwis11437992002-04-12 09:54:03 +000014155
Matthias Kloseb9621712010-04-24 17:59:49 +000014156$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014157
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14159$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014160
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014161else
Skip Montanaro6dead952003-09-25 14:50:04 +000014162
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14164$as_echo "no" >&6; }
14165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14166$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014168/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014169
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014170# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
Martin v. Löwis11437992002-04-12 09:54:03 +000014172int
14173main ()
14174{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014175
14176 char *name;
14177 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014178 char buffer[2048];
14179 int buflen = 2048;
14180 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014181
Matthias Kloseb159a552010-04-25 21:00:44 +000014182 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
14184 ;
14185 return 0;
14186}
14187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014191
Martin v. Löwis11437992002-04-12 09:54:03 +000014192
Matthias Kloseb159a552010-04-25 21:00:44 +000014193$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014194
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14196$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014197
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014198else
Skip Montanaro6dead952003-09-25 14:50:04 +000014199
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14201$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14203$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14205/* end confdefs.h. */
14206
14207# include <netdb.h>
14208
14209int
14210main ()
14211{
14212
14213 char *name;
14214 struct hostent *he;
14215 struct hostent_data data;
14216
14217 (void) gethostbyname_r(name, he, &data);
14218
14219 ;
14220 return 0;
14221}
14222_ACEOF
14223if ac_fn_c_try_compile "$LINENO"; then :
14224
14225 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14226
14227
14228$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14229
14230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14231$as_echo "yes" >&6; }
14232
14233else
14234
14235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14236$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014237
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014243
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014246 CFLAGS=$OLD_CFLAGS
14247
14248else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014249
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 for ac_func in gethostbyname
14251do :
14252 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014253if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014255#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014256_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014257
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014258fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014259done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014260
Michael W. Hudson54241132001-12-07 15:38:26 +000014261
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014262fi
14263
Michael W. Hudson54241132001-12-07 15:38:26 +000014264
14265
14266
14267
14268
14269
Guido van Rossum627b2d71993-12-24 10:39:16 +000014270# checks for system services
14271# (none yet)
14272
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014273# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014274ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014275if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014276
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014277else
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14279$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014280if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014282else
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014284LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014286/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288/* Override any GCC internal prototype to avoid an error.
14289 Use char because int might match the return type of a GCC
14290 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014291#ifdef __cplusplus
14292extern "C"
14293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014294char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014295int
14296main ()
14297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014298return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014299 ;
14300 return 0;
14301}
14302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014303if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014304 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014305else
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014308rm -f core conftest.err conftest.$ac_objext \
14309 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014310LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14313$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014314if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014315 cat >>confdefs.h <<_ACEOF
14316#define HAVE_LIBIEEE 1
14317_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014318
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014319 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014320
Guido van Rossum627b2d71993-12-24 10:39:16 +000014321fi
14322
Michael W. Hudson54241132001-12-07 15:38:26 +000014323
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014324fi
14325
Michael W. Hudson54241132001-12-07 15:38:26 +000014326
Guido van Rossum7f43da71994-08-01 12:15:30 +000014327# check for --with-libm=...
14328
Guido van Rossum563e7081996-09-10 18:20:48 +000014329case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014330Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014331*) LIBM=-lm
14332esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14334$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014337if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014339if test "$withval" = no
14340then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14342$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014343elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014344then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14346$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014347else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014348fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014349else
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14351$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352fi
14353
Guido van Rossum7f43da71994-08-01 12:15:30 +000014354
14355# check for --with-libc=...
14356
Matthias Kloseb9621712010-04-24 17:59:49 +000014357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14358$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014360# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014361if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014362 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014363if test "$withval" = no
14364then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14366$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014367elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014368then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14370$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014371else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014372fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014373else
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14375$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376fi
14377
Guido van Rossum7f43da71994-08-01 12:15:30 +000014378
Stefan Krah1919b7e2012-03-21 18:25:23 +010014379# **************************************
14380# * Check for gcc x64 inline assembler *
14381# **************************************
14382
14383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14384$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14386/* end confdefs.h. */
14387
14388int
14389main ()
14390{
14391
14392 __asm__ __volatile__ ("movq %rcx, %rax");
14393
14394 ;
14395 return 0;
14396}
14397_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014398if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014399 have_gcc_asm_for_x64=yes
14400else
14401 have_gcc_asm_for_x64=no
14402fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014403rm -f core conftest.err conftest.$ac_objext \
14404 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14406$as_echo "$have_gcc_asm_for_x64" >&6; }
14407if test "$have_gcc_asm_for_x64" = yes
14408then
14409
14410$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14411
14412fi
14413
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014414# **************************************************
14415# * Check for various properties of floating point *
14416# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014417
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14419$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14420if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014422else
14423
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014424
14425ax_cv_c_float_words_bigendian=unknown
14426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014427/* end confdefs.h. */
14428
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014429
14430double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14431
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014432
14433_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014434if ac_fn_c_try_compile "$LINENO"; then :
14435
14436
Arnon Yaari5dd83602020-04-01 18:19:09 +030014437if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014438 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014439fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014440if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014441 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14442 ax_cv_c_float_words_bigendian=no
14443 else
14444 ax_cv_c_float_words_bigendian=unknown
14445 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014446fi
14447
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014448
14449fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014451fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14453$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014454
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014455case $ax_cv_c_float_words_bigendian in
14456 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014457
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014458$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14459 ;;
14460 no)
14461 ;;
14462 *)
14463 as_fn_error $? "
14464
14465Unknown float word ordering. You need to manually preset
14466ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14467
14468 " "$LINENO" 5 ;;
14469esac
14470
14471
14472if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014473then
14474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014476
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014477elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014478then
14479
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014480$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14481
14482else
14483 # Some ARM platforms use a mixed-endian representation for doubles.
14484 # While Python doesn't currently have full support for these platforms
14485 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14486 # conversions work.
14487 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14488 # or little, then it must be this?
14489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014491
14492fi
14493
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014494# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014495# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014496# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014497# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014498# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014499# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014500
14501# This inline assembler syntax may also work for suncc and icc,
14502# so we try it on all platforms.
14503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14505$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014507/* end confdefs.h. */
14508
14509int
14510main ()
14511{
14512
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014513 unsigned short cw;
14514 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14515 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014516
14517 ;
14518 return 0;
14519}
14520_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014521if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014522 have_gcc_asm_for_x87=yes
14523else
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014525fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014526rm -f core conftest.err conftest.$ac_objext \
14527 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14529$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014530if test "$have_gcc_asm_for_x87" = yes
14531then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014532
Matthias Kloseb9621712010-04-24 17:59:49 +000014533$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014534
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014536
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14538$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14540/* end confdefs.h. */
14541
14542int
14543main ()
14544{
14545
14546 unsigned int fpcr;
14547 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14548 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14549
14550 ;
14551 return 0;
14552}
14553_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014554if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014555 have_gcc_asm_for_mc68881=yes
14556else
14557 have_gcc_asm_for_mc68881=no
14558fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014559rm -f core conftest.err conftest.$ac_objext \
14560 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14562$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14563if test "$have_gcc_asm_for_mc68881" = yes
14564then
14565
14566$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14567
14568fi
14569
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014570# Detect whether system arithmetic is subject to x87-style double
14571# rounding issues. The result of this test has little meaning on non
14572# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14573# mode is round-to-nearest and double rounding issues are present, and
14574# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14576$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014577# $BASECFLAGS may affect the result
14578ac_save_cc="$CC"
14579CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014580if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014581 ac_cv_x87_double_rounding=no
14582else
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014584/* end confdefs.h. */
14585
14586#include <stdlib.h>
14587#include <math.h>
14588int main() {
14589 volatile double x, y, z;
14590 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14591 x = 0.99999999999999989; /* 1-2**-53 */
14592 y = 1./x;
14593 if (y != 1.)
14594 exit(0);
14595 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14596 x = 1e16;
14597 y = 2.99999;
14598 z = x + y;
14599 if (z != 1e16+4.)
14600 exit(0);
14601 /* both tests show evidence of double rounding */
14602 exit(1);
14603}
14604
14605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014606if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014607 ac_cv_x87_double_rounding=no
14608else
Matthias Kloseb9621712010-04-24 17:59:49 +000014609 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14612 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014613fi
14614
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014615CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14617$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014618if test "$ac_cv_x87_double_rounding" = yes
14619then
14620
Matthias Kloseb9621712010-04-24 17:59:49 +000014621$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014622
14623fi
14624
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014625# ************************************
14626# * Check for mathematical functions *
14627# ************************************
14628
14629LIBS_SAVE=$LIBS
14630LIBS="$LIBS $LIBM"
14631
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014632for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14633do :
14634 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14635ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014636if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014637 cat >>confdefs.h <<_ACEOF
14638#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14639_ACEOF
14640
14641fi
14642done
14643
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014644for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014645do :
14646 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14647ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014648if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014649 cat >>confdefs.h <<_ACEOF
14650#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14651_ACEOF
14652
14653fi
14654done
14655
14656ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14657"
Victor Stinnere0be4232011-10-25 13:06:09 +020014658if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014659 ac_have_decl=1
14660else
14661 ac_have_decl=0
14662fi
14663
14664cat >>confdefs.h <<_ACEOF
14665#define HAVE_DECL_ISINF $ac_have_decl
14666_ACEOF
14667ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14668"
Victor Stinnere0be4232011-10-25 13:06:09 +020014669if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014670 ac_have_decl=1
14671else
14672 ac_have_decl=0
14673fi
14674
14675cat >>confdefs.h <<_ACEOF
14676#define HAVE_DECL_ISNAN $ac_have_decl
14677_ACEOF
14678ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14679"
Victor Stinnere0be4232011-10-25 13:06:09 +020014680if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014681 ac_have_decl=1
14682else
14683 ac_have_decl=0
14684fi
14685
14686cat >>confdefs.h <<_ACEOF
14687#define HAVE_DECL_ISFINITE $ac_have_decl
14688_ACEOF
14689
14690
Mark Dickinsona614f042009-11-28 12:48:43 +000014691# For multiprocessing module, check that sem_open
14692# actually works. For FreeBSD versions <= 7.2,
14693# the kernel module that provides POSIX semaphores
14694# isn't loaded by default, so an attempt to call
14695# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14697$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014698if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014700else
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014702 ac_cv_posix_semaphores_enabled=yes
14703else
Matthias Kloseb9621712010-04-24 17:59:49 +000014704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014705/* end confdefs.h. */
14706
14707#include <unistd.h>
14708#include <fcntl.h>
14709#include <stdio.h>
14710#include <semaphore.h>
14711#include <sys/stat.h>
14712
14713int main(void) {
14714 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14715 if (a == SEM_FAILED) {
14716 perror("sem_open");
14717 return 1;
14718 }
14719 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014720 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014721 return 0;
14722}
14723
14724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014725if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014726 ac_cv_posix_semaphores_enabled=yes
14727else
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014732fi
14733
14734
Mark Dickinsona614f042009-11-28 12:48:43 +000014735fi
14736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14738$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014739if test $ac_cv_posix_semaphores_enabled = no
14740then
14741
Matthias Kloseb9621712010-04-24 17:59:49 +000014742$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014743
14744fi
14745
Mark Dickinson10683072009-04-18 21:18:19 +000014746# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14748$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014749if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014751else
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014753 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014754else
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014756/* end confdefs.h. */
14757
14758#include <unistd.h>
14759#include <fcntl.h>
14760#include <stdio.h>
14761#include <semaphore.h>
14762#include <sys/stat.h>
14763
14764int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014765 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014766 int count;
14767 int res;
14768 if(a==SEM_FAILED){
14769 perror("sem_open");
14770 return 1;
14771
14772 }
14773 res = sem_getvalue(a, &count);
14774 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014775 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014776 return res==-1 ? 1 : 0;
14777}
14778
Mark Dickinson10683072009-04-18 21:18:19 +000014779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014780if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014781 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014782else
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014787fi
14788
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014789
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014790fi
14791
Matthias Kloseb9621712010-04-24 17:59:49 +000014792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14793$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014794if test $ac_cv_broken_sem_getvalue = yes
14795then
14796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014798
14799fi
14800
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014801ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14802"
14803if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14804 ac_have_decl=1
14805else
14806 ac_have_decl=0
14807fi
14808
14809cat >>confdefs.h <<_ACEOF
14810#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14811_ACEOF
14812ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14813"
14814if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14815 ac_have_decl=1
14816else
14817 ac_have_decl=0
14818fi
14819
14820cat >>confdefs.h <<_ACEOF
14821#define HAVE_DECL_RTLD_NOW $ac_have_decl
14822_ACEOF
14823ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14824"
14825if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14826 ac_have_decl=1
14827else
14828 ac_have_decl=0
14829fi
14830
14831cat >>confdefs.h <<_ACEOF
14832#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14833_ACEOF
14834ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14835"
14836if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14837 ac_have_decl=1
14838else
14839 ac_have_decl=0
14840fi
14841
14842cat >>confdefs.h <<_ACEOF
14843#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14844_ACEOF
14845ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14846"
14847if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14848 ac_have_decl=1
14849else
14850 ac_have_decl=0
14851fi
14852
14853cat >>confdefs.h <<_ACEOF
14854#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14855_ACEOF
14856ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14857"
14858if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14859 ac_have_decl=1
14860else
14861 ac_have_decl=0
14862fi
14863
14864cat >>confdefs.h <<_ACEOF
14865#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14866_ACEOF
14867ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14868"
14869if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14870 ac_have_decl=1
14871else
14872 ac_have_decl=0
14873fi
14874
14875cat >>confdefs.h <<_ACEOF
14876#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14877_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014878ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14879"
14880if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14881 ac_have_decl=1
14882else
14883 ac_have_decl=0
14884fi
14885
14886cat >>confdefs.h <<_ACEOF
14887#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14888_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014889
14890
Mark Dickinsonbd792642009-03-18 20:06:12 +000014891# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14893$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014894# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014895if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014896 enableval=$enable_big_digits; case $enable_big_digits in
14897yes)
14898 enable_big_digits=30 ;;
14899no)
14900 enable_big_digits=15 ;;
1490115|30)
14902 ;;
14903*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014904 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 +000014905esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14907$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014908
14909cat >>confdefs.h <<_ACEOF
14910#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14911_ACEOF
14912
14913
14914else
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14916$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014917fi
14918
14919
Guido van Rossumef2255b2000-03-10 22:30:29 +000014920# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014921ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014922if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014923
14924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014926
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014927 wchar_h="yes"
14928
Guido van Rossumef2255b2000-03-10 22:30:29 +000014929else
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014931
14932fi
14933
Michael W. Hudson54241132001-12-07 15:38:26 +000014934
Martin v. Löwis11437992002-04-12 09:54:03 +000014935
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014936# determine wchar_t size
14937if test "$wchar_h" = yes
14938then
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14942# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14944$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014945if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014947else
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14949"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014950
Martin v. Löwis11437992002-04-12 09:54:03 +000014951else
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 if test "$ac_cv_type_wchar_t" = yes; then
14953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014955as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014956See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014957 else
14958 ac_cv_sizeof_wchar_t=0
14959 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014961
Martin v. Löwis11437992002-04-12 09:54:03 +000014962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14964$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965
14966
14967
Martin v. Löwis11437992002-04-12 09:54:03 +000014968cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014969#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014970_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014971
Michael W. Hudson54241132001-12-07 15:38:26 +000014972
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014973fi
14974
Matthias Kloseb9621712010-04-24 17:59:49 +000014975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14976$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014977have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014979/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014980
14981#include <tcl.h>
14982#if TCL_UTF_MAX != 6
14983# error "NOT UCS4_TCL"
14984#endif
14985int
14986main ()
14987{
14988
14989 ;
14990 return 0;
14991}
14992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014993if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014994
14995
Matthias Kloseb9621712010-04-24 17:59:49 +000014996$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014997
14998 have_ucs4_tcl=yes
14999
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15003$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015004
Skip Montanaro6dead952003-09-25 14:50:04 +000015005# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015006if test "$wchar_h" = yes
15007then
15008 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15010$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015011 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015013else
15014
Matthias Kloseb9621712010-04-24 17:59:49 +000015015 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015016 ac_cv_wchar_t_signed=yes
15017else
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015019/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015020
15021 #include <wchar.h>
15022 int main()
15023 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015024 /* Success: exit code 0 */
15025 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015026 }
15027
15028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015029if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015030 ac_cv_wchar_t_signed=yes
15031else
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015036fi
15037
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015038fi
15039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15041$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042fi
15043
Michael Osipov3738fad2018-08-24 18:17:19 +020015044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15045$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015046# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015047if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015048 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015049then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015052
Michael Osipov3738fad2018-08-24 18:17:19 +020015053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15054$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015055else
Michael Osipov3738fad2018-08-24 18:17:19 +020015056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15057$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015058fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015059
15060# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15062$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015063if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015065else
Matthias Kloseb9621712010-04-24 17:59:49 +000015066 ac_cv_c_bigendian=unknown
15067 # See if we're dealing with a universal compiler.
15068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15069/* end confdefs.h. */
15070#ifndef __APPLE_CC__
15071 not a universal capable compiler
15072 #endif
15073 typedef int dummy;
15074
Skip Montanaro6dead952003-09-25 14:50:04 +000015075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015076if ac_fn_c_try_compile "$LINENO"; then :
15077
15078 # Check for potential -arch flags. It is not universal unless
15079 # there are at least two -arch flags with different values.
15080 ac_arch=
15081 ac_prev=
15082 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15083 if test -n "$ac_prev"; then
15084 case $ac_word in
15085 i?86 | x86_64 | ppc | ppc64)
15086 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15087 ac_arch=$ac_word
15088 else
15089 ac_cv_c_bigendian=universal
15090 break
15091 fi
15092 ;;
15093 esac
15094 ac_prev=
15095 elif test "x$ac_word" = "x-arch"; then
15096 ac_prev=arch
15097 fi
15098 done
15099fi
15100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15101 if test $ac_cv_c_bigendian = unknown; then
15102 # See if sys/param.h defines the BYTE_ORDER macro.
15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015104/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015105#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015107
Martin v. Löwis11437992002-04-12 09:54:03 +000015108int
15109main ()
15110{
Matthias Kloseb9621712010-04-24 17:59:49 +000015111#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15112 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15113 && LITTLE_ENDIAN)
15114 bogus endian macros
15115 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015116
15117 ;
15118 return 0;
15119}
15120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015121if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015122 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015124/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015125#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127
Martin v. Löwis11437992002-04-12 09:54:03 +000015128int
15129main ()
15130{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015131#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015132 not big endian
15133 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015134
15135 ;
15136 return 0;
15137}
15138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015139if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015140 ac_cv_c_bigendian=yes
15141else
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015145fi
15146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15147 fi
15148 if test $ac_cv_c_bigendian = unknown; then
15149 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015151/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015152#include <limits.h>
15153
Martin v. Löwis11437992002-04-12 09:54:03 +000015154int
15155main ()
15156{
Matthias Kloseb9621712010-04-24 17:59:49 +000015157#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15158 bogus endian macros
15159 #endif
15160
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 ;
15162 return 0;
15163}
15164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015165if ac_fn_c_try_compile "$LINENO"; then :
15166 # It does; now see whether it defined to _BIG_ENDIAN or not.
15167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15168/* end confdefs.h. */
15169#include <limits.h>
15170
15171int
15172main ()
15173{
15174#ifndef _BIG_ENDIAN
15175 not big endian
15176 #endif
15177
15178 ;
15179 return 0;
15180}
15181_ACEOF
15182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015184else
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15188fi
15189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15190 fi
15191 if test $ac_cv_c_bigendian = unknown; then
15192 # Compile a test program.
15193 if test "$cross_compiling" = yes; then :
15194 # Try to guess by grepping values from an object file.
15195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15196/* end confdefs.h. */
15197short int ascii_mm[] =
15198 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15199 short int ascii_ii[] =
15200 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15201 int use_ascii (int i) {
15202 return ascii_mm[i] + ascii_ii[i];
15203 }
15204 short int ebcdic_ii[] =
15205 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15206 short int ebcdic_mm[] =
15207 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15208 int use_ebcdic (int i) {
15209 return ebcdic_mm[i] + ebcdic_ii[i];
15210 }
15211 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212
Matthias Kloseb9621712010-04-24 17:59:49 +000015213int
15214main ()
15215{
15216return use_ascii (foo) == use_ebcdic (foo);
15217 ;
15218 return 0;
15219}
15220_ACEOF
15221if ac_fn_c_try_compile "$LINENO"; then :
15222 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15223 ac_cv_c_bigendian=yes
15224 fi
15225 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15226 if test "$ac_cv_c_bigendian" = unknown; then
15227 ac_cv_c_bigendian=no
15228 else
15229 # finding both strings is unlikely to happen, but who knows?
15230 ac_cv_c_bigendian=unknown
15231 fi
15232 fi
15233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015235else
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015237/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015239int
15240main ()
15241{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 /* Are we little or big endian? From Harbison&Steele. */
15244 union
15245 {
15246 long int l;
15247 char c[sizeof (long int)];
15248 } u;
15249 u.l = 1;
15250 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015251
15252 ;
15253 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015254}
Martin v. Löwis11437992002-04-12 09:54:03 +000015255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015256if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015257 ac_cv_c_bigendian=no
15258else
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15268$as_echo "$ac_cv_c_bigendian" >&6; }
15269 case $ac_cv_c_bigendian in #(
15270 yes)
15271 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15272;; #(
15273 no)
15274 ;; #(
15275 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015276
Matthias Kloseb9621712010-04-24 17:59:49 +000015277$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015278
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 ;; #(
15280 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015281 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015282 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015284
Michael W. Hudson54241132001-12-07 15:38:26 +000015285
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015286# ABI version string for Python extension modules. This appears between the
15287# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15288# from the following attributes which affect the ABI of this Python build (in
15289# this order):
15290#
15291# * The Python implementation (always 'cpython-' for us)
15292# * The major and minor version numbers
15293# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015294#
15295# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015296# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15297# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015298#
15299# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15300# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015301
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15303$as_echo_n "checking ABIFLAGS... " >&6; }
15304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15305$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15307$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015308SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15310$as_echo "$SOABI" >&6; }
15311
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015312# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15313if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015314 # Similar to SOABI but remove "d" flag from ABIFLAGS
15315
15316 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15317
15318cat >>confdefs.h <<_ACEOF
15319#define ALT_SOABI "${ALT_SOABI}"
15320_ACEOF
15321
15322fi
15323
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015324
15325case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015326 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015327 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15328 *)
15329 EXT_SUFFIX=${SHLIB_SUFFIX};;
15330esac
15331
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15333$as_echo_n "checking LDVERSION... " >&6; }
15334LDVERSION='$(VERSION)$(ABIFLAGS)'
15335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15336$as_echo "$LDVERSION" >&6; }
15337
E. M. Brayc994c8f2019-05-24 17:33:47 +020015338# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015339
E. M. Brayb1fc4172019-05-24 18:39:39 +020015340if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015341 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015342else
15343 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015344fi
15345
doko@python.org87421192013-01-26 11:39:31 +010015346
Miss Islington (bot)6cb24a02020-06-09 06:54:54 -070015347
15348BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15349
15350
15351# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015352# /usr/$LIDIRNAME/python$VERSION
15353
15354PLATLIBDIR="lib"
15355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15356$as_echo_n "checking for --with-platlibdir... " >&6; }
15357
15358# Check whether --with-platlibdir was given.
15359if test "${with_platlibdir+set}" = set; then :
15360 withval=$with_platlibdir;
15361# ignore 3 options:
15362# --with-platlibdir
15363# --with-platlibdir=
15364# --without-platlibdir
15365if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15366then
15367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15368$as_echo "yes" >&6; }
15369 PLATLIBDIR="$withval"
Miss Islington (bot)6cb24a02020-06-09 06:54:54 -070015370 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015371else
Victor Stinner8510f432020-03-10 09:53:09 +010015372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15373$as_echo "no" >&6; }
15374fi
15375else
15376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15377$as_echo "no" >&6; }
15378fi
15379
15380
15381
15382
15383if test x$PLATFORM_TRIPLET = x; then
15384 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15385else
15386 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015387fi
doko@python.org87421192013-01-26 11:39:31 +010015388
15389
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015390# Check whether right shifting a negative integer extends the sign bit
15391# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15393$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015394if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015396else
Martin v. Löwis11437992002-04-12 09:54:03 +000015397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015399 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015400else
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015402/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015403
15404int main()
15405{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015406 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015407}
15408
Martin v. Löwis11437992002-04-12 09:54:03 +000015409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015410if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015411 ac_cv_rshift_extends_sign=yes
15412else
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15416 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015417fi
15418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419fi
15420
Matthias Kloseb9621712010-04-24 17:59:49 +000015421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15422$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015423if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015424then
Martin v. Löwis11437992002-04-12 09:54:03 +000015425
Matthias Kloseb9621712010-04-24 17:59:49 +000015426$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015427
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015428fi
15429
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015430# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15432$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015433if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015434 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015435else
Martin v. Löwis11437992002-04-12 09:54:03 +000015436
Matthias Kloseb9621712010-04-24 17:59:49 +000015437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015438/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015439#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015440int
15441main ()
15442{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015443
15444 FILE *f = fopen("/dev/null", "r");
15445 flockfile(f);
15446 getc_unlocked(f);
15447 funlockfile(f);
15448
Martin v. Löwis11437992002-04-12 09:54:03 +000015449 ;
15450 return 0;
15451}
15452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015453if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015454 ac_cv_have_getc_unlocked=yes
15455else
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 ac_cv_have_getc_unlocked=no
15457fi
15458rm -f core conftest.err conftest.$ac_objext \
15459 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461
Matthias Kloseb9621712010-04-24 17:59:49 +000015462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15463$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015464if test "$ac_cv_have_getc_unlocked" = yes
15465then
Martin v. Löwis11437992002-04-12 09:54:03 +000015466
Matthias Kloseb9621712010-04-24 17:59:49 +000015467$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015468
15469fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015470
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015471# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015472# save the value of LIBS so we don't actually link Python with readline
15473LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015474
Gregory P. Smith18820942008-09-07 06:24:49 +000015475# On some systems we need to link readline to a termcap compatible
15476# library. NOTE: Keep the precedence of listed libraries synchronised
15477# with setup.py.
15478py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15480$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015481for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015482 if test -z "$py_libtermcap"; then
15483 READLINE_LIBS="-lreadline"
15484 else
15485 READLINE_LIBS="-lreadline -l$py_libtermcap"
15486 fi
15487 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015489/* end confdefs.h. */
15490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015491/* Override any GCC internal prototype to avoid an error.
15492 Use char because int might match the return type of a GCC
15493 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015494#ifdef __cplusplus
15495extern "C"
15496#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015497char readline ();
15498int
15499main ()
15500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015501return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015502 ;
15503 return 0;
15504}
15505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015506if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015507 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015509rm -f core conftest.err conftest.$ac_objext \
15510 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015511 if test $py_cv_lib_readline = yes; then
15512 break
15513 fi
15514done
15515# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15516#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015517if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15519$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015520else
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15522$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015523
Matthias Kloseb9621712010-04-24 17:59:49 +000015524$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015525
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015526fi
15527
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015528# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015530/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015531#include <readline/readline.h>
15532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015533if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015534 have_readline=yes
15535else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015536 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015537
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015538fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015539rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015540if test $have_readline = yes
15541then
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015543/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015544#include <readline/readline.h>
15545
15546_ACEOF
15547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015551
15552fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015553rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015554
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015556/* end confdefs.h. */
15557#include <readline/readline.h>
15558
15559_ACEOF
15560if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015561 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015562
Matthias Kloseb9621712010-04-24 17:59:49 +000015563$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015564
15565fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015566rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015567
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015568fi
15569
Martin v. Löwis0daad592001-09-30 21:09:59 +000015570# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15572$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015573if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015574 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015575else
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015577LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581/* Override any GCC internal prototype to avoid an error.
15582 Use char because int might match the return type of a GCC
15583 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015584#ifdef __cplusplus
15585extern "C"
15586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015587char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015588int
15589main ()
15590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015592 ;
15593 return 0;
15594}
15595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015596if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015597 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015598else
Matthias Kloseb9621712010-04-24 17:59:49 +000015599 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015601rm -f core conftest.err conftest.$ac_objext \
15602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015603LIBS=$ac_check_lib_save_LIBS
15604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15606$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015607if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015608
Matthias Kloseb9621712010-04-24 17:59:49 +000015609$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015610
Martin v. Löwis0daad592001-09-30 21:09:59 +000015611fi
15612
Michael W. Hudson54241132001-12-07 15:38:26 +000015613
Thomas Wouters89d996e2007-09-08 17:39:28 +000015614# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15616$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015617if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015619else
15620 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015621LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015623/* end confdefs.h. */
15624
15625/* Override any GCC internal prototype to avoid an error.
15626 Use char because int might match the return type of a GCC
15627 builtin and then its argument prototype would still apply. */
15628#ifdef __cplusplus
15629extern "C"
15630#endif
15631char rl_completion_display_matches_hook ();
15632int
15633main ()
15634{
15635return rl_completion_display_matches_hook ();
15636 ;
15637 return 0;
15638}
15639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015640if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015641 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15642else
Matthias Kloseb9621712010-04-24 17:59:49 +000015643 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015645rm -f core conftest.err conftest.$ac_objext \
15646 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015647LIBS=$ac_check_lib_save_LIBS
15648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15650$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015651if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015652
Matthias Kloseb9621712010-04-24 17:59:49 +000015653$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015654
15655fi
15656
15657
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015658# also in 4.0, but not in editline
15659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15660$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15661if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15662 $as_echo_n "(cached) " >&6
15663else
15664 ac_check_lib_save_LIBS=$LIBS
15665LIBS="-lreadline $READLINE_LIBS $LIBS"
15666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15667/* end confdefs.h. */
15668
15669/* Override any GCC internal prototype to avoid an error.
15670 Use char because int might match the return type of a GCC
15671 builtin and then its argument prototype would still apply. */
15672#ifdef __cplusplus
15673extern "C"
15674#endif
15675char rl_resize_terminal ();
15676int
15677main ()
15678{
15679return rl_resize_terminal ();
15680 ;
15681 return 0;
15682}
15683_ACEOF
15684if ac_fn_c_try_link "$LINENO"; then :
15685 ac_cv_lib_readline_rl_resize_terminal=yes
15686else
15687 ac_cv_lib_readline_rl_resize_terminal=no
15688fi
15689rm -f core conftest.err conftest.$ac_objext \
15690 conftest$ac_exeext conftest.$ac_ext
15691LIBS=$ac_check_lib_save_LIBS
15692fi
15693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15694$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15695if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15696
15697$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15698
15699fi
15700
15701
Martin v. Löwis0daad592001-09-30 21:09:59 +000015702# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15704$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015705if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015706 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015707else
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015709LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713/* Override any GCC internal prototype to avoid an error.
15714 Use char because int might match the return type of a GCC
15715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015716#ifdef __cplusplus
15717extern "C"
15718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015719char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015720int
15721main ()
15722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 ;
15725 return 0;
15726}
15727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015730else
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015733rm -f core conftest.err conftest.$ac_objext \
15734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015735LIBS=$ac_check_lib_save_LIBS
15736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15738$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015739if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015740
Matthias Kloseb9621712010-04-24 17:59:49 +000015741$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015742
Guido van Rossum353ae582001-07-10 16:45:32 +000015743fi
15744
Jack Jansendd19cf82001-12-06 22:36:17 +000015745
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015746# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015748/* end confdefs.h. */
15749#include <readline/readline.h>
15750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015751if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015752 have_readline=yes
15753else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015754 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015755
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015756fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015757rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015758if test $have_readline = yes
15759then
Matthias Kloseb9621712010-04-24 17:59:49 +000015760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015761/* end confdefs.h. */
15762#include <readline/readline.h>
15763
15764_ACEOF
15765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015766 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015767
Matthias Kloseb9621712010-04-24 17:59:49 +000015768$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015769
15770fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015771rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015772
15773fi
15774
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15776$as_echo_n "checking for append_history in -lreadline... " >&6; }
15777if ${ac_cv_lib_readline_append_history+:} false; then :
15778 $as_echo_n "(cached) " >&6
15779else
15780 ac_check_lib_save_LIBS=$LIBS
15781LIBS="-lreadline $READLINE_LIBS $LIBS"
15782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15783/* end confdefs.h. */
15784
15785/* Override any GCC internal prototype to avoid an error.
15786 Use char because int might match the return type of a GCC
15787 builtin and then its argument prototype would still apply. */
15788#ifdef __cplusplus
15789extern "C"
15790#endif
15791char append_history ();
15792int
15793main ()
15794{
15795return append_history ();
15796 ;
15797 return 0;
15798}
15799_ACEOF
15800if ac_fn_c_try_link "$LINENO"; then :
15801 ac_cv_lib_readline_append_history=yes
15802else
15803 ac_cv_lib_readline_append_history=no
15804fi
15805rm -f core conftest.err conftest.$ac_objext \
15806 conftest$ac_exeext conftest.$ac_ext
15807LIBS=$ac_check_lib_save_LIBS
15808fi
15809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15810$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15811if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15812
15813$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15814
15815fi
15816
15817
Martin v. Löwis82bca632006-02-10 20:49:30 +000015818# End of readline checks: restore LIBS
15819LIBS=$LIBS_no_readline
15820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15822$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015823if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015824 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015825else
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015828 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015829else
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015831/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015832
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015833#include <stdlib.h>
15834#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015835int main()
15836{
15837 int val1 = nice(1);
15838 if (val1 != -1 && val1 == nice(2))
15839 exit(0);
15840 exit(1);
15841}
15842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015844if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015845 ac_cv_broken_nice=yes
15846else
Matthias Kloseb9621712010-04-24 17:59:49 +000015847 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015851fi
15852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015853fi
15854
Matthias Kloseb9621712010-04-24 17:59:49 +000015855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15856$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015857if test "$ac_cv_broken_nice" = yes
15858then
Martin v. Löwis11437992002-04-12 09:54:03 +000015859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015861
15862fi
15863
Matthias Kloseb9621712010-04-24 17:59:49 +000015864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15865$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015866if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015868else
Matthias Kloseb9621712010-04-24 17:59:49 +000015869 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015870 ac_cv_broken_poll=no
15871else
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015873/* end confdefs.h. */
15874
15875#include <poll.h>
15876
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015877int main()
15878{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015879 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015880 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015881
15882 close (42);
15883
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015884 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015885 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015886 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015887 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015888 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015889 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015890 return 1;
15891}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015892
15893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015894if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015895 ac_cv_broken_poll=yes
15896else
Matthias Kloseb9621712010-04-24 17:59:49 +000015897 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15900 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015902
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015903fi
15904
Matthias Kloseb9621712010-04-24 17:59:49 +000015905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15906$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015907if test "$ac_cv_broken_poll" = yes
15908then
15909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015911
15912fi
15913
Martin v. Löwis1d459062005-03-14 21:23:33 +000015914# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15916$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015917if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015918 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015919else
15920
Matthias Kloseb9621712010-04-24 17:59:49 +000015921if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015922 ac_cv_working_tzset=no
15923else
Matthias Kloseb9621712010-04-24 17:59:49 +000015924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015925/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015926
15927#include <stdlib.h>
15928#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015929#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015930
15931#if HAVE_TZNAME
15932extern char *tzname[];
15933#endif
15934
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015935int main()
15936{
Brett Cannon18367812003-09-19 00:59:16 +000015937 /* Note that we need to ensure that not only does tzset(3)
15938 do 'something' with localtime, but it works as documented
15939 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015940 This includes making sure that tzname is set properly if
15941 tm->tm_zone does not exist since it is the alternative way
15942 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015943
15944 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015945 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015946 */
15947
Martin v. Löwis1d459062005-03-14 21:23:33 +000015948 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015949 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15950
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015951 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015952 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015953 if (localtime(&groundhogday)->tm_hour != 0)
15954 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015955#if HAVE_TZNAME
15956 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15957 if (strcmp(tzname[0], "UTC") ||
15958 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15959 exit(1);
15960#endif
Brett Cannon18367812003-09-19 00:59:16 +000015961
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015962 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015963 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015964 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015965 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015966#if HAVE_TZNAME
15967 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15968 exit(1);
15969#endif
Brett Cannon18367812003-09-19 00:59:16 +000015970
15971 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15972 tzset();
15973 if (localtime(&groundhogday)->tm_hour != 11)
15974 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015975#if HAVE_TZNAME
15976 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15977 exit(1);
15978#endif
15979
15980#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015981 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15982 exit(1);
15983 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15984 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015985#endif
Brett Cannon18367812003-09-19 00:59:16 +000015986
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015987 exit(0);
15988}
15989
15990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015991if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015992 ac_cv_working_tzset=yes
15993else
Matthias Kloseb9621712010-04-24 17:59:49 +000015994 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015998fi
15999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016000fi
16001
Matthias Kloseb9621712010-04-24 17:59:49 +000016002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16003$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016004if test "$ac_cv_working_tzset" = yes
16005then
16006
Matthias Kloseb9621712010-04-24 17:59:49 +000016007$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016008
16009fi
16010
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016011# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16013$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016014if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016015 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016016else
Matthias Kloseb9621712010-04-24 17:59:49 +000016017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016018/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016019#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016020int
16021main ()
16022{
16023
16024struct stat st;
16025st.st_mtim.tv_nsec = 1;
16026
16027 ;
16028 return 0;
16029}
16030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016032 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016033else
Matthias Kloseb9621712010-04-24 17:59:49 +000016034 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16037fi
16038
Matthias Kloseb9621712010-04-24 17:59:49 +000016039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16040$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016041if test "$ac_cv_stat_tv_nsec" = yes
16042then
16043
Matthias Kloseb9621712010-04-24 17:59:49 +000016044$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016045
16046fi
16047
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016048# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16050$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016051if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016052 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016053else
Matthias Kloseb9621712010-04-24 17:59:49 +000016054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016055/* end confdefs.h. */
16056#include <sys/stat.h>
16057int
16058main ()
16059{
16060
16061struct stat st;
16062st.st_mtimespec.tv_nsec = 1;
16063
16064 ;
16065 return 0;
16066}
16067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016069 ac_cv_stat_tv_nsec2=yes
16070else
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16074fi
16075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16077$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016078if test "$ac_cv_stat_tv_nsec2" = yes
16079then
16080
Matthias Kloseb9621712010-04-24 17:59:49 +000016081$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016082
16083fi
16084
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016085# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016086ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016087if test "$cross_compiling" = no; then
16088 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16089fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016090
16091for ac_header in curses.h ncurses.h
16092do :
16093 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16094ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16095if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16096 cat >>confdefs.h <<_ACEOF
16097#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16098_ACEOF
16099
16100fi
16101
16102done
16103
16104
16105# On Solaris, term.h requires curses.h
16106for ac_header in term.h
16107do :
16108 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16109#ifdef HAVE_CURSES_H
16110#include <curses.h>
16111#endif
16112
16113"
16114if test "x$ac_cv_header_term_h" = xyes; then :
16115 cat >>confdefs.h <<_ACEOF
16116#define HAVE_TERM_H 1
16117_ACEOF
16118
16119fi
16120
16121done
16122
16123
Jack Jansen666b1e72001-10-31 12:11:48 +000016124# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16126$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016127if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016128 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016129else
Matthias Kloseb9621712010-04-24 17:59:49 +000016130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016131/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016132#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016133int
16134main ()
16135{
Jack Jansen666b1e72001-10-31 12:11:48 +000016136
16137 int rtn;
16138 rtn = mvwdelch(0,0,0);
16139
Martin v. Löwis11437992002-04-12 09:54:03 +000016140 ;
16141 return 0;
16142}
16143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016144if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016145 ac_cv_mvwdelch_is_expression=yes
16146else
Matthias Kloseb9621712010-04-24 17:59:49 +000016147 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16150fi
16151
Matthias Kloseb9621712010-04-24 17:59:49 +000016152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16153$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016154
16155if test "$ac_cv_mvwdelch_is_expression" = yes
16156then
Martin v. Löwis11437992002-04-12 09:54:03 +000016157
Matthias Kloseb9621712010-04-24 17:59:49 +000016158$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016159
16160fi
16161
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016162# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16163# structs since version 5.7. If the macro is defined as zero before including
16164# [n]curses.h, ncurses will expose fields of the structs regardless of the
16165# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16167$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016168if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016169 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016170else
Matthias Kloseb9621712010-04-24 17:59:49 +000016171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016172/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016173
16174 #define NCURSES_OPAQUE 0
16175 #include <curses.h>
16176
Martin v. Löwis11437992002-04-12 09:54:03 +000016177int
16178main ()
16179{
Jack Jansen666b1e72001-10-31 12:11:48 +000016180
16181 WINDOW *w;
16182 w->_flags = 0;
16183
Martin v. Löwis11437992002-04-12 09:54:03 +000016184 ;
16185 return 0;
16186}
16187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016188if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016189 ac_cv_window_has_flags=yes
16190else
Matthias Kloseb9621712010-04-24 17:59:49 +000016191 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16194fi
16195
Matthias Kloseb9621712010-04-24 17:59:49 +000016196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16197$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016198
Jack Jansen666b1e72001-10-31 12:11:48 +000016199
16200if test "$ac_cv_window_has_flags" = yes
16201then
Martin v. Löwis11437992002-04-12 09:54:03 +000016202
Matthias Kloseb9621712010-04-24 17:59:49 +000016203$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016204
16205fi
16206
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16208$as_echo_n "checking for is_pad... " >&6; }
16209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16210/* end confdefs.h. */
16211#include <curses.h>
16212int
16213main ()
16214{
16215
16216#ifndef is_pad
16217void *x=is_pad
16218#endif
16219
16220 ;
16221 return 0;
16222}
16223_ACEOF
16224if ac_fn_c_try_compile "$LINENO"; then :
16225
16226$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16227
16228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16229$as_echo "yes" >&6; }
16230else
16231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16232$as_echo "no" >&6; }
16233
16234fi
16235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16236
Matthias Kloseb9621712010-04-24 17:59:49 +000016237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16238$as_echo_n "checking for is_term_resized... " >&6; }
16239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016240/* end confdefs.h. */
16241#include <curses.h>
16242int
16243main ()
16244{
16245void *x=is_term_resized
16246 ;
16247 return 0;
16248}
16249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016250if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016251
Matthias Kloseb9621712010-04-24 17:59:49 +000016252$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016253
Matthias Kloseb159a552010-04-25 21:00:44 +000016254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016255$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016256else
Matthias Kloseb9621712010-04-24 17:59:49 +000016257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16258$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016259
16260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16262
Matthias Kloseb9621712010-04-24 17:59:49 +000016263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16264$as_echo_n "checking for resize_term... " >&6; }
16265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016266/* end confdefs.h. */
16267#include <curses.h>
16268int
16269main ()
16270{
16271void *x=resize_term
16272 ;
16273 return 0;
16274}
16275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016276if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016277
Matthias Kloseb9621712010-04-24 17:59:49 +000016278$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016279
Matthias Kloseb159a552010-04-25 21:00:44 +000016280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016281$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016282else
Matthias Kloseb9621712010-04-24 17:59:49 +000016283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16284$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016285
16286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16288
Matthias Kloseb9621712010-04-24 17:59:49 +000016289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16290$as_echo_n "checking for resizeterm... " >&6; }
16291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016292/* end confdefs.h. */
16293#include <curses.h>
16294int
16295main ()
16296{
16297void *x=resizeterm
16298 ;
16299 return 0;
16300}
16301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016302if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016303
Matthias Kloseb9621712010-04-24 17:59:49 +000016304$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016305
Matthias Kloseb159a552010-04-25 21:00:44 +000016306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016307$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016308else
Matthias Kloseb9621712010-04-24 17:59:49 +000016309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16310$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016311
16312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016314
16315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16316$as_echo_n "checking for immedok... " >&6; }
16317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16318/* end confdefs.h. */
16319#include <curses.h>
16320int
16321main ()
16322{
16323
16324#ifndef immedok
16325void *x=immedok
16326#endif
16327
16328 ;
16329 return 0;
16330}
16331_ACEOF
16332if ac_fn_c_try_compile "$LINENO"; then :
16333
16334$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16335
16336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16337$as_echo "yes" >&6; }
16338else
16339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16340$as_echo "no" >&6; }
16341
16342fi
16343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16344
16345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16346$as_echo_n "checking for syncok... " >&6; }
16347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16348/* end confdefs.h. */
16349#include <curses.h>
16350int
16351main ()
16352{
16353
16354#ifndef syncok
16355void *x=syncok
16356#endif
16357
16358 ;
16359 return 0;
16360}
16361_ACEOF
16362if ac_fn_c_try_compile "$LINENO"; then :
16363
16364$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16365
16366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16367$as_echo "yes" >&6; }
16368else
16369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16370$as_echo "no" >&6; }
16371
16372fi
16373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16374
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16376$as_echo_n "checking for wchgat... " >&6; }
16377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16378/* end confdefs.h. */
16379#include <curses.h>
16380int
16381main ()
16382{
16383
16384#ifndef wchgat
16385void *x=wchgat
16386#endif
16387
16388 ;
16389 return 0;
16390}
16391_ACEOF
16392if ac_fn_c_try_compile "$LINENO"; then :
16393
16394$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16395
16396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16397$as_echo "yes" >&6; }
16398else
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16400$as_echo "no" >&6; }
16401
16402fi
16403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16404
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16406$as_echo_n "checking for filter... " >&6; }
16407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16408/* end confdefs.h. */
16409#include <curses.h>
16410int
16411main ()
16412{
16413
16414#ifndef filter
16415void *x=filter
16416#endif
16417
16418 ;
16419 return 0;
16420}
16421_ACEOF
16422if ac_fn_c_try_compile "$LINENO"; then :
16423
16424$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16425
16426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16427$as_echo "yes" >&6; }
16428else
16429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16430$as_echo "no" >&6; }
16431
16432fi
16433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16434
16435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16436$as_echo_n "checking for has_key... " >&6; }
16437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16438/* end confdefs.h. */
16439#include <curses.h>
16440int
16441main ()
16442{
16443
16444#ifndef has_key
16445void *x=has_key
16446#endif
16447
16448 ;
16449 return 0;
16450}
16451_ACEOF
16452if ac_fn_c_try_compile "$LINENO"; then :
16453
16454$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16455
16456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16457$as_echo "yes" >&6; }
16458else
16459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16460$as_echo "no" >&6; }
16461
16462fi
16463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16464
16465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16466$as_echo_n "checking for typeahead... " >&6; }
16467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16468/* end confdefs.h. */
16469#include <curses.h>
16470int
16471main ()
16472{
16473
16474#ifndef typeahead
16475void *x=typeahead
16476#endif
16477
16478 ;
16479 return 0;
16480}
16481_ACEOF
16482if ac_fn_c_try_compile "$LINENO"; then :
16483
16484$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16485
16486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16487$as_echo "yes" >&6; }
16488else
16489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16490$as_echo "no" >&6; }
16491
16492fi
16493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16494
16495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16496$as_echo_n "checking for use_env... " >&6; }
16497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16498/* end confdefs.h. */
16499#include <curses.h>
16500int
16501main ()
16502{
16503
16504#ifndef use_env
16505void *x=use_env
16506#endif
16507
16508 ;
16509 return 0;
16510}
16511_ACEOF
16512if ac_fn_c_try_compile "$LINENO"; then :
16513
16514$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16515
16516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16517$as_echo "yes" >&6; }
16518else
16519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16520$as_echo "no" >&6; }
16521
16522fi
16523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016524# last curses configure check
16525CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16528$as_echo "$as_me: checking for device files" >&6;}
16529
16530if test "x$cross_compiling" = xyes; then
16531 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16533$as_echo_n "checking for /dev/ptmx... " >&6; }
16534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16535$as_echo "not set" >&6; }
16536 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16537 fi
16538 if test "${ac_cv_file__dev_ptc+set}" != set; then
16539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16540$as_echo_n "checking for /dev/ptc... " >&6; }
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16542$as_echo "not set" >&6; }
16543 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16544 fi
16545fi
16546
Matthias Kloseb9621712010-04-24 17:59:49 +000016547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16548$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016549if ${ac_cv_file__dev_ptmx+:} false; then :
16550 $as_echo_n "(cached) " >&6
16551else
16552 test "$cross_compiling" = yes &&
16553 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16554if test -r "/dev/ptmx"; then
16555 ac_cv_file__dev_ptmx=yes
16556else
16557 ac_cv_file__dev_ptmx=no
16558fi
16559fi
16560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16561$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16562if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016563
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016564fi
16565
16566if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016567
Matthias Kloseb9621712010-04-24 17:59:49 +000016568$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016569
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16572$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016573if ${ac_cv_file__dev_ptc+:} false; then :
16574 $as_echo_n "(cached) " >&6
16575else
16576 test "$cross_compiling" = yes &&
16577 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16578if test -r "/dev/ptc"; then
16579 ac_cv_file__dev_ptc=yes
16580else
16581 ac_cv_file__dev_ptc=no
16582fi
16583fi
16584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16585$as_echo "$ac_cv_file__dev_ptc" >&6; }
16586if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016587
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016588fi
16589
16590if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016591
Matthias Kloseb9621712010-04-24 17:59:49 +000016592$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016593
Neal Norwitz865400f2003-03-21 01:42:58 +000016594fi
16595
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016596if test $ac_sys_system = Darwin
16597then
16598 LIBS="$LIBS -framework CoreFoundation"
16599fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016600
Matthias Kloseb9621712010-04-24 17:59:49 +000016601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16602$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016603if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016604 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016605else
Matthias Kloseb9621712010-04-24 17:59:49 +000016606 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016607 ac_cv_have_size_t_format="cross -- assuming yes"
16608
Thomas Wouters477c8d52006-05-27 19:21:47 +000016609else
Matthias Kloseb9621712010-04-24 17:59:49 +000016610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016611/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016612
Thomas Wouters477c8d52006-05-27 19:21:47 +000016613#include <stdio.h>
16614#include <stddef.h>
16615#include <string.h>
16616
Christian Heimes2c181612007-12-17 20:04:13 +000016617#ifdef HAVE_SYS_TYPES_H
16618#include <sys/types.h>
16619#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016620
16621#ifdef HAVE_SSIZE_T
16622typedef ssize_t Py_ssize_t;
16623#elif SIZEOF_VOID_P == SIZEOF_LONG
16624typedef long Py_ssize_t;
16625#else
16626typedef int Py_ssize_t;
16627#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016628
Christian Heimes2c181612007-12-17 20:04:13 +000016629int main()
16630{
16631 char buffer[256];
16632
Thomas Wouters477c8d52006-05-27 19:21:47 +000016633 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16634 return 1;
16635
Thomas Wouters89f507f2006-12-13 04:49:30 +000016636 if (strcmp(buffer, "123"))
16637 return 1;
16638
16639 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16640 return 1;
16641
16642 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016643 return 1;
16644
16645 return 0;
16646}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016647
Thomas Wouters477c8d52006-05-27 19:21:47 +000016648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016649if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016650 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016651else
Matthias Kloseb9621712010-04-24 17:59:49 +000016652 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016656fi
16657
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16660$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016661if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016662
Matthias Kloseb9621712010-04-24 17:59:49 +000016663$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016664
16665fi
16666
Matthias Kloseb9621712010-04-24 17:59:49 +000016667ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016668#ifdef HAVE_SYS_TYPES_H
16669#include <sys/types.h>
16670#endif
16671#ifdef HAVE_SYS_SOCKET_H
16672#include <sys/socket.h>
16673#endif
16674
Matthias Kloseb9621712010-04-24 17:59:49 +000016675"
Victor Stinnere0be4232011-10-25 13:06:09 +020016676if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016677
Martin v. Löwis11437992002-04-12 09:54:03 +000016678else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016679
Matthias Kloseb9621712010-04-24 17:59:49 +000016680$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016681
16682fi
16683
Michael W. Hudson54241132001-12-07 15:38:26 +000016684
Matthias Kloseb9621712010-04-24 17:59:49 +000016685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16686$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016687if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016688 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016689else
Matthias Kloseb9621712010-04-24 17:59:49 +000016690 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016691 ac_cv_broken_mbstowcs=no
16692else
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016694/* end confdefs.h. */
16695
Stefan Krah19c21392012-11-22 23:47:32 +010016696#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016697#include<stdlib.h>
16698int main() {
16699 size_t len = -1;
16700 const char *str = "text";
16701 len = mbstowcs(NULL, str, 0);
16702 return (len != 4);
16703}
16704
16705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016706if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016707 ac_cv_broken_mbstowcs=no
16708else
Matthias Kloseb9621712010-04-24 17:59:49 +000016709 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16712 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016713fi
16714
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016715fi
16716
Matthias Kloseb9621712010-04-24 17:59:49 +000016717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16718$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016719if test "$ac_cv_broken_mbstowcs" = yes
16720then
16721
Matthias Kloseb9621712010-04-24 17:59:49 +000016722$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016723
16724fi
16725
Antoine Pitroub52ec782009-01-25 16:34:23 +000016726# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16728$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016729
16730# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016731if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016732 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016733if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016734then
16735
Matthias Kloseb9621712010-04-24 17:59:49 +000016736$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016737
Matthias Kloseb9621712010-04-24 17:59:49 +000016738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16739$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016740fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016741if test "$withval" = no
16742then
16743
16744$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16745
Matthias Kloseb9621712010-04-24 17:59:49 +000016746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16747$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016748fi
16749
Antoine Pitrou042b1282010-08-13 21:15:58 +000016750else
16751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16752$as_echo "no value specified" >&6; }
16753fi
16754
Antoine Pitroub52ec782009-01-25 16:34:23 +000016755
Matthias Kloseb17289e2012-03-15 19:51:34 +010016756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16757$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16758if ${ac_cv_computed_gotos+:} false; then :
16759 $as_echo_n "(cached) " >&6
16760else
16761 if test "$cross_compiling" = yes; then :
16762 if test "${with_computed_gotos+set}" = set; then
16763 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16764 else
16765 ac_cv_computed_gotos=no
16766 fi
16767else
16768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16769/* end confdefs.h. */
16770
16771int main(int argc, char **argv)
16772{
16773 static void *targets[1] = { &&LABEL1 };
16774 goto LABEL2;
16775LABEL1:
16776 return 0;
16777LABEL2:
16778 goto *targets[0];
16779 return 1;
16780}
16781
16782_ACEOF
16783if ac_fn_c_try_run "$LINENO"; then :
16784 ac_cv_computed_gotos=yes
16785else
16786 ac_cv_computed_gotos=no
16787fi
16788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16789 conftest.$ac_objext conftest.beam conftest.$ac_ext
16790fi
16791
16792fi
16793
16794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16795$as_echo "$ac_cv_computed_gotos" >&6; }
16796case "$ac_cv_computed_gotos" in yes*)
16797
16798$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16799
16800esac
16801
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016802case $ac_sys_system in
16803AIX*)
16804
16805$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16806 ;;
16807esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016808
Michael W. Hudson54241132001-12-07 15:38:26 +000016809
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016810
16811
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016812for h in `(cd $srcdir;echo Python/thread_*.h)`
16813do
16814 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16815done
16816
Michael W. Hudson54241132001-12-07 15:38:26 +000016817
Pablo Galindoa25f3c42020-04-23 01:38:11 +010016818SRCDIRS="Parser Parser/pegen Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16820$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016821for dir in $SRCDIRS; do
16822 if test ! -d $dir; then
16823 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016824 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016825done
Matthias Kloseb9621712010-04-24 17:59:49 +000016826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16827$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016828
Stefan Krah1919b7e2012-03-21 18:25:23 +010016829# Availability of -O2:
16830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16831$as_echo_n "checking for -O2... " >&6; }
16832saved_cflags="$CFLAGS"
16833CFLAGS="-O2"
16834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16835/* end confdefs.h. */
16836
16837int
16838main ()
16839{
16840
16841
16842 ;
16843 return 0;
16844}
16845_ACEOF
16846if ac_fn_c_try_compile "$LINENO"; then :
16847 have_O2=yes
16848else
16849 have_O2=no
16850fi
16851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16853$as_echo "$have_O2" >&6; }
16854CFLAGS="$saved_cflags"
16855
16856# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16857# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16859$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16860saved_cflags="$CFLAGS"
16861CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16862if test "$have_O2" = no; then
16863 CFLAGS=""
16864fi
16865if test "$cross_compiling" = yes; then :
16866 have_glibc_memmove_bug=undefined
16867else
16868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16869/* end confdefs.h. */
16870
16871#include <stdio.h>
16872#include <stdlib.h>
16873#include <string.h>
16874void foo(void *p, void *q) { memmove(p, q, 19); }
16875int main() {
16876 char a[32] = "123456789000000000";
16877 foo(&a[9], a);
16878 if (strcmp(a, "123456789123456789000000000") != 0)
16879 return 1;
16880 foo(a, &a[9]);
16881 if (strcmp(a, "123456789000000000") != 0)
16882 return 1;
16883 return 0;
16884}
16885
16886_ACEOF
16887if ac_fn_c_try_run "$LINENO"; then :
16888 have_glibc_memmove_bug=no
16889else
16890 have_glibc_memmove_bug=yes
16891fi
16892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16893 conftest.$ac_objext conftest.beam conftest.$ac_ext
16894fi
16895
16896CFLAGS="$saved_cflags"
16897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16898$as_echo "$have_glibc_memmove_bug" >&6; }
16899if test "$have_glibc_memmove_bug" = yes; then
16900
16901$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16902
16903fi
16904
16905if test "$have_gcc_asm_for_x87" = yes; then
16906 # Some versions of gcc miscompile inline asm:
16907 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16908 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16909 case $CC in
16910 *gcc*)
16911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16912$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16913 saved_cflags="$CFLAGS"
16914 CFLAGS="-O2"
16915 if test "$cross_compiling" = yes; then :
16916 have_ipa_pure_const_bug=undefined
16917else
16918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16919/* end confdefs.h. */
16920
16921 __attribute__((noinline)) int
16922 foo(int *p) {
16923 int r;
16924 asm ( "movl \$6, (%1)\n\t"
16925 "xorl %0, %0\n\t"
16926 : "=r" (r) : "r" (p) : "memory"
16927 );
16928 return r;
16929 }
16930 int main() {
16931 int p = 8;
16932 if ((foo(&p) ? : p) != 6)
16933 return 1;
16934 return 0;
16935 }
16936
16937_ACEOF
16938if ac_fn_c_try_run "$LINENO"; then :
16939 have_ipa_pure_const_bug=no
16940else
16941 have_ipa_pure_const_bug=yes
16942fi
16943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16944 conftest.$ac_objext conftest.beam conftest.$ac_ext
16945fi
16946
16947 CFLAGS="$saved_cflags"
16948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16949$as_echo "$have_ipa_pure_const_bug" >&6; }
16950 if test "$have_ipa_pure_const_bug" = yes; then
16951
16952$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16953
16954 fi
16955 ;;
16956 esac
16957fi
16958
Victor Stinner4f5366e2015-01-09 02:13:19 +010016959# Check for stdatomic.h
16960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16961$as_echo_n "checking for stdatomic.h... " >&6; }
16962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16963/* end confdefs.h. */
16964
16965
16966 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016967 atomic_int int_var;
16968 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016969 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016970 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16971 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16972 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016973 return 0;
16974 }
16975
16976
16977_ACEOF
16978if ac_fn_c_try_link "$LINENO"; then :
16979 have_stdatomic_h=yes
16980else
16981 have_stdatomic_h=no
16982fi
16983rm -f core conftest.err conftest.$ac_objext \
16984 conftest$ac_exeext conftest.$ac_ext
16985
16986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16987$as_echo "$have_stdatomic_h" >&6; }
16988
16989if test "$have_stdatomic_h" = yes; then
16990
16991$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16992
16993fi
16994
16995# Check for GCC >= 4.7 __atomic builtins
16996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16997$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16999/* end confdefs.h. */
17000
17001
17002 volatile int val = 1;
17003 int main() {
17004 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
17005 return 0;
17006 }
17007
17008
17009_ACEOF
17010if ac_fn_c_try_link "$LINENO"; then :
17011 have_builtin_atomic=yes
17012else
17013 have_builtin_atomic=no
17014fi
17015rm -f core conftest.err conftest.$ac_objext \
17016 conftest$ac_exeext conftest.$ac_ext
17017
17018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17019$as_echo "$have_builtin_atomic" >&6; }
17020
17021if test "$have_builtin_atomic" = yes; then
17022
17023$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17024
17025fi
17026
Ned Deily322f5ba2013-11-21 23:01:59 -080017027# ensurepip option
17028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17029$as_echo_n "checking for ensurepip... " >&6; }
17030
17031# Check whether --with-ensurepip was given.
17032if test "${with_ensurepip+set}" = set; then :
17033 withval=$with_ensurepip;
17034else
17035 with_ensurepip=upgrade
17036fi
17037
17038case $with_ensurepip in #(
17039 yes|upgrade) :
17040 ENSUREPIP=upgrade ;; #(
17041 install) :
17042 ENSUREPIP=install ;; #(
17043 no) :
17044 ENSUREPIP=no ;; #(
17045 *) :
17046 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17047esac
17048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17049$as_echo "$ENSUREPIP" >&6; }
17050
17051
Victor Stinner35a97c02015-03-08 02:59:09 +010017052# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17054$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17056/* end confdefs.h. */
17057
17058
17059 #include <dirent.h>
17060
17061 int main() {
17062 struct dirent entry;
17063 return entry.d_type == DT_UNKNOWN;
17064 }
17065
17066
17067_ACEOF
17068if ac_fn_c_try_link "$LINENO"; then :
17069 have_dirent_d_type=yes
17070else
17071 have_dirent_d_type=no
17072fi
17073rm -f core conftest.err conftest.$ac_objext \
17074 conftest$ac_exeext conftest.$ac_ext
17075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17076$as_echo "$have_dirent_d_type" >&6; }
17077
17078if test "$have_dirent_d_type" = yes; then
17079
17080$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17081
17082fi
17083
Victor Stinner9eb57c52015-03-19 22:21:49 +010017084# check if the Linux getrandom() syscall is available
17085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17086$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17088/* end confdefs.h. */
17089
17090
Victor Stinner1b80b242016-04-12 22:34:58 +020017091 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017092 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017093 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017094
17095 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017096 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017097 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017098 const int flags = GRND_NONBLOCK;
17099 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017100 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017101 return 0;
17102 }
17103
17104
17105_ACEOF
17106if ac_fn_c_try_link "$LINENO"; then :
17107 have_getrandom_syscall=yes
17108else
17109 have_getrandom_syscall=no
17110fi
17111rm -f core conftest.err conftest.$ac_objext \
17112 conftest$ac_exeext conftest.$ac_ext
17113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17114$as_echo "$have_getrandom_syscall" >&6; }
17115
17116if test "$have_getrandom_syscall" = yes; then
17117
17118$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17119
17120fi
17121
Victor Stinner3abf44e2015-09-18 15:38:37 +020017122# check if the getrandom() function is available
17123# the test was written for the Solaris function of <sys/random.h>
17124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17125$as_echo_n "checking for the getrandom() function... " >&6; }
17126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17127/* end confdefs.h. */
17128
17129
17130 #include <sys/random.h>
17131
17132 int main() {
17133 char buffer[1];
17134 const size_t buflen = sizeof(buffer);
17135 const int flags = 0;
17136 /* ignore the result, Python checks for ENOSYS at runtime */
17137 (void)getrandom(buffer, buflen, flags);
17138 return 0;
17139 }
17140
17141
17142_ACEOF
17143if ac_fn_c_try_link "$LINENO"; then :
17144 have_getrandom=yes
17145else
17146 have_getrandom=no
17147fi
17148rm -f core conftest.err conftest.$ac_objext \
17149 conftest$ac_exeext conftest.$ac_ext
17150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17151$as_echo "$have_getrandom" >&6; }
17152
17153if test "$have_getrandom" = yes; then
17154
17155$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17156
17157fi
17158
Neil Schemenauer5741c452019-02-08 10:48:46 -080017159# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17160# shm_* may only be available if linking against librt
17161save_LIBS="$LIBS"
17162save_includes_default="$ac_includes_default"
17163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17164$as_echo_n "checking for library containing shm_open... " >&6; }
17165if ${ac_cv_search_shm_open+:} false; then :
17166 $as_echo_n "(cached) " >&6
17167else
17168 ac_func_search_save_LIBS=$LIBS
17169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17170/* end confdefs.h. */
17171
17172/* Override any GCC internal prototype to avoid an error.
17173 Use char because int might match the return type of a GCC
17174 builtin and then its argument prototype would still apply. */
17175#ifdef __cplusplus
17176extern "C"
17177#endif
17178char shm_open ();
17179int
17180main ()
17181{
17182return shm_open ();
17183 ;
17184 return 0;
17185}
17186_ACEOF
17187for ac_lib in '' rt; do
17188 if test -z "$ac_lib"; then
17189 ac_res="none required"
17190 else
17191 ac_res=-l$ac_lib
17192 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17193 fi
17194 if ac_fn_c_try_link "$LINENO"; then :
17195 ac_cv_search_shm_open=$ac_res
17196fi
17197rm -f core conftest.err conftest.$ac_objext \
17198 conftest$ac_exeext
17199 if ${ac_cv_search_shm_open+:} false; then :
17200 break
17201fi
17202done
17203if ${ac_cv_search_shm_open+:} false; then :
17204
17205else
17206 ac_cv_search_shm_open=no
17207fi
17208rm conftest.$ac_ext
17209LIBS=$ac_func_search_save_LIBS
17210fi
17211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17212$as_echo "$ac_cv_search_shm_open" >&6; }
17213ac_res=$ac_cv_search_shm_open
17214if test "$ac_res" != no; then :
17215 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17216
17217fi
17218
17219if test "$ac_cv_search_shm_open" = "-lrt"; then
17220
17221$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17222
17223fi
17224for ac_header in sys/mman.h
17225do :
17226 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17227if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17228 cat >>confdefs.h <<_ACEOF
17229#define HAVE_SYS_MMAN_H 1
17230_ACEOF
17231
17232fi
17233
17234done
17235
17236# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17237ac_includes_default="\
17238${ac_includes_default}
17239#ifndef __cplusplus
17240# ifdef HAVE_SYS_MMAN_H
17241# include <sys/mman.h>
17242# endif
17243#endif
17244"
17245for ac_func in shm_open shm_unlink
17246do :
17247 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17248ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17249if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17250 cat >>confdefs.h <<_ACEOF
17251#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17252_ACEOF
17253
17254fi
17255done
17256
17257# we don't want to link with librt always, restore LIBS
17258LIBS="$save_LIBS"
17259ac_includes_default="$save_includes_default"
17260
Christian Heimesff5be6e2018-01-20 13:19:21 +010017261# Check for usable OpenSSL
17262
17263 found=false
17264
17265# Check whether --with-openssl was given.
17266if test "${with_openssl+set}" = set; then :
17267 withval=$with_openssl;
17268 case "$withval" in
17269 "" | y | ye | yes | n | no)
17270 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17271 ;;
17272 *) ssldirs="$withval"
17273 ;;
17274 esac
17275
17276else
17277
17278 # if pkg-config is installed and openssl has installed a .pc file,
17279 # then use that information and don't search ssldirs
17280 if test -n "$ac_tool_prefix"; then
17281 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17282set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17284$as_echo_n "checking for $ac_word... " >&6; }
17285if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17286 $as_echo_n "(cached) " >&6
17287else
17288 if test -n "$PKG_CONFIG"; then
17289 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17290else
17291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17292for as_dir in $PATH
17293do
17294 IFS=$as_save_IFS
17295 test -z "$as_dir" && as_dir=.
17296 for ac_exec_ext in '' $ac_executable_extensions; do
17297 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17298 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17299 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17300 break 2
17301 fi
17302done
17303 done
17304IFS=$as_save_IFS
17305
17306fi
17307fi
17308PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17309if test -n "$PKG_CONFIG"; then
17310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17311$as_echo "$PKG_CONFIG" >&6; }
17312else
17313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17314$as_echo "no" >&6; }
17315fi
17316
17317
17318fi
17319if test -z "$ac_cv_prog_PKG_CONFIG"; then
17320 ac_ct_PKG_CONFIG=$PKG_CONFIG
17321 # Extract the first word of "pkg-config", so it can be a program name with args.
17322set dummy pkg-config; ac_word=$2
17323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17324$as_echo_n "checking for $ac_word... " >&6; }
17325if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17326 $as_echo_n "(cached) " >&6
17327else
17328 if test -n "$ac_ct_PKG_CONFIG"; then
17329 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17330else
17331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17332for as_dir in $PATH
17333do
17334 IFS=$as_save_IFS
17335 test -z "$as_dir" && as_dir=.
17336 for ac_exec_ext in '' $ac_executable_extensions; do
17337 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17338 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17340 break 2
17341 fi
17342done
17343 done
17344IFS=$as_save_IFS
17345
17346fi
17347fi
17348ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17349if test -n "$ac_ct_PKG_CONFIG"; then
17350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17351$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17352else
17353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17354$as_echo "no" >&6; }
17355fi
17356
17357 if test "x$ac_ct_PKG_CONFIG" = x; then
17358 PKG_CONFIG=""
17359 else
17360 case $cross_compiling:$ac_tool_warned in
17361yes:)
17362{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17363$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17364ac_tool_warned=yes ;;
17365esac
17366 PKG_CONFIG=$ac_ct_PKG_CONFIG
17367 fi
17368else
17369 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17370fi
17371
17372 if test x"$PKG_CONFIG" != x""; then
17373 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17374 if test $? = 0; then
17375 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17376 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17377 found=true
17378 fi
17379 fi
17380
17381 # no such luck; use some default ssldirs
17382 if ! $found; then
17383 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17384 fi
17385
17386
17387fi
17388
17389
17390
17391 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17392 # an 'openssl' subdirectory
17393
17394 if ! $found; then
17395 OPENSSL_INCLUDES=
17396 for ssldir in $ssldirs; do
17397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17398$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17399 if test -f "$ssldir/include/openssl/ssl.h"; then
17400 OPENSSL_INCLUDES="-I$ssldir/include"
17401 OPENSSL_LDFLAGS="-L$ssldir/lib"
17402 OPENSSL_LIBS="-lssl -lcrypto"
17403 found=true
17404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17405$as_echo "yes" >&6; }
17406 break
17407 else
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17409$as_echo "no" >&6; }
17410 fi
17411 done
17412
17413 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17414 # it will just work!
17415 fi
17416
17417 # try the preprocessor and linker with our new flags,
17418 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17419
17420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17421$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17422 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17423 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17424
17425 save_LIBS="$LIBS"
17426 save_LDFLAGS="$LDFLAGS"
17427 save_CPPFLAGS="$CPPFLAGS"
17428 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17429 LIBS="$OPENSSL_LIBS $LIBS"
17430 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17432/* end confdefs.h. */
17433#include <openssl/ssl.h>
17434int
17435main ()
17436{
17437SSL_new(NULL)
17438 ;
17439 return 0;
17440}
17441_ACEOF
17442if ac_fn_c_try_link "$LINENO"; then :
17443
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17445$as_echo "yes" >&6; }
17446 have_openssl=yes
17447
17448else
17449
17450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17451$as_echo "no" >&6; }
17452 have_openssl=no
17453
17454fi
17455rm -f core conftest.err conftest.$ac_objext \
17456 conftest$ac_exeext conftest.$ac_ext
17457 CPPFLAGS="$save_CPPFLAGS"
17458 LDFLAGS="$save_LDFLAGS"
17459 LIBS="$save_LIBS"
17460
17461
17462
17463
17464
17465
17466if test "$have_openssl" = yes; then
17467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17468$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17469
17470 save_LIBS="$LIBS"
17471 save_LDFLAGS="$LDFLAGS"
17472 save_CPPFLAGS="$CPPFLAGS"
17473 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17474 LIBS="$OPENSSL_LIBS $LIBS"
17475 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17476
17477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17478/* end confdefs.h. */
17479
17480 #include <openssl/x509_vfy.h>
17481
17482int
17483main ()
17484{
17485
17486 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17487 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17488 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17489 X509_VERIFY_PARAM_set_hostflags(p, 0);
17490
17491 ;
17492 return 0;
17493}
17494
17495_ACEOF
17496if ac_fn_c_try_link "$LINENO"; then :
17497
17498 ac_cv_has_x509_verify_param_set1_host=yes
17499
17500else
17501
17502 ac_cv_has_x509_verify_param_set1_host=no
17503
17504fi
17505rm -f core conftest.err conftest.$ac_objext \
17506 conftest$ac_exeext conftest.$ac_ext
17507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17508$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17509 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17510
17511$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17512
17513 fi
17514
17515 CPPFLAGS="$save_CPPFLAGS"
17516 LDFLAGS="$save_LDFLAGS"
17517 LIBS="$save_LIBS"
17518fi
17519
Christian Heimes892d66e2018-01-29 14:10:18 +010017520# ssl module default cipher suite string
17521
17522
17523
17524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17525$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17526
17527# Check whether --with-ssl-default-suites was given.
17528if test "${with_ssl_default_suites+set}" = set; then :
17529 withval=$with_ssl_default_suites;
17530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17531$as_echo "$withval" >&6; }
17532case "$withval" in
17533 python)
17534 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17535
17536 ;;
17537 openssl)
17538 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17539
17540 ;;
17541 *)
17542 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17543
17544 cat >>confdefs.h <<_ACEOF
17545#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17546_ACEOF
17547
17548 ;;
17549esac
17550
17551else
17552
17553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17554$as_echo "python" >&6; }
17555$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17556
17557
17558fi
17559
17560
Christian Heimes9b60e552020-05-15 23:54:53 +020017561# builtin hash modules
17562default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17563
17564$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17565
17566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17567$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17568
17569# Check whether --with-builtin-hashlib-hashes was given.
17570if test "${with_builtin_hashlib_hashes+set}" = set; then :
17571 withval=$with_builtin_hashlib_hashes;
17572case "$withval" in
17573 yes)
17574 withval=$default_hashlib_hashes
17575 ;;
17576 no)
17577 withval=""
17578 ;;
17579esac
17580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17581$as_echo "$withval" >&6; }
17582cat >>confdefs.h <<_ACEOF
17583#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17584_ACEOF
17585
17586
17587else
17588
17589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17590$as_echo "$default_hashlib_hashes" >&6; };
17591cat >>confdefs.h <<_ACEOF
17592#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17593_ACEOF
17594
17595
17596fi
17597
17598
Guido van Rossum627b2d71993-12-24 10:39:16 +000017599# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017600ac_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 +000017601
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017602ac_config_files="$ac_config_files Modules/ld_so_aix"
17603
Martin v. Löwis11437992002-04-12 09:54:03 +000017604cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017605# This file is a shell script that caches the results of configure
17606# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017607# scripts and configure runs, see configure's option --config-cache.
17608# It is not useful on other systems. If it contains results you don't
17609# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017610#
Martin v. Löwis11437992002-04-12 09:54:03 +000017611# config.status only pays attention to the cache file if you give it
17612# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017613#
Skip Montanaro6dead952003-09-25 14:50:04 +000017614# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017615# loading this file, other *unset* `ac_cv_foo' will be assigned the
17616# following values.
17617
17618_ACEOF
17619
Guido van Rossumf78abae1997-01-21 22:02:36 +000017620# The following way of writing the cache mishandles newlines in values,
17621# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017623# Ultrix sh set writes to stderr and can't be redirected directly,
17624# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625(
17626 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17627 eval ac_val=\$$ac_var
17628 case $ac_val in #(
17629 *${as_nl}*)
17630 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017631 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17632$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633 esac
17634 case $ac_var in #(
17635 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017636 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17637 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638 esac ;;
17639 esac
17640 done
17641
Martin v. Löwis11437992002-04-12 09:54:03 +000017642 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17644 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017645 # `set' does not quote correctly, so add quotes: double-quote
17646 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017647 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017648 "s/'/'\\\\''/g;
17649 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017651 *)
17652 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017654 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655 esac |
17656 sort
17657) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017658 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017660 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017661 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017662 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17663 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17665 :end' >>confcache
17666if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17667 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017668 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017669 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17670$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017671 if test ! -f "$cache_file" || test -h "$cache_file"; then
17672 cat confcache >"$cache_file"
17673 else
17674 case $cache_file in #(
17675 */* | ?:*)
17676 mv -f confcache "$cache_file"$$ &&
17677 mv -f "$cache_file"$$ "$cache_file" ;; #(
17678 *)
17679 mv -f confcache "$cache_file" ;;
17680 esac
17681 fi
17682 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017683 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017684 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17685$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017686 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017687fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017688rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017689
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017690test "x$prefix" = xNONE && prefix=$ac_default_prefix
17691# Let make expand exec_prefix.
17692test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017694DEFS=-DHAVE_CONFIG_H
17695
Skip Montanaro6dead952003-09-25 14:50:04 +000017696ac_libobjs=
17697ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017698U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017699for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17700 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017702 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17704 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017705 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17706 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017707done
17708LIBOBJS=$ac_libobjs
17709
17710LTLIBOBJS=$ac_ltlibobjs
17711
17712
Martin v. Löwis11437992002-04-12 09:54:03 +000017713
Matthias Kloseb9621712010-04-24 17:59:49 +000017714
Victor Stinnere0be4232011-10-25 13:06:09 +020017715: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017716ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017717ac_clean_files_save=$ac_clean_files
17718ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017719{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17720$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17721as_write_fail=0
17722cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017723#! $SHELL
17724# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017725# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017726# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017727# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017728
Martin v. Löwis11437992002-04-12 09:54:03 +000017729debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017730ac_cs_recheck=false
17731ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017732
Matthias Kloseb9621712010-04-24 17:59:49 +000017733SHELL=\${CONFIG_SHELL-$SHELL}
17734export SHELL
17735_ASEOF
17736cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17737## -------------------- ##
17738## M4sh Initialization. ##
17739## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741# Be more Bourne compatible
17742DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017743if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017744 emulate sh
17745 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017746 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017747 # is contrary to our usage. Disable this feature.
17748 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017750else
Matthias Kloseb9621712010-04-24 17:59:49 +000017751 case `(set -o) 2>/dev/null` in #(
17752 *posix*) :
17753 set -o posix ;; #(
17754 *) :
17755 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017757fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017758
17759
Matthias Kloseb9621712010-04-24 17:59:49 +000017760as_nl='
17761'
17762export as_nl
17763# Printing a long string crashes Solaris 7 /usr/bin/printf.
17764as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17765as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17766as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17767# Prefer a ksh shell builtin over an external printf program on Solaris,
17768# but without wasting forks for bash or zsh.
17769if test -z "$BASH_VERSION$ZSH_VERSION" \
17770 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17771 as_echo='print -r --'
17772 as_echo_n='print -rn --'
17773elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17774 as_echo='printf %s\n'
17775 as_echo_n='printf %s'
17776else
17777 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17778 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17779 as_echo_n='/usr/ucb/echo -n'
17780 else
17781 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17782 as_echo_n_body='eval
17783 arg=$1;
17784 case $arg in #(
17785 *"$as_nl"*)
17786 expr "X$arg" : "X\\(.*\\)$as_nl";
17787 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17788 esac;
17789 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17790 '
17791 export as_echo_n_body
17792 as_echo_n='sh -c $as_echo_n_body as_echo'
17793 fi
17794 export as_echo_body
17795 as_echo='sh -c $as_echo_body as_echo'
17796fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017797
17798# The user is always right.
17799if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017800 PATH_SEPARATOR=:
17801 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17802 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17803 PATH_SEPARATOR=';'
17804 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807
17808# IFS
17809# We need space, tab and new line, in precisely that order. Quoting is
17810# there to prevent editors from complaining about space-tab.
17811# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17812# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813IFS=" "" $as_nl"
17814
17815# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017816as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017817case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818 *[\\/]* ) as_myself=$0 ;;
17819 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017820for as_dir in $PATH
17821do
17822 IFS=$as_save_IFS
17823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017824 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17825 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828 ;;
17829esac
17830# We did not find ourselves, most probably we were run as `sh COMMAND'
17831# in which case we are not to be found in the path.
17832if test "x$as_myself" = x; then
17833 as_myself=$0
17834fi
17835if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017836 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17837 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838fi
17839
Matthias Kloseb9621712010-04-24 17:59:49 +000017840# Unset variables that we do not need and which cause bugs (e.g. in
17841# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17842# suppresses any "Segmentation fault" message there. '((' could
17843# trigger a bug in pdksh 5.2.14.
17844for as_var in BASH_ENV ENV MAIL MAILPATH
17845do eval test x\${$as_var+set} = xset \
17846 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847done
17848PS1='$ '
17849PS2='> '
17850PS4='+ '
17851
17852# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017853LC_ALL=C
17854export LC_ALL
17855LANGUAGE=C
17856export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857
Matthias Kloseb9621712010-04-24 17:59:49 +000017858# CDPATH.
17859(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17860
17861
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017862# as_fn_error STATUS ERROR [LINENO LOG_FD]
17863# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017864# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17865# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017866# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017867as_fn_error ()
17868{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017869 as_status=$1; test $as_status -eq 0 && as_status=1
17870 if test "$4"; then
17871 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17872 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017873 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017874 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017875 as_fn_exit $as_status
17876} # as_fn_error
17877
17878
17879# as_fn_set_status STATUS
17880# -----------------------
17881# Set $? to STATUS, without forking.
17882as_fn_set_status ()
17883{
17884 return $1
17885} # as_fn_set_status
17886
17887# as_fn_exit STATUS
17888# -----------------
17889# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17890as_fn_exit ()
17891{
17892 set +e
17893 as_fn_set_status $1
17894 exit $1
17895} # as_fn_exit
17896
17897# as_fn_unset VAR
17898# ---------------
17899# Portably unset VAR.
17900as_fn_unset ()
17901{
17902 { eval $1=; unset $1;}
17903}
17904as_unset=as_fn_unset
17905# as_fn_append VAR VALUE
17906# ----------------------
17907# Append the text in VALUE to the end of the definition contained in VAR. Take
17908# advantage of any shell optimizations that allow amortized linear growth over
17909# repeated appends, instead of the typical quadratic growth present in naive
17910# implementations.
17911if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17912 eval 'as_fn_append ()
17913 {
17914 eval $1+=\$2
17915 }'
17916else
17917 as_fn_append ()
17918 {
17919 eval $1=\$$1\$2
17920 }
17921fi # as_fn_append
17922
17923# as_fn_arith ARG...
17924# ------------------
17925# Perform arithmetic evaluation on the ARGs, and store the result in the
17926# global $as_val. Take advantage of shells that can avoid forks. The arguments
17927# must be portable across $(()) and expr.
17928if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17929 eval 'as_fn_arith ()
17930 {
17931 as_val=$(( $* ))
17932 }'
17933else
17934 as_fn_arith ()
17935 {
17936 as_val=`expr "$@" || test $? -eq 1`
17937 }
17938fi # as_fn_arith
17939
17940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941if expr a : '\(a\)' >/dev/null 2>&1 &&
17942 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17943 as_expr=expr
17944else
17945 as_expr=false
17946fi
17947
17948if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17949 as_basename=basename
17950else
17951 as_basename=false
17952fi
17953
Matthias Kloseb9621712010-04-24 17:59:49 +000017954if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17955 as_dirname=dirname
17956else
17957 as_dirname=false
17958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017960as_me=`$as_basename -- "$0" ||
17961$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17962 X"$0" : 'X\(//\)$' \| \
17963 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017964$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965 sed '/^.*\/\([^/][^/]*\)\/*$/{
17966 s//\1/
17967 q
17968 }
17969 /^X\/\(\/\/\)$/{
17970 s//\1/
17971 q
17972 }
17973 /^X\/\(\/\).*/{
17974 s//\1/
17975 q
17976 }
17977 s/.*/./; q'`
17978
Matthias Kloseb9621712010-04-24 17:59:49 +000017979# Avoid depending upon Character Ranges.
17980as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17981as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17982as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17983as_cr_digits='0123456789'
17984as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017985
17986ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017987case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017988-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017989 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017990 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017991 xy) ECHO_C='\c';;
17992 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17993 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017994 esac;;
17995*)
17996 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017997esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017998
Martin v. Löwis11437992002-04-12 09:54:03 +000017999rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000if test -d conf$$.dir; then
18001 rm -f conf$$.dir/conf$$.file
18002else
18003 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018004 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018006if (echo >conf$$.file) 2>/dev/null; then
18007 if ln -s conf$$.file conf$$ 2>/dev/null; then
18008 as_ln_s='ln -s'
18009 # ... but there are two gotchas:
18010 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18011 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018012 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018013 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018014 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018015 elif ln conf$$.file conf$$ 2>/dev/null; then
18016 as_ln_s=ln
18017 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018018 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018019 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018020else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018021 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18024rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018025
Matthias Kloseb9621712010-04-24 17:59:49 +000018026
18027# as_fn_mkdir_p
18028# -------------
18029# Create "$as_dir" as a directory, including parents if necessary.
18030as_fn_mkdir_p ()
18031{
18032
18033 case $as_dir in #(
18034 -*) as_dir=./$as_dir;;
18035 esac
18036 test -d "$as_dir" || eval $as_mkdir_p || {
18037 as_dirs=
18038 while :; do
18039 case $as_dir in #(
18040 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18041 *) as_qdir=$as_dir;;
18042 esac
18043 as_dirs="'$as_qdir' $as_dirs"
18044 as_dir=`$as_dirname -- "$as_dir" ||
18045$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18046 X"$as_dir" : 'X\(//\)[^/]' \| \
18047 X"$as_dir" : 'X\(//\)$' \| \
18048 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18049$as_echo X"$as_dir" |
18050 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18051 s//\1/
18052 q
18053 }
18054 /^X\(\/\/\)[^/].*/{
18055 s//\1/
18056 q
18057 }
18058 /^X\(\/\/\)$/{
18059 s//\1/
18060 q
18061 }
18062 /^X\(\/\).*/{
18063 s//\1/
18064 q
18065 }
18066 s/.*/./; q'`
18067 test -d "$as_dir" && break
18068 done
18069 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018070 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018071
18072
18073} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018074if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018075 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018076else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018077 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018078 as_mkdir_p=false
18079fi
18080
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018081
18082# as_fn_executable_p FILE
18083# -----------------------
18084# Test if FILE is an executable regular file.
18085as_fn_executable_p ()
18086{
18087 test -f "$1" && test -x "$1"
18088} # as_fn_executable_p
18089as_test_x='test -x'
18090as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018091
18092# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018093as_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 +000018094
18095# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018096as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018097
18098
Martin v. Löwis11437992002-04-12 09:54:03 +000018099exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018100## ----------------------------------- ##
18101## Main body of $CONFIG_STATUS script. ##
18102## ----------------------------------- ##
18103_ASEOF
18104test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018105
Matthias Kloseb9621712010-04-24 17:59:49 +000018106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18107# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018108# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109# values after options handling.
18110ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018111This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018112generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018113
18114 CONFIG_FILES = $CONFIG_FILES
18115 CONFIG_HEADERS = $CONFIG_HEADERS
18116 CONFIG_LINKS = $CONFIG_LINKS
18117 CONFIG_COMMANDS = $CONFIG_COMMANDS
18118 $ $0 $@
18119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120on `(hostname || uname -n) 2>/dev/null | sed 1q`
18121"
18122
Martin v. Löwis11437992002-04-12 09:54:03 +000018123_ACEOF
18124
Matthias Kloseb9621712010-04-24 17:59:49 +000018125case $ac_config_files in *"
18126"*) set x $ac_config_files; shift; ac_config_files=$*;;
18127esac
18128
18129case $ac_config_headers in *"
18130"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18131esac
18132
18133
18134cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018135# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018136config_files="$ac_config_files"
18137config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018140
Matthias Kloseb9621712010-04-24 17:59:49 +000018141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018142ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018143\`$as_me' instantiates files and other configuration actions
18144from templates according to the current configuration. Unless the files
18145and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018146
Matthias Kloseb9621712010-04-24 17:59:49 +000018147Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018148
18149 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018151 --config print configuration, then exit
18152 -q, --quiet, --silent
18153 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018154 -d, --debug don't remove temporary files
18155 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018156 --file=FILE[:TEMPLATE]
18157 instantiate the configuration file FILE
18158 --header=FILE[:TEMPLATE]
18159 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018160
18161Configuration files:
18162$config_files
18163
18164Configuration headers:
18165$config_headers
18166
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018167Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018170cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18171ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018172ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018173python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018174configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018175 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018176
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018177Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018178This config.status script is free software; the Free Software Foundation
18179gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018180
18181ac_pwd='$ac_pwd'
18182srcdir='$srcdir'
18183INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018184MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018185test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018186_ACEOF
18187
Matthias Kloseb9621712010-04-24 17:59:49 +000018188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18189# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018190ac_need_defaults=:
18191while test $# != 0
18192do
18193 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018194 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18196 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018197 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018198 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018199 --*=)
18200 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18201 ac_optarg=
18202 ac_shift=:
18203 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018205 ac_option=$1
18206 ac_optarg=$2
18207 ac_shift=shift
18208 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018209 esac
18210
Skip Montanaro6dead952003-09-25 14:50:04 +000018211 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018212 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018213 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18214 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018215 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018216 $as_echo "$ac_cs_version"; exit ;;
18217 --config | --confi | --conf | --con | --co | --c )
18218 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018219 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018220 debug=: ;;
18221 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018222 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018223 case $ac_optarg in
18224 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018225 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018226 esac
18227 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018228 ac_need_defaults=false;;
18229 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018230 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018231 case $ac_optarg in
18232 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18233 esac
18234 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018235 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018236 --he | --h)
18237 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018238 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018239Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018240 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018241 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018242 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18243 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18244 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018245
18246 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018247 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018248Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018249
Matthias Kloseb9621712010-04-24 17:59:49 +000018250 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018252
18253 esac
18254 shift
18255done
18256
Skip Montanaro6dead952003-09-25 14:50:04 +000018257ac_configure_extra_args=
18258
18259if $ac_cs_silent; then
18260 exec 6>/dev/null
18261 ac_configure_extra_args="$ac_configure_extra_args --silent"
18262fi
18263
18264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018265cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018266if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018267 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018268 shift
18269 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18270 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018271 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018272 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018273fi
18274
Martin v. Löwis11437992002-04-12 09:54:03 +000018275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018276cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018277exec 5>>config.log
18278{
18279 echo
18280 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18281## Running $as_me. ##
18282_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018283 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018284} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018287cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018289
Matthias Kloseb9621712010-04-24 17:59:49 +000018290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018291
18292# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018293for ac_config_target in $ac_config_targets
18294do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018295 case $ac_config_target in
18296 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18297 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18298 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018299 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18300 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018301 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018302 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018303 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018304 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018305 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018306
Victor Stinnere0be4232011-10-25 13:06:09 +020018307 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018308 esac
18309done
18310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311
Martin v. Löwis11437992002-04-12 09:54:03 +000018312# If the user did not use the arguments to specify the items to instantiate,
18313# then the envvar interface is used. Set only those that are not.
18314# We use the long form for the default assignment because of an extremely
18315# bizarre bug on SunOS 4.1.3.
18316if $ac_need_defaults; then
18317 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18318 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18319fi
18320
Skip Montanaro6dead952003-09-25 14:50:04 +000018321# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018323# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018324# Hook for its removal unless debugging.
18325# Note that there is a small window in which the directory will not be cleaned:
18326# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018327$debug ||
18328{
Victor Stinnere0be4232011-10-25 13:06:09 +020018329 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018330 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018331 : "${ac_tmp:=$tmp}"
18332 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018334 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018335}
Martin v. Löwis11437992002-04-12 09:54:03 +000018336# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018337
Martin v. Löwis11437992002-04-12 09:54:03 +000018338{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018339 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018340 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018341} ||
18342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018343 tmp=./conf$$-$RANDOM
18344 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018345} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018346ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018347
Matthias Kloseb9621712010-04-24 17:59:49 +000018348# Set up the scripts for CONFIG_FILES section.
18349# No need to generate them if there are no CONFIG_FILES.
18350# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018351if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018352
Matthias Kloseb9621712010-04-24 17:59:49 +000018353
18354ac_cr=`echo X | tr X '\015'`
18355# On cygwin, bash can eat \r inside `` if the user requested igncr.
18356# But we know of no other shell where ac_cr would be empty at this
18357# point, so we can use a bashism as a fallback.
18358if test "x$ac_cr" = x; then
18359 eval ac_cr=\$\'\\r\'
18360fi
18361ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18362if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018363 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018364else
18365 ac_cs_awk_cr=$ac_cr
18366fi
18367
Victor Stinnere0be4232011-10-25 13:06:09 +020018368echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018369_ACEOF
18370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018371
Matthias Kloseb9621712010-04-24 17:59:49 +000018372{
18373 echo "cat >conf$$subs.awk <<_ACEOF" &&
18374 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18375 echo "_ACEOF"
18376} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018377 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18378ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379ac_delim='%!_!# '
18380for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018381 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018382 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383
Matthias Kloseb9621712010-04-24 17:59:49 +000018384 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18385 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018386 break
18387 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018388 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389 else
18390 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018391 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392done
Matthias Kloseb9621712010-04-24 17:59:49 +000018393rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394
Matthias Kloseb9621712010-04-24 17:59:49 +000018395cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018396cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018398sed -n '
18399h
18400s/^/S["/; s/!.*/"]=/
18401p
18402g
18403s/^[^!]*!//
18404:repl
18405t repl
18406s/'"$ac_delim"'$//
18407t delim
18408:nl
18409h
18410s/\(.\{148\}\)..*/\1/
18411t more1
18412s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18413p
18414n
18415b repl
18416:more1
18417s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18418p
18419g
18420s/.\{148\}//
18421t nl
18422:delim
18423h
18424s/\(.\{148\}\)..*/\1/
18425t more2
18426s/["\\]/\\&/g; s/^/"/; s/$/"/
18427p
18428b
18429:more2
18430s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18431p
18432g
18433s/.\{148\}//
18434t delim
18435' <conf$$subs.awk | sed '
18436/^[^""]/{
18437 N
18438 s/\n//
18439}
18440' >>$CONFIG_STATUS || ac_write_fail=1
18441rm -f conf$$subs.awk
18442cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18443_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018444cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018445 for (key in S) S_is_set[key] = 1
18446 FS = ""
18447
18448}
18449{
18450 line = $ 0
18451 nfields = split(line, field, "@")
18452 substed = 0
18453 len = length(field[1])
18454 for (i = 2; i < nfields; i++) {
18455 key = field[i]
18456 keylen = length(key)
18457 if (S_is_set[key]) {
18458 value = S[key]
18459 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18460 len += length(value) + length(field[++i])
18461 substed = 1
18462 } else
18463 len += 1 + keylen
18464 }
18465
18466 print line
18467}
18468
18469_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18472if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18473 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18474else
18475 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018476fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018477 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018478_ACEOF
18479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018480# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18481# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482# trailing colons and then remove the whole line if VPATH becomes empty
18483# (actually we leave an empty line to preserve line numbers).
18484if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018485 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18486h
18487s///
18488s/^/:/
18489s/[ ]*$/:/
18490s/:\$(srcdir):/:/g
18491s/:\${srcdir}:/:/g
18492s/:@srcdir@:/:/g
18493s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018495x
18496s/\(=[ ]*\).*/\1/
18497G
18498s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018499s/^[^=]*=[ ]*$//
18500}'
18501fi
18502
Matthias Kloseb9621712010-04-24 17:59:49 +000018503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018504fi # test -n "$CONFIG_FILES"
18505
Matthias Kloseb9621712010-04-24 17:59:49 +000018506# Set up the scripts for CONFIG_HEADERS section.
18507# No need to generate them if there are no CONFIG_HEADERS.
18508# This happens for instance with `./config.status Makefile'.
18509if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018510cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018511BEGIN {
18512_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513
Matthias Kloseb9621712010-04-24 17:59:49 +000018514# Transform confdefs.h into an awk script `defines.awk', embedded as
18515# here-document in config.status, that substitutes the proper values into
18516# config.h.in to produce config.h.
18517
18518# Create a delimiter string that does not exist in confdefs.h, to ease
18519# handling of long lines.
18520ac_delim='%!_!# '
18521for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018522 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18523 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018524 break
18525 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018526 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018527 else
18528 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18529 fi
18530done
18531
18532# For the awk script, D is an array of macro values keyed by name,
18533# likewise P contains macro parameters if any. Preserve backslash
18534# newline sequences.
18535
18536ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18537sed -n '
18538s/.\{148\}/&'"$ac_delim"'/g
18539t rset
18540:rset
18541s/^[ ]*#[ ]*define[ ][ ]*/ /
18542t def
18543d
18544:def
18545s/\\$//
18546t bsnl
18547s/["\\]/\\&/g
18548s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18549D["\1"]=" \3"/p
18550s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18551d
18552:bsnl
18553s/["\\]/\\&/g
18554s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18555D["\1"]=" \3\\\\\\n"\\/p
18556t cont
18557s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18558t cont
18559d
18560:cont
18561n
18562s/.\{148\}/&'"$ac_delim"'/g
18563t clear
18564:clear
18565s/\\$//
18566t bsnlc
18567s/["\\]/\\&/g; s/^/"/; s/$/"/p
18568d
18569:bsnlc
18570s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18571b cont
18572' <confdefs.h | sed '
18573s/'"$ac_delim"'/"\\\
18574"/g' >>$CONFIG_STATUS || ac_write_fail=1
18575
18576cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18577 for (key in D) D_is_set[key] = 1
18578 FS = ""
18579}
18580/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18581 line = \$ 0
18582 split(line, arg, " ")
18583 if (arg[1] == "#") {
18584 defundef = arg[2]
18585 mac1 = arg[3]
18586 } else {
18587 defundef = substr(arg[1], 2)
18588 mac1 = arg[2]
18589 }
18590 split(mac1, mac2, "(") #)
18591 macro = mac2[1]
18592 prefix = substr(line, 1, index(line, defundef) - 1)
18593 if (D_is_set[macro]) {
18594 # Preserve the white space surrounding the "#".
18595 print prefix "define", macro P[macro] D[macro]
18596 next
18597 } else {
18598 # Replace #undef with comments. This is necessary, for example,
18599 # in the case of _POSIX_SOURCE, which is predefined and required
18600 # on some systems where configure will not decide to define it.
18601 if (defundef == "undef") {
18602 print "/*", prefix defundef, macro, "*/"
18603 next
18604 }
18605 }
18606}
18607{ print }
18608_ACAWK
18609_ACEOF
18610cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018611 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018612fi # test -n "$CONFIG_HEADERS"
18613
18614
18615eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18616shift
18617for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018618do
18619 case $ac_tag in
18620 :[FHLC]) ac_mode=$ac_tag; continue;;
18621 esac
18622 case $ac_mode$ac_tag in
18623 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018624 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018625 :[FH]-) ac_tag=-:-;;
18626 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18627 esac
18628 ac_save_IFS=$IFS
18629 IFS=:
18630 set x $ac_tag
18631 IFS=$ac_save_IFS
18632 shift
18633 ac_file=$1
18634 shift
18635
18636 case $ac_mode in
18637 :L) ac_source=$1;;
18638 :[FH])
18639 ac_file_inputs=
18640 for ac_f
18641 do
18642 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018643 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018644 *) # Look for the file first in the build tree, then in the source tree
18645 # (if the path is not absolute). The absolute path cannot be DOS-style,
18646 # because $ac_f cannot contain `:'.
18647 test -f "$ac_f" ||
18648 case $ac_f in
18649 [\\/$]*) false;;
18650 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18651 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018652 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018653 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018654 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18655 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018656 done
18657
18658 # Let's still pretend it is `configure' which instantiates (i.e., don't
18659 # use $as_me), people would be surprised to read:
18660 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018661 configure_input='Generated from '`
18662 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18663 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018664 if test x"$ac_file" != x-; then
18665 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018666 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18667$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018668 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018669 # Neutralize special characters interpreted by sed in replacement strings.
18670 case $configure_input in #(
18671 *\&* | *\|* | *\\* )
18672 ac_sed_conf_input=`$as_echo "$configure_input" |
18673 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18674 *) ac_sed_conf_input=$configure_input;;
18675 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018676
18677 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018678 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18679 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018680 esac
18681 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018682 esac
18683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018684 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018685$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018686 X"$ac_file" : 'X\(//\)[^/]' \| \
18687 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018688 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018689$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018690 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18691 s//\1/
18692 q
18693 }
18694 /^X\(\/\/\)[^/].*/{
18695 s//\1/
18696 q
18697 }
18698 /^X\(\/\/\)$/{
18699 s//\1/
18700 q
18701 }
18702 /^X\(\/\).*/{
18703 s//\1/
18704 q
18705 }
18706 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018707 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018708 ac_builddir=.
18709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018710case "$ac_dir" in
18711.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18712*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018713 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018714 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018715 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018716 case $ac_top_builddir_sub in
18717 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18718 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18719 esac ;;
18720esac
18721ac_abs_top_builddir=$ac_pwd
18722ac_abs_builddir=$ac_pwd$ac_dir_suffix
18723# for backward compatibility:
18724ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018725
18726case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018727 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018728 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018729 ac_top_srcdir=$ac_top_builddir_sub
18730 ac_abs_top_srcdir=$ac_pwd ;;
18731 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018732 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018733 ac_top_srcdir=$srcdir
18734 ac_abs_top_srcdir=$srcdir ;;
18735 *) # Relative name.
18736 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18737 ac_top_srcdir=$ac_top_build_prefix$srcdir
18738 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018739esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018740ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018741
Martin v. Löwis11437992002-04-12 09:54:03 +000018742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018743 case $ac_mode in
18744 :F)
18745 #
18746 # CONFIG_FILE
18747 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018748
18749 case $INSTALL in
18750 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018751 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018752 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018753 ac_MKDIR_P=$MKDIR_P
18754 case $MKDIR_P in
18755 [\\/$]* | ?:[\\/]* ) ;;
18756 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18757 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018758_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759
Matthias Kloseb9621712010-04-24 17:59:49 +000018760cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018761# If the template does not know about datarootdir, expand it.
18762# FIXME: This hack should be removed a few years after 2.60.
18763ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018764ac_sed_dataroot='
18765/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018766 p
18767 q
18768}
18769/@datadir@/p
18770/@docdir@/p
18771/@infodir@/p
18772/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018773/@mandir@/p'
18774case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018775*datarootdir*) ac_datarootdir_seen=yes;;
18776*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18778$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018780cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018781 ac_datarootdir_hack='
18782 s&@datadir@&$datadir&g
18783 s&@docdir@&$docdir&g
18784 s&@infodir@&$infodir&g
18785 s&@localedir@&$localedir&g
18786 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018787 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018788esac
18789_ACEOF
18790
18791# Neutralize VPATH when `$srcdir' = `.'.
18792# Shell code in configure.ac might set extrasub.
18793# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18795ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018796$extrasub
18797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018799:t
18800/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018801s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018802s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018803s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018804s&@srcdir@&$ac_srcdir&;t t
18805s&@abs_srcdir@&$ac_abs_srcdir&;t t
18806s&@top_srcdir@&$ac_top_srcdir&;t t
18807s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18808s&@builddir@&$ac_builddir&;t t
18809s&@abs_builddir@&$ac_abs_builddir&;t t
18810s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18811s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018812s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018813$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018814"
Victor Stinnere0be4232011-10-25 13:06:09 +020018815eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18816 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018818test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018819 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18820 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18821 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018823which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018824$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018825which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018826
Victor Stinnere0be4232011-10-25 13:06:09 +020018827 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018828 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018829 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18830 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018831 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018832 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018833 ;;
18834 :H)
18835 #
18836 # CONFIG_HEADER
18837 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018838 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018839 {
18840 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018841 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18842 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018843 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018844 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018845 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18846$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018847 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018848 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018849 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018850 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018851 fi
18852 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018853 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018854 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018855 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018856 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018857 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018859
18860 esac
18861
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018862
18863 case $ac_file$ac_mode in
18864 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18865
18866 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018867done # for ac_tag
18868
Guido van Rossum627b2d71993-12-24 10:39:16 +000018869
Matthias Kloseb9621712010-04-24 17:59:49 +000018870as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018871_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018872ac_clean_files=$ac_clean_files_save
18873
Matthias Kloseb9621712010-04-24 17:59:49 +000018874test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018875 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018876
Martin v. Löwis11437992002-04-12 09:54:03 +000018877
18878# configure is writing to config.log, and then calls config.status.
18879# config.status does its own redirection, appending to config.log.
18880# Unfortunately, on DOS this fails, as config.log is still kept open
18881# by configure, so config.status won't be able to write to it; its
18882# output is simply discarded. So we exec the FD to /dev/null,
18883# effectively closing config.log, so it can be properly (re)opened and
18884# appended to by config.status. When coming back to configure, we
18885# need to make the FD available again.
18886if test "$no_create" != yes; then
18887 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018888 ac_config_status_args=
18889 test "$silent" = yes &&
18890 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018891 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018892 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018893 exec 5>>config.log
18894 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18895 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018896 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018897fi
18898if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18900$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018901fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018902
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018903
Christian Heimes75ed8902013-11-20 01:11:18 +010018904echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018905if test ! -f Modules/Setup.local
18906then
18907 echo "# Edit this file for local setup changes" >Modules/Setup.local
18908fi
18909
Christian Heimes75ed8902013-11-20 01:11:18 +010018910echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018911$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018912 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018913 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018914mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018915
18916if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18917 echo "" >&6
18918 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018919 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 +000018920 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018921 echo "" >&6
18922 echo "" >&6
18923fi
18924