blob: 9411d7dc0bee4c3e713b70025a179f6e85fee0ac [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
703LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000704LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000705RUNSHARED
706INSTSONAME
707LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000708PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000709BLDLIBRARY
710DLLLIBRARY
711LDLIBRARY
712LIBRARY
713BUILDEXEEXT
714EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200715NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200716MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717PLATFORM_TRIPLET
718MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200719ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000720MAINCC
721CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700722SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200723GREP
724CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732EXPORT_MACOSX_DEPLOYMENT_TARGET
733CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200734_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000735MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000736FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800738FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKALTINSTALLLAST
740FRAMEWORKALTINSTALLFIRST
741FRAMEWORKINSTALLLAST
742FRAMEWORKINSTALLFIRST
743PYTHONFRAMEWORKINSTALLDIR
744PYTHONFRAMEWORKPREFIX
745PYTHONFRAMEWORKDIR
746PYTHONFRAMEWORKIDENTIFIER
747PYTHONFRAMEWORK
748LIPO_32BIT_FLAGS
749ARCH_RUN_32BIT
750UNIVERSALSDK
751CONFIG_ARGS
752SOVERSION
753VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200754PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200755PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100756host_os
757host_vendor
758host_cpu
759host
760build_os
761build_vendor
762build_cpu
763build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500764HAS_GIT
765GITBRANCH
766GITTAG
767GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400768BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000769target_alias
770host_alias
771build_alias
772LIBS
773ECHO_T
774ECHO_N
775ECHO_C
776DEFS
777mandir
778localedir
779libdir
780psdir
781pdfdir
782dvidir
783htmldir
784infodir
785docdir
786oldincludedir
787includedir
788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200819with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200820with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400824with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100825with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800826with_memory_sanitizer
827with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_libs
829with_system_expat
830with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100831with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100832with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000833enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700834with_tcltk_includes
835with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000837enable_ipv6
838with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000840with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700842with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_libm
844with_libc
845enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100846with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000847with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800848with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100849with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100850with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200851with_builtin_hashlib_hashes
Matthias Kloseb9621712010-04-24 17:59:49 +0000852'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853 ac_precious_vars='build_alias
854host_alias
855target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100856MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857CC
858CFLAGS
859LDFLAGS
860LIBS
861CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800862CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700863PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800864PKG_CONFIG
865PKG_CONFIG_PATH
866PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867
Guido van Rossum627b2d71993-12-24 10:39:16 +0000868
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870ac_init_help=
871ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000872ac_unrecognized_opts=
873ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874# The variables have the same names as the options, with
875# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000876cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879no_recursion=
880prefix=NONE
881program_prefix=NONE
882program_suffix=NONE
883program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888x_includes=NONE
889x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000890
891# Installation directory options.
892# These are left unexpanded so users can "make install exec_prefix=/foo"
893# and all the variables that are supposed to be based on exec_prefix
894# by default will actually change.
895# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897bindir='${exec_prefix}/bin'
898sbindir='${exec_prefix}/sbin'
899libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900datarootdir='${prefix}/share'
901datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902sysconfdir='${prefix}/etc'
903sharedstatedir='${prefix}/com'
904localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905includedir='${prefix}/include'
906oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
908infodir='${datarootdir}/info'
909htmldir='${docdir}'
910dvidir='${docdir}'
911pdfdir='${docdir}'
912psdir='${docdir}'
913libdir='${exec_prefix}/lib'
914localedir='${datarootdir}/locale'
915mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 # If the previous option needs an argument, assign it.
922 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924 ac_prev=
925 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000926 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200929 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
930 *=) ac_optarg= ;;
931 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Accept the important Cygnus configure options, so we can diagnose typos.
935
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 case $ac_dashdash$ac_option in
937 --)
938 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -bindir | --bindir | --bindi | --bind | --bin | --bi)
941 ac_prev=bindir ;;
942 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 -cache-file | --cache-file | --cache-fil | --cache-fi \
951 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
952 ac_prev=cache_file ;;
953 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
954 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 cache_file=$ac_optarg ;;
956
957 --config-cache | -C)
958 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000962 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
966 | --dataroo | --dataro | --datar)
967 ac_prev=datarootdir ;;
968 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
969 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
970 datarootdir=$ac_optarg ;;
971
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000974 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200976 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000977 ac_useropt_orig=$ac_useropt
978 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
979 case $ac_user_opts in
980 *"
981"enable_$ac_useropt"
982"*) ;;
983 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
984 ac_unrecognized_sep=', ';;
985 esac
986 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000987
988 -docdir | --docdir | --docdi | --doc | --do)
989 ac_prev=docdir ;;
990 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
991 docdir=$ac_optarg ;;
992
993 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
994 ac_prev=dvidir ;;
995 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
996 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
998 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000999 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001001 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001002 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001003 ac_useropt_orig=$ac_useropt
1004 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1005 case $ac_user_opts in
1006 *"
1007"enable_$ac_useropt"
1008"*) ;;
1009 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1010 ac_unrecognized_sep=', ';;
1011 esac
1012 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1015 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1016 | --exec | --exe | --ex)
1017 ac_prev=exec_prefix ;;
1018 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1019 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1020 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024 # Obsolete; use --with-gas.
1025 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 -help | --help | --hel | --he | -h)
1028 ac_init_help=long ;;
1029 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1030 ac_init_help=recursive ;;
1031 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1032 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001039 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1040 ac_prev=htmldir ;;
1041 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1042 | --ht=*)
1043 htmldir=$ac_optarg ;;
1044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 -includedir | --includedir | --includedi | --included | --include \
1046 | --includ | --inclu | --incl | --inc)
1047 ac_prev=includedir ;;
1048 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1049 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -infodir | --infodir | --infodi | --infod | --info | --inf)
1053 ac_prev=infodir ;;
1054 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libdir | --libdir | --libdi | --libd)
1058 ac_prev=libdir ;;
1059 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
1062 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1063 | --libexe | --libex | --libe)
1064 ac_prev=libexecdir ;;
1065 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1066 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 -localedir | --localedir | --localedi | --localed | --locale)
1070 ac_prev=localedir ;;
1071 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1072 localedir=$ac_optarg ;;
1073
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001075 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076 ac_prev=localstatedir ;;
1077 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001078 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
1081 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1082 ac_prev=mandir ;;
1083 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 # Obsolete; use --without-fp.
1088 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 no_create=yes ;;
1093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001094 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1095 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1096 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1099 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1100 | --oldin | --oldi | --old | --ol | --o)
1101 ac_prev=oldincludedir ;;
1102 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1103 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1104 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1108 ac_prev=prefix ;;
1109 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1113 | --program-pre | --program-pr | --program-p)
1114 ac_prev=program_prefix ;;
1115 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1116 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1120 | --program-suf | --program-su | --program-s)
1121 ac_prev=program_suffix ;;
1122 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1123 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
1126 -program-transform-name | --program-transform-name \
1127 | --program-transform-nam | --program-transform-na \
1128 | --program-transform-n | --program-transform- \
1129 | --program-transform | --program-transfor \
1130 | --program-transfo | --program-transf \
1131 | --program-trans | --program-tran \
1132 | --progr-tra | --program-tr | --program-t)
1133 ac_prev=program_transform_name ;;
1134 -program-transform-name=* | --program-transform-name=* \
1135 | --program-transform-nam=* | --program-transform-na=* \
1136 | --program-transform-n=* | --program-transform-=* \
1137 | --program-transform=* | --program-transfor=* \
1138 | --program-transfo=* | --program-transf=* \
1139 | --program-trans=* | --program-tran=* \
1140 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001143 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1144 ac_prev=pdfdir ;;
1145 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1146 pdfdir=$ac_optarg ;;
1147
1148 -psdir | --psdir | --psdi | --psd | --ps)
1149 ac_prev=psdir ;;
1150 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1151 psdir=$ac_optarg ;;
1152
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1154 | -silent | --silent | --silen | --sile | --sil)
1155 silent=yes ;;
1156
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1158 ac_prev=sbindir ;;
1159 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1160 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162
1163 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1164 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1165 | --sharedst | --shareds | --shared | --share | --shar \
1166 | --sha | --sh)
1167 ac_prev=sharedstatedir ;;
1168 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1169 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1170 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1171 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 -site | --site | --sit)
1175 ac_prev=site ;;
1176 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1180 ac_prev=srcdir ;;
1181 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1185 | --syscon | --sysco | --sysc | --sys | --sy)
1186 ac_prev=sysconfdir ;;
1187 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1188 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1197 verbose=yes ;;
1198
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 -version | --version | --versio | --versi | --vers | -V)
1200 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001206 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt_orig=$ac_useropt
1208 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209 case $ac_user_opts in
1210 *"
1211"with_$ac_useropt"
1212"*) ;;
1213 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1214 ac_unrecognized_sep=', ';;
1215 esac
1216 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
1218 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001222 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt_orig=$ac_useropt
1224 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225 case $ac_user_opts in
1226 *"
1227"with_$ac_useropt"
1228"*) ;;
1229 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1230 ac_unrecognized_sep=', ';;
1231 esac
1232 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234 --x)
1235 # Obsolete; use --with-x.
1236 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1239 | --x-incl | --x-inc | --x-in | --x-i)
1240 ac_prev=x_includes ;;
1241 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1242 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
1245 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1246 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1247 ac_prev=x_libraries ;;
1248 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1249 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1253Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254 ;;
1255
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 *=*)
1257 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1258 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 case $ac_envvar in #(
1260 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001261 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 export $ac_envvar ;;
1265
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001266 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001271 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272 ;;
1273
1274 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275done
1276
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280fi
1281
Matthias Kloseb9621712010-04-24 17:59:49 +00001282if test -n "$ac_unrecognized_opts"; then
1283 case $enable_option_checking in
1284 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001285 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001286 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1287 esac
1288fi
1289
1290# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1292 datadir sysconfdir sharedstatedir localstatedir includedir \
1293 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001294 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001295do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001297 # Remove trailing slashes.
1298 case $ac_val in
1299 */ )
1300 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1301 eval $ac_var=\$ac_val;;
1302 esac
1303 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001304 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305 [\\/$]* | ?:[\\/]* ) continue;;
1306 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001308 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001309done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# There might be people who depend on the old broken behavior: `$host'
1312# used to hold the argument of --host etc.
1313# FIXME: To remove some day.
1314build=$build_alias
1315host=$host_alias
1316target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001317
Martin v. Löwis11437992002-04-12 09:54:03 +00001318# FIXME: To remove some day.
1319if test "x$host_alias" != x; then
1320 if test "x$build_alias" = x; then
1321 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001322 elif test "x$build_alias" != "x$host_alias"; then
1323 cross_compiling=yes
1324 fi
1325fi
1326
1327ac_tool_prefix=
1328test -n "$host_alias" && ac_tool_prefix=$host_alias-
1329
1330test "$silent" = yes && exec 6>/dev/null
1331
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333ac_pwd=`pwd` && test -n "$ac_pwd" &&
1334ac_ls_di=`ls -di .` &&
1335ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001336 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339
1340
Guido van Rossum627b2d71993-12-24 10:39:16 +00001341# Find the source files, if location was not specified.
1342if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001343 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001345 ac_confdir=`$as_dirname -- "$as_myself" ||
1346$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1347 X"$as_myself" : 'X\(//\)[^/]' \| \
1348 X"$as_myself" : 'X\(//\)$' \| \
1349 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1350$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001351 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\/\)[^/].*/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\/\)$/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\).*/{
1364 s//\1/
1365 q
1366 }
1367 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001368 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001370 srcdir=..
1371 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001372else
1373 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375if test ! -r "$srcdir/$ac_unique_file"; then
1376 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001377 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1380ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382 pwd)`
1383# When building in place, set srcdir=.
1384if test "$ac_abs_confdir" = "$ac_pwd"; then
1385 srcdir=.
1386fi
1387# Remove unnecessary trailing slashes from srcdir.
1388# Double slashes in file names in object file debugging info
1389# mess up M-x gdb in Emacs.
1390case $srcdir in
1391*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1392esac
1393for ac_var in $ac_precious_vars; do
1394 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1395 eval ac_env_${ac_var}_value=\$${ac_var}
1396 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1398done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400#
1401# Report the --help message.
1402#
1403if test "$ac_init_help" = "long"; then
1404 # Omit some internal or obsolete options to make the list less imposing.
1405 # This message is too long to be a string in the A/UX 3.1 sh.
1406 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001407\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
1409Usage: $0 [OPTION]... [VAR=VALUE]...
1410
1411To assign environment variables (e.g., CC, CFLAGS...), specify them as
1412VAR=VALUE. See below for descriptions of some of the useful variables.
1413
1414Defaults for the options are specified in brackets.
1415
1416Configuration:
1417 -h, --help display this help and exit
1418 --help=short display options specific to this package
1419 --help=recursive display the short help of all the included packages
1420 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001421 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --cache-file=FILE cache test results in FILE [disabled]
1423 -C, --config-cache alias for \`--cache-file=config.cache'
1424 -n, --no-create do not create output files
1425 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1426
Martin v. Löwis11437992002-04-12 09:54:03 +00001427Installation directories:
1428 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432
1433By default, \`make install' will install all the files in
1434\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1435an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1436for instance \`--prefix=\$HOME'.
1437
1438For better control, use the options below.
1439
1440Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001441 --bindir=DIR user executables [EPREFIX/bin]
1442 --sbindir=DIR system admin executables [EPREFIX/sbin]
1443 --libexecdir=DIR program executables [EPREFIX/libexec]
1444 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1445 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1446 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1447 --libdir=DIR object code libraries [EPREFIX/lib]
1448 --includedir=DIR C header files [PREFIX/include]
1449 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1450 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1451 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1452 --infodir=DIR info documentation [DATAROOTDIR/info]
1453 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1454 --mandir=DIR man documentation [DATAROOTDIR/man]
1455 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1456 --htmldir=DIR html documentation [DOCDIR]
1457 --dvidir=DIR dvi documentation [DOCDIR]
1458 --pdfdir=DIR pdf documentation [DOCDIR]
1459 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461
1462 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001463
1464System types:
1465 --build=BUILD configure for building on BUILD [guessed]
1466 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001467_ACEOF
1468fi
1469
1470if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001472 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001473 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 cat <<\_ACEOF
1475
1476Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1479 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001480 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001481 create a universal binary build. SDKDIR specifies
1482 which macOS SDK should be used to perform the build,
1483 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001485 create a Python.framework rather than a traditional
1486 Unix install. optional INSTALLDIR specifies the
1487 installation path. see Mac/README.rst (default is
1488 no)
1489 --enable-shared enable building a shared Python library (default is
1490 no)
1491 --enable-profiling enable C-level code profiling with gprof (default is
1492 no)
1493 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1494 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001495 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001496 support loadable extensions in _sqlite module, see
1497 Doc/library/sqlite3.rst (default is no)
1498 --enable-ipv6 enable ipv6 (with ipv4) support, see
1499 Doc/library/socket.rst (default is yes if supported)
1500 --enable-big-digits[=15|30]
1501 use big digits (30 or 15 bits) for Python longs
1502 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001503
1504Optional Packages:
1505 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1506 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001507 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001508 specify the kind of universal binary that should be
1509 created. this option is only valid when
1510 --enable-universalsdk is set; options are:
1511 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1512 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001513 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001514 specify the name for the python framework on macOS
1515 only valid when --enable-framework is set. see
1516 Mac/README.rst (default is 'Python')
1517 --with-cxx-main[=COMPILER]
1518 compile main() and link Python executable with C++
1519 compiler specified in COMPILER (default is $CXX)
1520 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1521 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001522 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001523 (default is no)
1524 --with-assertions build with C assertions enabled (default is no)
1525 --with-lto enable Link-Time-Optimization in any build (default
1526 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001527 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001528 select hash algorithm for use in Python/pyhash.c
1529 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001530 --with-tzpath=<list of absolute paths separated by pathsep>
1531 Select the default time zone search path for zoneinfo.TZPATH
1532
Charles-François Natalid30b0222014-05-08 23:08:51 +01001533 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001534 enable AddressSanitizer memory error detector,
1535 'asan' (default is no)
1536 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1537 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001538 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001539 enable UndefinedBehaviorSanitizer undefined
1540 behaviour detector, 'ubsan' (default is no)
1541 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001542 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001543 library, see Doc/library/pyexpat.rst (default is no)
1544 --with-system-ffi build _ctypes module using an installed ffi library,
1545 see Doc/library/ctypes.rst (default is
1546 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001547 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001548 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001549 --with-decimal-contextvar
1550 build _decimal module using a coroutine-local rather
1551 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001552 --with-tcltk-includes='-I...'
1553 override search for Tcl and Tk include files
1554 --with-tcltk-libs='-L...'
1555 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001556 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001557 override order to check db backends for dbm; a valid
1558 value is a colon separated string with the backend
1559 names `ndbm', `gdbm' and `bdb'.
1560 --with-doc-strings enable documentation strings (default is yes)
1561 --with-pymalloc enable specialized mallocs (default is yes)
1562 --with-c-locale-coercion
1563 enable C locale coercion to a UTF-8 based locale
1564 (default is yes)
1565 --with-valgrind enable Valgrind support (default is no)
1566 --with-dtrace enable DTrace support (default is no)
1567 --with-libm=STRING override libm math library to STRING (default is
1568 system-dependent)
1569 --with-libc=STRING override libc C library to STRING (default is
1570 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001571 --with-platlibdir=DIRNAME
1572 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001573 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001574 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001575 --with-ensurepip[=install|upgrade|no]
1576 "install" or "upgrade" using bundled pip (default is
1577 upgrade)
1578 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001579 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001580 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001581 Python's preferred selection (default), openssl:
1582 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001583 custom string, PROTOCOL_SSLv2 ignores the setting,
1584 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001585 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1586 builtin hash modules, md5, sha1, sha256, sha512,
1587 sha3 (with shake), blake2
Martin v. Löwis11437992002-04-12 09:54:03 +00001588
1589Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001590 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 CC C compiler command
1592 CFLAGS C compiler flags
1593 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1594 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001596 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001599 PROFILE_TASK
1600 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001601 PKG_CONFIG path to pkg-config utility
1602 PKG_CONFIG_PATH
1603 directories to add to pkg-config's search path
1604 PKG_CONFIG_LIBDIR
1605 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001606
1607Use these variables to override the choices made by `configure' or to help
1608it to find libraries and programs with nonstandard names/locations.
1609
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001610Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001611_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001613fi
1614
1615if test "$ac_init_help" = "recursive"; then
1616 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001618 test -d "$ac_dir" ||
1619 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1620 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 ac_builddir=.
1622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623case "$ac_dir" in
1624.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1625*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001628 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629 case $ac_top_builddir_sub in
1630 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1631 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1632 esac ;;
1633esac
1634ac_abs_top_builddir=$ac_pwd
1635ac_abs_builddir=$ac_pwd$ac_dir_suffix
1636# for backward compatibility:
1637ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001638
1639case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001641 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 ac_top_srcdir=$ac_top_builddir_sub
1643 ac_abs_top_srcdir=$ac_pwd ;;
1644 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646 ac_top_srcdir=$srcdir
1647 ac_abs_top_srcdir=$srcdir ;;
1648 *) # Relative name.
1649 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1650 ac_top_srcdir=$ac_top_build_prefix$srcdir
1651 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001652esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655 cd "$ac_dir" || { ac_status=$?; continue; }
1656 # Check for guested configure.
1657 if test -f "$ac_srcdir/configure.gnu"; then
1658 echo &&
1659 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1660 elif test -f "$ac_srcdir/configure"; then
1661 echo &&
1662 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001664 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001665 fi || ac_status=$?
1666 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001667 done
1668fi
1669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001670test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001671if $ac_init_version; then
1672 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001673python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001674generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001675
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001676Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001677This configure script is free software; the Free Software Foundation
1678gives unlimited permission to copy, distribute and modify it.
1679_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001680 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001682
1683## ------------------------ ##
1684## Autoconf initialization. ##
1685## ------------------------ ##
1686
1687# ac_fn_c_try_compile LINENO
1688# --------------------------
1689# Try to compile conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_compile ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 rm -f conftest.$ac_objext
1694 if { { ac_try="$ac_compile"
1695case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698esac
1699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700$as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_compile") 2>conftest.err
1702 ac_status=$?
1703 if test -s conftest.err; then
1704 grep -v '^ *+' conftest.err >conftest.er1
1705 cat conftest.er1 >&5
1706 mv -f conftest.er1 conftest.err
1707 fi
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } && {
1710 test -z "$ac_c_werror_flag" ||
1711 test ! -s conftest.err
1712 } && test -s conftest.$ac_objext; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: failed program was:" >&5
1716sed 's/^/| /' conftest.$ac_ext >&5
1717
1718 ac_retval=1
1719fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001720 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001721 as_fn_set_status $ac_retval
1722
1723} # ac_fn_c_try_compile
1724
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001725# ac_fn_c_try_cpp LINENO
1726# ----------------------
1727# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1728ac_fn_c_try_cpp ()
1729{
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1731 if { { ac_try="$ac_cpp conftest.$ac_ext"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } > conftest.i && {
1747 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 }; then :
1750 ac_retval=0
1751else
1752 $as_echo "$as_me: failed program was:" >&5
1753sed 's/^/| /' conftest.$ac_ext >&5
1754
1755 ac_retval=1
1756fi
1757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1758 as_fn_set_status $ac_retval
1759
1760} # ac_fn_c_try_cpp
1761
Matthias Kloseb9621712010-04-24 17:59:49 +00001762# ac_fn_c_try_link LINENO
1763# -----------------------
1764# Try to link conftest.$ac_ext, and return whether this succeeded.
1765ac_fn_c_try_link ()
1766{
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 rm -f conftest.$ac_objext conftest$ac_exeext
1769 if { { ac_try="$ac_link"
1770case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_link") 2>conftest.err
1777 ac_status=$?
1778 if test -s conftest.err; then
1779 grep -v '^ *+' conftest.err >conftest.er1
1780 cat conftest.er1 >&5
1781 mv -f conftest.er1 conftest.err
1782 fi
1783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784 test $ac_status = 0; } && {
1785 test -z "$ac_c_werror_flag" ||
1786 test ! -s conftest.err
1787 } && test -s conftest$ac_exeext && {
1788 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001789 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001790 }; then :
1791 ac_retval=0
1792else
1793 $as_echo "$as_me: failed program was:" >&5
1794sed 's/^/| /' conftest.$ac_ext >&5
1795
1796 ac_retval=1
1797fi
1798 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1799 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1800 # interfere with the next link command; also delete a directory that is
1801 # left behind by Apple's compiler. We do this before executing the actions.
1802 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001803 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001804 as_fn_set_status $ac_retval
1805
1806} # ac_fn_c_try_link
1807
Matthias Kloseb9621712010-04-24 17:59:49 +00001808# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1809# -------------------------------------------------------
1810# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1811# the include files in INCLUDES and setting the cache variable VAR
1812# accordingly.
1813ac_fn_c_check_header_mongrel ()
1814{
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001816 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001819if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 $as_echo_n "(cached) " >&6
1821fi
1822eval ac_res=\$$3
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824$as_echo "$ac_res" >&6; }
1825else
1826 # Is the header compilable?
1827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1828$as_echo_n "checking $2 usability... " >&6; }
1829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832#include <$2>
1833_ACEOF
1834if ac_fn_c_try_compile "$LINENO"; then :
1835 ac_header_compiler=yes
1836else
1837 ac_header_compiler=no
1838fi
1839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1841$as_echo "$ac_header_compiler" >&6; }
1842
1843# Is the header present?
1844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1845$as_echo_n "checking $2 presence... " >&6; }
1846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848#include <$2>
1849_ACEOF
1850if ac_fn_c_try_cpp "$LINENO"; then :
1851 ac_header_preproc=yes
1852else
1853 ac_header_preproc=no
1854fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001855rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1857$as_echo "$ac_header_preproc" >&6; }
1858
1859# So? What about this header?
1860case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1861 yes:no: )
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1863$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1865$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1866 ;;
1867 no:yes:* )
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1869$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1871$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1873$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1875$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1877$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001878( $as_echo "## --------------------------------------- ##
1879## Report this to https://bugs.python.org/ ##
1880## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001881 ) | sed "s/^/$as_me: WARNING: /" >&2
1882 ;;
1883esac
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001886if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 $as_echo_n "(cached) " >&6
1888else
1889 eval "$3=\$ac_header_compiler"
1890fi
1891eval ac_res=\$$3
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1893$as_echo "$ac_res" >&6; }
1894fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001896
1897} # ac_fn_c_check_header_mongrel
1898
1899# ac_fn_c_try_run LINENO
1900# ----------------------
1901# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1902# that executables *can* be run.
1903ac_fn_c_try_run ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 if { { ac_try="$ac_link"
1907case "(($ac_try" in
1908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1909 *) ac_try_echo=$ac_try;;
1910esac
1911eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1912$as_echo "$ac_try_echo"; } >&5
1913 (eval "$ac_link") 2>&5
1914 ac_status=$?
1915 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1916 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1917 { { case "(($ac_try" in
1918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1919 *) ac_try_echo=$ac_try;;
1920esac
1921eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1922$as_echo "$ac_try_echo"; } >&5
1923 (eval "$ac_try") 2>&5
1924 ac_status=$?
1925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1926 test $ac_status = 0; }; }; then :
1927 ac_retval=0
1928else
1929 $as_echo "$as_me: program exited with status $ac_status" >&5
1930 $as_echo "$as_me: failed program was:" >&5
1931sed 's/^/| /' conftest.$ac_ext >&5
1932
1933 ac_retval=$ac_status
1934fi
1935 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001937 as_fn_set_status $ac_retval
1938
1939} # ac_fn_c_try_run
1940
1941# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1942# -------------------------------------------------------
1943# Tests whether HEADER exists and can be compiled using the include files in
1944# INCLUDES, setting the cache variable VAR accordingly.
1945ac_fn_c_check_header_compile ()
1946{
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1949$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001950if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 $as_echo_n "(cached) " >&6
1952else
1953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1954/* end confdefs.h. */
1955$4
1956#include <$2>
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 eval "$3=yes"
1960else
1961 eval "$3=no"
1962fi
1963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1964fi
1965eval ac_res=\$$3
1966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1967$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001969
1970} # ac_fn_c_check_header_compile
1971
Matthias Kloseb9621712010-04-24 17:59:49 +00001972# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1973# -------------------------------------------
1974# Tests whether TYPE exists after having included INCLUDES, setting cache
1975# variable VAR accordingly.
1976ac_fn_c_check_type ()
1977{
1978 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1980$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001981if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001982 $as_echo_n "(cached) " >&6
1983else
1984 eval "$3=no"
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$4
1988int
1989main ()
1990{
1991if (sizeof ($2))
1992 return 0;
1993 ;
1994 return 0;
1995}
1996_ACEOF
1997if ac_fn_c_try_compile "$LINENO"; then :
1998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004if (sizeof (($2)))
2005 return 0;
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011
2012else
2013 eval "$3=yes"
2014fi
2015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2016fi
2017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2018fi
2019eval ac_res=\$$3
2020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2021$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002022 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024} # ac_fn_c_check_type
2025
Matthias Kloseb9621712010-04-24 17:59:49 +00002026# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2027# --------------------------------------------
2028# Tries to find the compile-time value of EXPR in a program that includes
2029# INCLUDES, setting VAR accordingly. Returns whether the value could be
2030# computed
2031ac_fn_c_compute_int ()
2032{
2033 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2034 if test "$cross_compiling" = yes; then
2035 # Depending upon the size, compute the lo and hi bounds.
2036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$4
2039int
2040main ()
2041{
2042static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 ac_lo=0 ac_mid=0
2052 while :; do
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_hi=$ac_mid; break
2069else
2070 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2071 if test $ac_lo -le $ac_mid; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
2083int
2084main ()
2085{
2086static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002087test_array [0] = 0;
2088return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002089
2090 ;
2091 return 0;
2092}
2093_ACEOF
2094if ac_fn_c_try_compile "$LINENO"; then :
2095 ac_hi=-1 ac_mid=-1
2096 while :; do
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002104test_array [0] = 0;
2105return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111if ac_fn_c_try_compile "$LINENO"; then :
2112 ac_lo=$ac_mid; break
2113else
2114 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2115 if test $ac_mid -le $ac_hi; then
2116 ac_lo= ac_hi=
2117 break
2118 fi
2119 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122 done
2123else
2124 ac_lo= ac_hi=
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127fi
2128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2129# Binary search between lo and hi bounds.
2130while test "x$ac_lo" != "x$ac_hi"; do
2131 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135int
2136main ()
2137{
2138static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002139test_array [0] = 0;
2140return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002141
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_c_try_compile "$LINENO"; then :
2147 ac_hi=$ac_mid
2148else
2149 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152done
2153case $ac_lo in #((
2154?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2155'') ac_retval=1 ;;
2156esac
2157 else
2158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159/* end confdefs.h. */
2160$4
2161static long int longval () { return $2; }
2162static unsigned long int ulongval () { return $2; }
2163#include <stdio.h>
2164#include <stdlib.h>
2165int
2166main ()
2167{
2168
2169 FILE *f = fopen ("conftest.val", "w");
2170 if (! f)
2171 return 1;
2172 if (($2) < 0)
2173 {
2174 long int i = longval ();
2175 if (i != ($2))
2176 return 1;
2177 fprintf (f, "%ld", i);
2178 }
2179 else
2180 {
2181 unsigned long int i = ulongval ();
2182 if (i != ($2))
2183 return 1;
2184 fprintf (f, "%lu", i);
2185 }
2186 /* Do not output a trailing newline, as this causes \r\n confusion
2187 on some platforms. */
2188 return ferror (f) || fclose (f) != 0;
2189
2190 ;
2191 return 0;
2192}
2193_ACEOF
2194if ac_fn_c_try_run "$LINENO"; then :
2195 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2196else
2197 ac_retval=1
2198fi
2199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2200 conftest.$ac_objext conftest.beam conftest.$ac_ext
2201rm -f conftest.val
2202
2203 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002204 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002205 as_fn_set_status $ac_retval
2206
2207} # ac_fn_c_compute_int
2208
2209# ac_fn_c_check_func LINENO FUNC VAR
2210# ----------------------------------
2211# Tests whether FUNC exists, setting the cache variable VAR accordingly
2212ac_fn_c_check_func ()
2213{
2214 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2216$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002217if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002218 $as_echo_n "(cached) " >&6
2219else
2220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2221/* end confdefs.h. */
2222/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2223 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2224#define $2 innocuous_$2
2225
2226/* System header to define __stub macros and hopefully few prototypes,
2227 which can conflict with char $2 (); below.
2228 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2229 <limits.h> exists even on freestanding compilers. */
2230
2231#ifdef __STDC__
2232# include <limits.h>
2233#else
2234# include <assert.h>
2235#endif
2236
2237#undef $2
2238
2239/* Override any GCC internal prototype to avoid an error.
2240 Use char because int might match the return type of a GCC
2241 builtin and then its argument prototype would still apply. */
2242#ifdef __cplusplus
2243extern "C"
2244#endif
2245char $2 ();
2246/* The GNU C library defines this for functions which it implements
2247 to always fail with ENOSYS. Some functions are actually named
2248 something starting with __ and the normal name is an alias. */
2249#if defined __stub_$2 || defined __stub___$2
2250choke me
2251#endif
2252
2253int
2254main ()
2255{
2256return $2 ();
2257 ;
2258 return 0;
2259}
2260_ACEOF
2261if ac_fn_c_try_link "$LINENO"; then :
2262 eval "$3=yes"
2263else
2264 eval "$3=no"
2265fi
2266rm -f core conftest.err conftest.$ac_objext \
2267 conftest$ac_exeext conftest.$ac_ext
2268fi
2269eval ac_res=\$$3
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2271$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002272 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002273
2274} # ac_fn_c_check_func
2275
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002276# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2277# ---------------------------------------------
2278# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2279# accordingly.
2280ac_fn_c_check_decl ()
2281{
2282 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283 as_decl_name=`echo $2|sed 's/ *(.*//'`
2284 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2286$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2287if eval \${$3+:} false; then :
2288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$4
2293int
2294main ()
2295{
2296#ifndef $as_decl_name
2297#ifdef __cplusplus
2298 (void) $as_decl_use;
2299#else
2300 (void) $as_decl_name;
2301#endif
2302#endif
2303
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$3=yes"
2310else
2311 eval "$3=no"
2312fi
2313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314fi
2315eval ac_res=\$$3
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2317$as_echo "$ac_res" >&6; }
2318 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2319
2320} # ac_fn_c_check_decl
2321
Matthias Kloseb9621712010-04-24 17:59:49 +00002322# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2323# ----------------------------------------------------
2324# Tries to find if the field MEMBER exists in type AGGR, after including
2325# INCLUDES, setting cache variable VAR accordingly.
2326ac_fn_c_check_member ()
2327{
2328 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2330$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002331if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002332 $as_echo_n "(cached) " >&6
2333else
2334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335/* end confdefs.h. */
2336$5
2337int
2338main ()
2339{
2340static $2 ac_aggr;
2341if (ac_aggr.$3)
2342return 0;
2343 ;
2344 return 0;
2345}
2346_ACEOF
2347if ac_fn_c_try_compile "$LINENO"; then :
2348 eval "$4=yes"
2349else
2350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2351/* end confdefs.h. */
2352$5
2353int
2354main ()
2355{
2356static $2 ac_aggr;
2357if (sizeof ac_aggr.$3)
2358return 0;
2359 ;
2360 return 0;
2361}
2362_ACEOF
2363if ac_fn_c_try_compile "$LINENO"; then :
2364 eval "$4=yes"
2365else
2366 eval "$4=no"
2367fi
2368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369fi
2370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371fi
2372eval ac_res=\$$4
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2374$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002375 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002376
2377} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002379This file contains any messages produced by compilers while
2380running configure, to aid debugging if configure makes a mistake.
2381
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002382It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002383generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385 $ $0 $@
2386
2387_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002388exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002389{
2390cat <<_ASUNAME
2391## --------- ##
2392## Platform. ##
2393## --------- ##
2394
2395hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2396uname -m = `(uname -m) 2>/dev/null || echo unknown`
2397uname -r = `(uname -r) 2>/dev/null || echo unknown`
2398uname -s = `(uname -s) 2>/dev/null || echo unknown`
2399uname -v = `(uname -v) 2>/dev/null || echo unknown`
2400
2401/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2402/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2403
2404/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2405/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2406/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002408/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2409/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2410/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2411
2412_ASUNAME
2413
2414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2415for as_dir in $PATH
2416do
2417 IFS=$as_save_IFS
2418 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 $as_echo "PATH: $as_dir"
2420 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002421IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002422
2423} >&5
2424
2425cat >&5 <<_ACEOF
2426
2427
2428## ----------- ##
2429## Core tests. ##
2430## ----------- ##
2431
2432_ACEOF
2433
2434
2435# Keep a trace of the command line.
2436# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002437# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002438# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002439# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002440ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002441ac_configure_args0=
2442ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002443ac_must_keep_next=false
2444for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002445do
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 for ac_arg
2447 do
2448 case $ac_arg in
2449 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2450 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2451 | -silent | --silent | --silen | --sile | --sil)
2452 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002453 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002455 esac
2456 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002460 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002461 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002462 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002463 case $ac_arg in
2464 *=* | --config-cache | -C | -disable-* | --disable-* \
2465 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2466 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2467 | -with-* | --with-* | -without-* | --without-* | --x)
2468 case "$ac_configure_args0 " in
2469 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2470 esac
2471 ;;
2472 -* ) ac_must_keep_next=true ;;
2473 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002474 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 ;;
2477 esac
2478 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002479done
Matthias Kloseb9621712010-04-24 17:59:49 +00002480{ ac_configure_args0=; unset ac_configure_args0;}
2481{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002482
2483# When interrupted or exit'd, cleanup temporary files, and complete
2484# config.log. We remove comments because anyway the quotes in there
2485# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486# WARNING: Use '\'' to represent an apostrophe within the trap.
2487# 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 +00002488trap 'exit_status=$?
2489 # Save into config.log some information that might help in debugging.
2490 {
2491 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002492
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002494## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 echo
2497 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498(
2499 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2500 eval ac_val=\$$ac_var
2501 case $ac_val in #(
2502 *${as_nl}*)
2503 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2505$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 esac
2507 case $ac_var in #(
2508 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2510 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac ;;
2512 esac
2513 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2516 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 "s/'\''/'\''\\\\'\'''\''/g;
2519 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2520 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002521 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002523 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac |
2525 sort
2526)
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002528
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002529 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002530## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 echo
2533 for ac_var in $ac_subst_vars
2534 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 eval ac_val=\$$ac_var
2536 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 done | sort
2541 echo
2542
2543 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002544 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002546## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002547 echo
2548 for ac_var in $ac_subst_files
2549 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 eval ac_val=\$$ac_var
2551 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002552 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002554 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 done | sort
2556 echo
2557 fi
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002560 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002561## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 echo
2566 fi
2567 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002568 $as_echo "$as_me: caught signal $ac_signal"
2569 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 rm -f core *.core core.conftest.* &&
2572 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002575for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002577done
2578ac_signal=0
2579
2580# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
Matthias Kloseb9621712010-04-24 17:59:49 +00002583$as_echo "/* confdefs.h */" > confdefs.h
2584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585# Predefined preprocessor variables.
2586
2587cat >>confdefs.h <<_ACEOF
2588#define PACKAGE_NAME "$PACKAGE_NAME"
2589_ACEOF
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591cat >>confdefs.h <<_ACEOF
2592#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2593_ACEOF
2594
Martin v. Löwis11437992002-04-12 09:54:03 +00002595cat >>confdefs.h <<_ACEOF
2596#define PACKAGE_VERSION "$PACKAGE_VERSION"
2597_ACEOF
2598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599cat >>confdefs.h <<_ACEOF
2600#define PACKAGE_STRING "$PACKAGE_STRING"
2601_ACEOF
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603cat >>confdefs.h <<_ACEOF
2604#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2605_ACEOF
2606
Matthias Kloseb9621712010-04-24 17:59:49 +00002607cat >>confdefs.h <<_ACEOF
2608#define PACKAGE_URL "$PACKAGE_URL"
2609_ACEOF
2610
Martin v. Löwis11437992002-04-12 09:54:03 +00002611
2612# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002613# Prefer an explicitly selected file to automatically selected ones.
2614ac_site_file1=NONE
2615ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002617 # We do not want a PATH search for config.site.
2618 case $CONFIG_SITE in #((
2619 -*) ac_site_file1=./$CONFIG_SITE;;
2620 */*) ac_site_file1=$CONFIG_SITE;;
2621 *) ac_site_file1=./$CONFIG_SITE;;
2622 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 ac_site_file1=$prefix/share/config.site
2625 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626else
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 ac_site_file1=$ac_default_prefix/share/config.site
2628 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002630for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631do
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 test "x$ac_site_file" = xNONE && continue
2633 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2635$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002637 . "$ac_site_file" \
2638 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2640as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002641See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002642 fi
2643done
2644
2645if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 # Some versions of bash will fail to source /dev/null (special files
2647 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2648 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2650$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2653 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 esac
2655 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002656else
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2658$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 >$cache_file
2660fi
2661
2662# Check that the precious variables saved in the cache have kept the same
2663# value.
2664ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002665for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2667 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2669 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 case $ac_old_set,$ac_new_set in
2671 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2673$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 +00002674 ac_cache_corrupted=: ;;
2675 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2677$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 ac_cache_corrupted=: ;;
2679 ,);;
2680 *)
2681 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 # differences in whitespace do not lead to failure.
2683 ac_old_val_w=`echo x $ac_old_val`
2684 ac_new_val_w=`echo x $ac_new_val`
2685 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2687$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2688 ac_cache_corrupted=:
2689 else
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2691$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2692 eval $ac_var=\$ac_old_val
2693 fi
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2695$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2697$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 fi;;
2699 esac
2700 # Pass precious variables to config.status.
2701 if test "$ac_new_set" = set; then
2702 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002703 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 *) ac_arg=$ac_var=$ac_new_val ;;
2705 esac
2706 case " $ac_configure_args " in
2707 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 esac
2710 fi
2711done
2712if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2716$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002717 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002719## -------------------- ##
2720## Main body of script. ##
2721## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722
Guido van Rossum7f43da71994-08-01 12:15:30 +00002723ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002725ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2726ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2727ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002728
Guido van Rossum627b2d71993-12-24 10:39:16 +00002729
Michael W. Hudson54241132001-12-07 15:38:26 +00002730
Trent Nelson4d4ec652012-10-16 08:51:24 -04002731
Christian Heimesff5be6e2018-01-20 13:19:21 +01002732
2733
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002734if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002735 # If we're building out-of-tree, we need to make sure the following
2736 # resources get picked up before their $srcdir counterparts.
2737 # Objects/ -> typeslots.inc
2738 # Include/ -> Python-ast.h, graminit.h
2739 # Python/ -> importlib.h
2740 # (A side effect of this is that these resources will automatically be
2741 # regenerated when building out-of-tree, regardless of whether or not
2742 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2743 # off.)
2744 BASECPPFLAGS="-IObjects -IInclude -IPython"
2745else
2746 BASECPPFLAGS=""
2747fi
2748
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749
2750
2751
2752
Victor Stinner9ed34a82017-05-02 22:35:58 +02002753if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755# Extract the first word of "git", so it can be a program name with args.
2756set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2758$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760 $as_echo_n "(cached) " >&6
2761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 if test -n "$HAS_GIT"; then
2763 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764else
2765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2766for as_dir in $PATH
2767do
2768 IFS=$as_save_IFS
2769 test -z "$as_dir" && as_dir=.
2770 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002772 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2774 break 2
2775 fi
2776done
2777 done
2778IFS=$as_save_IFS
2779
Ned Deily5c4b0d02017-03-04 00:19:55 -05002780 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002781fi
2782fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002783HAS_GIT=$ac_cv_prog_HAS_GIT
2784if test -n "$HAS_GIT"; then
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2786$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787else
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2789$as_echo "no" >&6; }
2790fi
2791
2792
2793else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002794HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002795fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002796if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002797then
Xiang Zhang4c855572018-08-20 22:36:19 +08002798 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2799 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2800 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002801else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002802 GITVERSION=""
2803 GITTAG=""
2804 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002805fi
2806
2807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002808ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002809
2810
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002811ac_aux_dir=
2812for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2813 if test -f "$ac_dir/install-sh"; then
2814 ac_aux_dir=$ac_dir
2815 ac_install_sh="$ac_aux_dir/install-sh -c"
2816 break
2817 elif test -f "$ac_dir/install.sh"; then
2818 ac_aux_dir=$ac_dir
2819 ac_install_sh="$ac_aux_dir/install.sh -c"
2820 break
2821 elif test -f "$ac_dir/shtool"; then
2822 ac_aux_dir=$ac_dir
2823 ac_install_sh="$ac_aux_dir/shtool install -c"
2824 break
2825 fi
2826done
2827if test -z "$ac_aux_dir"; then
2828 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2829fi
2830
2831# These three variables are undocumented and unsupported,
2832# and are intended to be withdrawn in a future Autoconf release.
2833# They can cause serious problems if a builder's source tree is in a directory
2834# whose full name contains unusual characters.
2835ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2836ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2837ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2838
2839
2840# Make sure we can run config.sub.
2841$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2842 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2843
2844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2845$as_echo_n "checking build system type... " >&6; }
2846if ${ac_cv_build+:} false; then :
2847 $as_echo_n "(cached) " >&6
2848else
2849 ac_build_alias=$build_alias
2850test "x$ac_build_alias" = x &&
2851 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2852test "x$ac_build_alias" = x &&
2853 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2854ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2855 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2856
2857fi
2858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2859$as_echo "$ac_cv_build" >&6; }
2860case $ac_cv_build in
2861*-*-*) ;;
2862*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2863esac
2864build=$ac_cv_build
2865ac_save_IFS=$IFS; IFS='-'
2866set x $ac_cv_build
2867shift
2868build_cpu=$1
2869build_vendor=$2
2870shift; shift
2871# Remember, the first character of IFS is used to create $*,
2872# except with old shells:
2873build_os=$*
2874IFS=$ac_save_IFS
2875case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2876
2877
2878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2879$as_echo_n "checking host system type... " >&6; }
2880if ${ac_cv_host+:} false; then :
2881 $as_echo_n "(cached) " >&6
2882else
2883 if test "x$host_alias" = x; then
2884 ac_cv_host=$ac_cv_build
2885else
2886 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2887 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2888fi
2889
2890fi
2891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2892$as_echo "$ac_cv_host" >&6; }
2893case $ac_cv_host in
2894*-*-*) ;;
2895*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2896esac
2897host=$ac_cv_host
2898ac_save_IFS=$IFS; IFS='-'
2899set x $ac_cv_host
2900shift
2901host_cpu=$1
2902host_vendor=$2
2903shift; shift
2904# Remember, the first character of IFS is used to create $*,
2905# except with old shells:
2906host_os=$*
2907IFS=$ac_save_IFS
2908case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2909
2910
2911
doko@python.orga10e4a92013-01-25 18:45:12 +01002912
2913
Ned Deilyfcbc2462014-08-22 13:32:49 -07002914# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2915rm -f pybuilddir.txt
2916
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917for ac_prog in python$PACKAGE_VERSION python3 python
2918do
2919 # Extract the first word of "$ac_prog", so it can be a program name with args.
2920set dummy $ac_prog; ac_word=$2
2921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2922$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002923if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002924 $as_echo_n "(cached) " >&6
2925else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002926 if test -n "$PYTHON_FOR_REGEN"; then
2927 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002928else
2929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2930for as_dir in $PATH
2931do
2932 IFS=$as_save_IFS
2933 test -z "$as_dir" && as_dir=.
2934 for ac_exec_ext in '' $ac_executable_extensions; do
2935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002936 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2938 break 2
2939 fi
2940done
2941 done
2942IFS=$as_save_IFS
2943
2944fi
2945fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002946PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2947if test -n "$PYTHON_FOR_REGEN"; then
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2949$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002950else
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2952$as_echo "no" >&6; }
2953fi
2954
2955
Victor Stinnera5c62a82017-05-03 18:21:48 +02002956 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002957done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002958test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002959
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002960
2961
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002962if test "$cross_compiling" = yes; then
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2964$as_echo_n "checking for python interpreter for cross build... " >&6; }
2965 if test -z "$PYTHON_FOR_BUILD"; then
2966 for interp in python$PACKAGE_VERSION python3 python; do
2967 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002968 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 +02002969 break
2970 fi
2971 interp=
2972 done
2973 if test x$interp = x; then
2974 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2975 fi
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2977$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002978 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 +02002979 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002980elif test "$cross_compiling" = maybe; then
2981 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002982else
2983 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2984fi
2985
2986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
Benjamin Petersond23f8222009-04-05 19:13:16 +00002988if test "$prefix" != "/"; then
2989 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2990fi
2991
2992
Martin v. Löwis11437992002-04-12 09:54:03 +00002993
2994
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002995# We don't use PACKAGE_ variables, and they cause conflicts
2996# with other autoconf-based packages that include Python.h
2997grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2998rm confdefs.h
2999mv confdefs.h.new confdefs.h
3000
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003001
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003002VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003003
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003004# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003005
3006SOVERSION=1.0
3007
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003008# The later defininition of _XOPEN_SOURCE disables certain features
3009# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012
3013
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003014# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3015# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3016# them.
3017
Matthias Kloseb9621712010-04-24 17:59:49 +00003018$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003019
3020
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003021# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3022# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3023# them.
3024
Matthias Kloseb9621712010-04-24 17:59:49 +00003025$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003026
3027
Martin v. Löwisd6320502004-08-12 13:45:08 +00003028# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003029# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3030# them.
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003033
3034
3035
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003036define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003037
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003038# Arguments passed to configure.
3039
3040CONFIG_ARGS="$ac_configure_args"
3041
Matthias Kloseb9621712010-04-24 17:59:49 +00003042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3043$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003045if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 case $enableval in
3048 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003049 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003050 # information
3051 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003052 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3055 if test ! -d "${enableval}"
3056 then
3057 enableval=/
3058 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060 ;;
3061 esac
3062 case $enableval in
3063 no)
3064 UNIVERSALSDK=
3065 enable_universalsdk=
3066 ;;
3067 *)
3068 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 if test ! -d "${UNIVERSALSDK}"
3070 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003071 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073 ;;
3074 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003075
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077else
3078
3079 UNIVERSALSDK=
3080 enable_universalsdk=
3081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003084if test -n "${UNIVERSALSDK}"
3085then
Matthias Kloseb9621712010-04-24 17:59:49 +00003086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3087$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088else
Matthias Kloseb9621712010-04-24 17:59:49 +00003089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3090$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003094
Ned Deily87adb6e2013-10-18 21:09:56 -07003095ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003096
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097# For backward compatibility reasons we prefer to select '32-bit' if available,
3098# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003100if test "`uname -s`" = "Darwin"
3101then
3102 if test -n "${UNIVERSALSDK}"
3103 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003104 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003105 then
3106 UNIVERSAL_ARCHS="intel"
3107 fi
3108 fi
3109fi
3110
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003111
Matthias Kloseb9621712010-04-24 17:59:49 +00003112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3113$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114
3115# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003116if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118 UNIVERSAL_ARCHS="$withval"
3119
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120fi
3121
Ned Deily87adb6e2013-10-18 21:09:56 -07003122if test -n "${UNIVERSALSDK}"
3123then
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3125$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3126else
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3128$as_echo "no" >&6; }
3129fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003131
3132# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003133if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003134 withval=$with_framework_name;
3135 PYTHONFRAMEWORK=${withval}
3136 PYTHONFRAMEWORKDIR=${withval}.framework
3137 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3138
3139else
3140
3141 PYTHONFRAMEWORK=Python
3142 PYTHONFRAMEWORKDIR=Python.framework
3143 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3144
3145fi
3146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003148if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003150 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003151 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003152 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003153 esac
3154 case $enableval in
3155 no)
3156 PYTHONFRAMEWORK=
3157 PYTHONFRAMEWORKDIR=no-framework
3158 PYTHONFRAMEWORKPREFIX=
3159 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003160 FRAMEWORKINSTALLFIRST=
3161 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 FRAMEWORKALTINSTALLFIRST=
3163 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003164 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003165 if test "x${prefix}" = "xNONE"; then
3166 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3167 else
3168 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3169 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003170 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003171 ;;
3172 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003173 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003176 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003177 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3178 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003179 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003181
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003182 if test "x${prefix}" = "xNONE" ; then
3183 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003185 else
3186 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3187 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188
3189 case "${enableval}" in
3190 /System*)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 if test "${prefix}" = "NONE" ; then
3193 # See below
3194 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3195 fi
3196 ;;
3197
3198 /Library*)
3199 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3200 ;;
3201
3202 */Library/Frameworks)
3203 MDIR="`dirname "${enableval}"`"
3204 MDIR="`dirname "${MDIR}"`"
3205 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3206
3207 if test "${prefix}" = "NONE"; then
3208 # User hasn't specified the
3209 # --prefix option, but wants to install
3210 # the framework in a non-default location,
3211 # ensure that the compatibility links get
3212 # installed relative to that prefix as well
3213 # instead of in /usr/local.
3214 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3215 fi
3216 ;;
3217
3218 *)
3219 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3220 ;;
3221 esac
3222
Jack Jansen127e56e2001-09-11 14:41:54 +00003223 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003227 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3232
3233 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3234
Jack Jansene578a632001-08-15 01:27:14 +00003235 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003236
Guido van Rossum563e7081996-09-10 18:20:48 +00003237else
Martin v. Löwis11437992002-04-12 09:54:03 +00003238
Jack Jansene578a632001-08-15 01:27:14 +00003239 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003240 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003241 PYTHONFRAMEWORKPREFIX=
3242 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243 FRAMEWORKINSTALLFIRST=
3244 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003245 FRAMEWORKALTINSTALLFIRST=
3246 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003247 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248 if test "x${prefix}" = "xNONE" ; then
3249 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3250 else
3251 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3252 fi
Jack Jansene578a632001-08-15 01:27:14 +00003253 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256fi
3257
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258
3259
Michael W. Hudson54241132001-12-07 15:38:26 +00003260
3261
3262
3263
Jack Jansene578a632001-08-15 01:27:14 +00003264
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003265
3266
3267
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003268
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003269
Ned Deilyb8f944f2013-11-21 22:42:25 -08003270
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003271
3272cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003273#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003274_ACEOF
3275
3276
Jack Jansene578a632001-08-15 01:27:14 +00003277##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003278## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003279## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003280##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281# Set name for machine-dependent library files
3282
Matthias Kloseb9621712010-04-24 17:59:49 +00003283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3284$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285if test -z "$MACHDEP"
3286then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003287 # avoid using uname for cross builds
3288 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003289 # ac_sys_system and ac_sys_release are used for setting
3290 # a lot of different things including 'define_xopen_source'
3291 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003293 *-*-linux-android*)
3294 ac_sys_system=Linux-android
3295 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 *-*-linux*)
3297 ac_sys_system=Linux
3298 ;;
3299 *-*-cygwin*)
3300 ac_sys_system=Cygwin
3301 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003302 *-*-vxworks*)
3303 ac_sys_system=VxWorks
3304 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003305 *)
3306 # for now, limit cross builds to known configurations
3307 MACHDEP="unknown"
3308 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3309 esac
3310 ac_sys_release=
3311 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003312 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003313 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003314 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003315 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003316 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003317 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003319 fi
3320 ac_md_system=`echo $ac_sys_system |
3321 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3322 ac_md_release=`echo $ac_sys_release |
3323 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3324 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003325
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003326 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003327 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003328 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003329 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003330 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003331 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003332 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003333fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3335$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003336
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003337
3338if test "$cross_compiling" = yes; then
3339 case "$host" in
3340 *-*-linux*)
3341 case "$host_cpu" in
3342 arm*)
3343 _host_cpu=arm
3344 ;;
3345 *)
3346 _host_cpu=$host_cpu
3347 esac
3348 ;;
3349 *-*-cygwin*)
3350 _host_cpu=
3351 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003352 *-*-vxworks*)
3353 _host_cpu=$host_cpu
3354 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003355 *)
3356 # for now, limit cross builds to known configurations
3357 MACHDEP="unknown"
3358 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3359 esac
3360 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3361fi
3362
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003363# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3364# disable features if it is defined, without any means to access these
3365# features as extensions. For these systems, we skip the definition of
3366# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3367# some feature, make sure there is no alternative way to access this
3368# feature. Also, when using wildcards, make sure you have verified the
3369# need for not defining _XOPEN_SOURCE on all systems matching the
3370# wildcard, and that the wildcard does not include future systems
3371# (which may remove their limitations).
3372case $ac_sys_system/$ac_sys_release in
3373 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3374 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003375 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003376 # In addition, Stefan Krah confirms that issue #1244610 exists through
3377 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003378 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003379 define_xopen_source=no
3380 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3381 # also defined. This can be overridden by defining _BSD_SOURCE
3382 # As this has a different meaning on Linux, only define it on OpenBSD
3383
Matthias Kloseb9621712010-04-24 17:59:49 +00003384$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003385
3386 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003387 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003388 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3389 # also defined. This can be overridden by defining _BSD_SOURCE
3390 # As this has a different meaning on Linux, only define it on OpenBSD
3391
Matthias Kloseb9621712010-04-24 17:59:49 +00003392$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003393
3394 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003395 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3396 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3397 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003398 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 +00003399 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003400 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3401 # request to enable features supported by the standard as a request
3402 # to disable features not supported by the standard. The best way
3403 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3404 # entirely and define __EXTENSIONS__ instead.
3405 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003406 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003407 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3408 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003409 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003410 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003411 define_xopen_source=no;;
3412 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003413 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003414 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003415 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003416 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3417 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3418 # identifies itself as Darwin/7.*
3419 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3420 # disables platform specific features beyond repair.
3421 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3422 # has no effect, don't bother defining them
3423 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003424 define_xopen_source=no;;
Miss Islington (bot)ad7a6672020-06-25 08:13:35 -07003425 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003426 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003427 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3428 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3429 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003430 AIX/4)
3431 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003432 AIX/5)
3433 if test `uname -r` -eq 1; then
3434 define_xopen_source=no
3435 fi
3436 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003437 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3438 # defining NI_NUMERICHOST.
3439 QNX/6.3.2)
3440 define_xopen_source=no
3441 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003442 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3443 # in network headers still using system V types.
3444 VxWorks/*)
3445 define_xopen_source=no
3446 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003447
Ian Nortona9edf442020-02-14 03:09:11 +00003448 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3449 # chroot() and other functions
3450 hp*|HP*)
3451 define_xopen_source=no
3452 ;;
3453
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003454esac
3455
3456if test $define_xopen_source = yes
3457then
Victor Stinner14d098d2011-09-07 22:29:43 +02003458 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
Victor Stinner14d098d2011-09-07 22:29:43 +02003460$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003461
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003462
3463 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3464 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3465 # several APIs are not declared. Since this is also needed in some
3466 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003467
Matthias Kloseb9621712010-04-24 17:59:49 +00003468$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003469
3470
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003471
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003472$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003473
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003474fi
3475
Christian Heimes647cd872013-12-07 23:39:33 +01003476# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3477case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003478 hp*|HP*)
3479 define_stdc_a1=yes;;
3480 *)
3481 define_stdc_a1=no;;
3482esac
3483
3484if test $define_stdc_a1 = yes
3485then
Christian Heimes647cd872013-12-07 23:39:33 +01003486
3487$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3488
Christian Heimesb02bcae2013-12-08 15:21:08 +01003489fi
Christian Heimes647cd872013-12-07 23:39:33 +01003490
Jack Jansen6b08a402004-06-03 12:41:45 +00003491# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3492# it may influence the way we can build extensions, so distutils
3493# needs to check it
3494
Thomas Wouters477c8d52006-05-27 19:21:47 +00003495
Jack Jansen6b08a402004-06-03 12:41:45 +00003496CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003497EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003498
Guido van Rossum627b2d71993-12-24 10:39:16 +00003499# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003500
3501# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3502# for debug/optimization stuff. BASECFLAGS is for flags that are required
3503# just to get things to compile and link. Users are free to override OPT
3504# when running configure or make. The build should not break if they do.
3505# BASECFLAGS should generally not be messed with, however.
3506
Guido van Rossum8b131c51995-03-09 14:10:13 +00003507# If the user switches compilers, we can't believe the cache
3508if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3509then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003510 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003511(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003512fi
3513
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003514# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3515# when the compiler supports them, but we don't always want -O2, and
3516# we set -g later.
3517if test -z "$CFLAGS"; then
3518 CFLAGS=
3519fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003520
3521if test "$ac_sys_system" = "Darwin"
3522then
3523 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003524 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003525 # information
3526 if test -z "${CC}"
3527 then
3528 found_gcc=
3529 found_clang=
3530 as_save_IFS=$IFS; IFS=:
3531 for as_dir in $PATH
3532 do
3533 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003534 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003535 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003536 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003537 fi
3538 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003539 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003541 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003542 fi
3543 fi
3544 done
3545 IFS=$as_save_IFS
3546
3547 if test -n "$found_gcc" -a -n "$found_clang"
3548 then
3549 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3550 then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3552$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3553 CC="$found_clang"
3554 CXX="$found_clang++"
3555 fi
3556
3557
3558 elif test -z "$found_gcc" -a -n "$found_clang"
3559 then
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3561$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3562 CC="$found_clang"
3563 CXX="$found_clang++"
3564
3565 elif test -z "$found_gcc" -a -z "$found_clang"
3566 then
3567 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3568 if test -n "${found_clang}"
3569 then
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3571$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3572 CC="${found_clang}"
3573 CXX="`/usr/bin/xcrun -find clang++`"
3574
3575 # else: use default behaviour
3576 fi
3577 fi
3578 fi
3579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003580ac_ext=c
3581ac_cpp='$CPP $CPPFLAGS'
3582ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3583ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3584ac_compiler_gnu=$ac_cv_c_compiler_gnu
3585if test -n "$ac_tool_prefix"; then
3586 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3587set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3589$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003590if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003592else
3593 if test -n "$CC"; then
3594 ac_cv_prog_CC="$CC" # Let the user override the test.
3595else
Martin v. Löwis11437992002-04-12 09:54:03 +00003596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3597for as_dir in $PATH
3598do
3599 IFS=$as_save_IFS
3600 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 $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 +00003605 break 2
3606 fi
3607done
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003610
Jack Jansendd19cf82001-12-06 22:36:17 +00003611fi
3612fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003613CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003614if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3616$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003617else
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3619$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003620fi
3621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624if test -z "$ac_cv_prog_CC"; then
3625 ac_ct_CC=$CC
3626 # Extract the first word of "gcc", so it can be a program name with args.
3627set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3629$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003630if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003632else
3633 if test -n "$ac_ct_CC"; then
3634 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3635else
3636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3637for as_dir in $PATH
3638do
3639 IFS=$as_save_IFS
3640 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 $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 +00003645 break 2
3646 fi
3647done
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003650
3651fi
3652fi
3653ac_ct_CC=$ac_cv_prog_ac_ct_CC
3654if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3656$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657else
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3659$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003660fi
3661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662 if test "x$ac_ct_CC" = x; then
3663 CC=""
3664 else
3665 case $cross_compiling:$ac_tool_warned in
3666yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669ac_tool_warned=yes ;;
3670esac
3671 CC=$ac_ct_CC
3672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003673else
3674 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003675fi
3676
Jack Jansendd19cf82001-12-06 22:36:17 +00003677if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678 if test -n "$ac_tool_prefix"; then
3679 # 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 +00003680set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3682$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003683if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003685else
3686 if test -n "$CC"; then
3687 ac_cv_prog_CC="$CC" # Let the user override the test.
3688else
Martin v. Löwis11437992002-04-12 09:54:03 +00003689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3690for as_dir in $PATH
3691do
3692 IFS=$as_save_IFS
3693 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 $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 +00003698 break 2
3699 fi
3700done
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003703
3704fi
3705fi
3706CC=$ac_cv_prog_CC
3707if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3709$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003710else
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3712$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713fi
3714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003717fi
3718if test -z "$CC"; then
3719 # Extract the first word of "cc", so it can be a program name with args.
3720set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3722$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003723if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003725else
3726 if test -n "$CC"; then
3727 ac_cv_prog_CC="$CC" # Let the user override the test.
3728else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003729 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3731for as_dir in $PATH
3732do
3733 IFS=$as_save_IFS
3734 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3738 ac_prog_rejected=yes
3739 continue
3740 fi
3741 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 $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 +00003743 break 2
3744 fi
3745done
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003748
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749if test $ac_prog_rejected = yes; then
3750 # We found a bogon in the path, so make sure we never use it.
3751 set dummy $ac_cv_prog_CC
3752 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754 # We chose a different compiler from the bogus one.
3755 # However, it has the same basename, so the bogon will be chosen
3756 # first if we set CC to just the basename; use the full file name.
3757 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003758 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759 fi
3760fi
3761fi
3762fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003763CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3766$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767else
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770fi
3771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772
Martin v. Löwis11437992002-04-12 09:54:03 +00003773fi
3774if test -z "$CC"; then
3775 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 do
3778 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3779set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3781$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003782if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003784else
3785 if test -n "$CC"; then
3786 ac_cv_prog_CC="$CC" # Let the user override the test.
3787else
Martin v. Löwis11437992002-04-12 09:54:03 +00003788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789for as_dir in $PATH
3790do
3791 IFS=$as_save_IFS
3792 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 $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 +00003797 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003798 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003799done
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003802
3803fi
3804fi
3805CC=$ac_cv_prog_CC
3806if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3808$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003809else
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3811$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003812fi
3813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 test -n "$CC" && break
3816 done
3817fi
3818if test -z "$CC"; then
3819 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003821do
3822 # Extract the first word of "$ac_prog", so it can be a program name with args.
3823set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3825$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003826if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003828else
3829 if test -n "$ac_ct_CC"; then
3830 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3831else
3832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835 IFS=$as_save_IFS
3836 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 $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 +00003841 break 2
3842 fi
3843done
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003846
Martin v. Löwis11437992002-04-12 09:54:03 +00003847fi
3848fi
3849ac_ct_CC=$ac_cv_prog_ac_ct_CC
3850if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3852$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853else
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003856fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 test -n "$ac_ct_CC" && break
3860done
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862 if test "x$ac_ct_CC" = x; then
3863 CC=""
3864 else
3865 case $cross_compiling:$ac_tool_warned in
3866yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003867{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3868$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869ac_tool_warned=yes ;;
3870esac
3871 CC=$ac_ct_CC
3872 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003873fi
3874
3875fi
3876
3877
Matthias Kloseb9621712010-04-24 17:59:49 +00003878test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003880as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003881See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003882
3883# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003884$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3885set X $ac_compile
3886ac_compiler=$2
3887for ac_option in --version -v -V -qversion; do
3888 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889case "(($ac_try" in
3890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3891 *) ac_try_echo=$ac_try;;
3892esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003893eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3894$as_echo "$ac_try_echo"; } >&5
3895 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003897 if test -s conftest.err; then
3898 sed '10a\
3899... rest of stderr output deleted ...
3900 10q' conftest.err >conftest.er1
3901 cat conftest.er1 >&5
3902 fi
3903 rm -f conftest.er1 conftest.err
3904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3905 test $ac_status = 0; }
3906done
Martin v. Löwis11437992002-04-12 09:54:03 +00003907
Matthias Kloseb9621712010-04-24 17:59:49 +00003908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003909/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003910
Martin v. Löwis11437992002-04-12 09:54:03 +00003911int
3912main ()
3913{
3914
3915 ;
3916 return 0;
3917}
3918_ACEOF
3919ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003920ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003921# Try to create an executable without -o first, disregard a.out.
3922# It will help us diagnose broken compilers, and finding out an intuition
3923# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3925$as_echo_n "checking whether the C compiler works... " >&6; }
3926ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3927
3928# The possible output files:
3929ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931ac_rmfiles=
3932for ac_file in $ac_files
3933do
3934 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3937 esac
3938done
3939rm -f $ac_rmfiles
3940
Matthias Kloseb9621712010-04-24 17:59:49 +00003941if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942case "(($ac_try" in
3943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3944 *) ac_try_echo=$ac_try;;
3945esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3947$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3951 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3953# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3954# in a Makefile. We should not override ac_cv_exeext if it was cached,
3955# so that the user can short-circuit this test for compilers unknown to
3956# Autoconf.
3957for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003958do
3959 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003960 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003962 ;;
3963 [ab].out )
3964 # We found the default executable, but exeext='' is most
3965 # certainly right.
3966 break;;
3967 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 then :; else
3970 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3971 fi
3972 # We set ac_cv_exeext here because the later test for it is not
3973 # safe: cross compilers may not add the suffix if given an `-o'
3974 # argument, so we may need to know it at that point already.
3975 # Even if this section looks crufty: it has the advantage of
3976 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003977 break;;
3978 * )
3979 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003980 esac
3981done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982test "$ac_cv_exeext" = no && ac_cv_exeext=
3983
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003984else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 ac_file=''
3986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003987if test -z "$ac_file"; then :
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3989$as_echo "no" >&6; }
3990$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003991sed 's/^/| /' conftest.$ac_ext >&5
3992
Matthias Kloseb9621712010-04-24 17:59:49 +00003993{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003995as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003996See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003997else
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3999$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4002$as_echo_n "checking for C compiler default output file name... " >&6; }
4003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4004$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004005ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006
Matthias Kloseb9621712010-04-24 17:59:49 +00004007rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4010$as_echo_n "checking for suffix of executables... " >&6; }
4011if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4017$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4021 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004022 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4023# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4024# work properly (i.e., refer to `conftest.exe'), while it won't with
4025# `rm'.
4026for ac_file in conftest.exe conftest conftest.*; do
4027 test -f "$ac_file" || continue
4028 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004030 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4031 break;;
4032 * ) break;;
4033 esac
4034done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004035else
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004038as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004039See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004041rm -f conftest conftest$ac_cv_exeext
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4043$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044
4045rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004046EXEEXT=$ac_cv_exeext
4047ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4049/* end confdefs.h. */
4050#include <stdio.h>
4051int
4052main ()
4053{
4054FILE *f = fopen ("conftest.out", "w");
4055 return ferror (f) || fclose (f) != 0;
4056
4057 ;
4058 return 0;
4059}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004061ac_clean_files="$ac_clean_files conftest.out"
4062# Check that the compiler produces executables we can run. If not, either
4063# the compiler is broken, or we cross compile.
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4065$as_echo_n "checking whether we are cross compiling... " >&6; }
4066if test "$cross_compiling" != yes; then
4067 { { ac_try="$ac_link"
4068case "(($ac_try" in
4069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070 *) ac_try_echo=$ac_try;;
4071esac
4072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073$as_echo "$ac_try_echo"; } >&5
4074 (eval "$ac_link") 2>&5
4075 ac_status=$?
4076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077 test $ac_status = 0; }
4078 if { ac_try='./conftest$ac_cv_exeext'
4079 { { case "(($ac_try" in
4080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4081 *) ac_try_echo=$ac_try;;
4082esac
4083eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4084$as_echo "$ac_try_echo"; } >&5
4085 (eval "$ac_try") 2>&5
4086 ac_status=$?
4087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4088 test $ac_status = 0; }; }; then
4089 cross_compiling=no
4090 else
4091 if test "$cross_compiling" = maybe; then
4092 cross_compiling=yes
4093 else
4094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004096as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004097If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004098See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 fi
4100 fi
4101fi
4102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4103$as_echo "$cross_compiling" >&6; }
4104
4105rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4106ac_clean_files=$ac_clean_files_save
4107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4108$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004109if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo_n "(cached) " >&6
4111else
4112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004113/* end confdefs.h. */
4114
4115int
4116main ()
4117{
4118
4119 ;
4120 return 0;
4121}
4122_ACEOF
4123rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004124if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125case "(($ac_try" in
4126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4127 *) ac_try_echo=$ac_try;;
4128esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004129eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4130$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4134 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 for ac_file in conftest.o conftest.obj conftest.*; do
4136 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4140 break;;
4141 esac
4142done
4143else
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004145sed 's/^/| /' conftest.$ac_ext >&5
4146
Matthias Kloseb9621712010-04-24 17:59:49 +00004147{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004149as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004150See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004151fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004152rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4155$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004156OBJEXT=$ac_cv_objext
4157ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4159$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004160if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004162else
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
Martin v. Löwis11437992002-04-12 09:54:03 +00004166int
4167main ()
4168{
4169#ifndef __GNUC__
4170 choke me
4171#endif
4172
4173 ;
4174 return 0;
4175}
4176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 ac_compiler_gnu=yes
4179else
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004183ac_cv_c_compiler_gnu=$ac_compiler_gnu
4184
4185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4187$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4188if test $ac_compiler_gnu = yes; then
4189 GCC=yes
4190else
4191 GCC=
4192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193ac_test_CFLAGS=${CFLAGS+set}
4194ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4196$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004197if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004199else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 ac_save_c_werror_flag=$ac_c_werror_flag
4201 ac_c_werror_flag=yes
4202 ac_cv_prog_cc_g=no
4203 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004206
Martin v. Löwis11437992002-04-12 09:54:03 +00004207int
4208main ()
4209{
4210
4211 ;
4212 return 0;
4213}
4214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004215if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004216 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004217else
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 CFLAGS=""
4219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220/* end confdefs.h. */
4221
4222int
4223main ()
4224{
4225
4226 ;
4227 return 0;
4228}
4229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004230if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231
Matthias Kloseb9621712010-04-24 17:59:49 +00004232else
4233 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236/* end confdefs.h. */
4237
4238int
4239main ()
4240{
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254 ac_c_werror_flag=$ac_save_c_werror_flag
4255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4257$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004259 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260elif test $ac_cv_prog_cc_g = yes; then
4261 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004262 CFLAGS="-g -O2"
4263 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004264 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265 fi
4266else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267 if test "$GCC" = yes; then
4268 CFLAGS="-O2"
4269 else
4270 CFLAGS=
4271 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4274$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004275if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004277else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004279ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004281/* end confdefs.h. */
4282#include <stdarg.h>
4283#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004284struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004285/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4286struct buf { int x; };
4287FILE * (*rcsopen) (struct buf *, struct stat *, int);
4288static char *e (p, i)
4289 char **p;
4290 int i;
4291{
4292 return p[i];
4293}
4294static char *f (char * (*g) (char **, int), char **p, ...)
4295{
4296 char *s;
4297 va_list v;
4298 va_start (v,p);
4299 s = g (p, va_arg (v,int));
4300 va_end (v);
4301 return s;
4302}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303
4304/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4305 function prototypes and stuff, but not '\xHH' hex character constants.
4306 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004308 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4309 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4314 inside strings and character constants. */
4315#define FOO(x) 'x'
4316int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4317
Skip Montanaro6dead952003-09-25 14:50:04 +00004318int test (int i, double x);
4319struct s1 {int (*f) (int a);};
4320struct s2 {int (*f) (double a);};
4321int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4322int argc;
4323char **argv;
4324int
4325main ()
4326{
4327return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4328 ;
4329 return 0;
4330}
4331_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4333 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004334do
4335 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339rm -f core conftest.err conftest.$ac_objext
4340 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004341done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004343CC=$ac_save_CC
4344
4345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346# AC_CACHE_VAL
4347case "x$ac_cv_prog_cc_c89" in
4348 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4350$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4353$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004354 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4357$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004358esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004359if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004360
Matthias Kloseb9621712010-04-24 17:59:49 +00004361fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004362
Martin v. Löwis11437992002-04-12 09:54:03 +00004363ac_ext=c
4364ac_cpp='$CPP $CPPFLAGS'
4365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4367ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004368
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004369ac_ext=c
4370ac_cpp='$CPP $CPPFLAGS'
4371ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4372ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4373ac_compiler_gnu=$ac_cv_c_compiler_gnu
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4375$as_echo_n "checking how to run the C preprocessor... " >&6; }
4376# On Suns, sometimes $CPP names a directory.
4377if test -n "$CPP" && test -d "$CPP"; then
4378 CPP=
4379fi
4380if test -z "$CPP"; then
4381 if ${ac_cv_prog_CPP+:} false; then :
4382 $as_echo_n "(cached) " >&6
4383else
4384 # Double quotes because CPP needs to be expanded
4385 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4386 do
4387 ac_preproc_ok=false
4388for ac_c_preproc_warn_flag in '' yes
4389do
4390 # Use a header file that comes with gcc, so configuring glibc
4391 # with a fresh cross-compiler works.
4392 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4393 # <limits.h> exists even on freestanding compilers.
4394 # On the NeXT, cc -E runs the code through the compiler's parser,
4395 # not just through cpp. "Syntax error" is here to catch this case.
4396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4397/* end confdefs.h. */
4398#ifdef __STDC__
4399# include <limits.h>
4400#else
4401# include <assert.h>
4402#endif
4403 Syntax error
4404_ACEOF
4405if ac_fn_c_try_cpp "$LINENO"; then :
4406
4407else
4408 # Broken: fails on valid input.
4409continue
4410fi
4411rm -f conftest.err conftest.i conftest.$ac_ext
4412
4413 # OK, works on sane cases. Now check whether nonexistent headers
4414 # can be detected and how.
4415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4416/* end confdefs.h. */
4417#include <ac_nonexistent.h>
4418_ACEOF
4419if ac_fn_c_try_cpp "$LINENO"; then :
4420 # Broken: success on invalid input.
4421continue
4422else
4423 # Passes both tests.
4424ac_preproc_ok=:
4425break
4426fi
4427rm -f conftest.err conftest.i conftest.$ac_ext
4428
4429done
4430# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4431rm -f conftest.i conftest.err conftest.$ac_ext
4432if $ac_preproc_ok; then :
4433 break
4434fi
4435
4436 done
4437 ac_cv_prog_CPP=$CPP
4438
4439fi
4440 CPP=$ac_cv_prog_CPP
4441else
4442 ac_cv_prog_CPP=$CPP
4443fi
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4445$as_echo "$CPP" >&6; }
4446ac_preproc_ok=false
4447for ac_c_preproc_warn_flag in '' yes
4448do
4449 # Use a header file that comes with gcc, so configuring glibc
4450 # with a fresh cross-compiler works.
4451 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4452 # <limits.h> exists even on freestanding compilers.
4453 # On the NeXT, cc -E runs the code through the compiler's parser,
4454 # not just through cpp. "Syntax error" is here to catch this case.
4455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4456/* end confdefs.h. */
4457#ifdef __STDC__
4458# include <limits.h>
4459#else
4460# include <assert.h>
4461#endif
4462 Syntax error
4463_ACEOF
4464if ac_fn_c_try_cpp "$LINENO"; then :
4465
4466else
4467 # Broken: fails on valid input.
4468continue
4469fi
4470rm -f conftest.err conftest.i conftest.$ac_ext
4471
4472 # OK, works on sane cases. Now check whether nonexistent headers
4473 # can be detected and how.
4474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4475/* end confdefs.h. */
4476#include <ac_nonexistent.h>
4477_ACEOF
4478if ac_fn_c_try_cpp "$LINENO"; then :
4479 # Broken: success on invalid input.
4480continue
4481else
4482 # Passes both tests.
4483ac_preproc_ok=:
4484break
4485fi
4486rm -f conftest.err conftest.i conftest.$ac_ext
4487
4488done
4489# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4490rm -f conftest.i conftest.err conftest.$ac_ext
4491if $ac_preproc_ok; then :
4492
4493else
4494 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4496as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4497See \`config.log' for more details" "$LINENO" 5; }
4498fi
4499
4500ac_ext=c
4501ac_cpp='$CPP $CPPFLAGS'
4502ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4503ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4504ac_compiler_gnu=$ac_cv_c_compiler_gnu
4505
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4507$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4508if ${ac_cv_path_GREP+:} false; then :
4509 $as_echo_n "(cached) " >&6
4510else
4511 if test -z "$GREP"; then
4512 ac_path_GREP_found=false
4513 # Loop through the user's path and test for each of PROGNAME-LIST
4514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4515for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4516do
4517 IFS=$as_save_IFS
4518 test -z "$as_dir" && as_dir=.
4519 for ac_prog in grep ggrep; do
4520 for ac_exec_ext in '' $ac_executable_extensions; do
4521 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4522 as_fn_executable_p "$ac_path_GREP" || continue
4523# Check for GNU ac_path_GREP and select it if it is found.
4524 # Check for GNU $ac_path_GREP
4525case `"$ac_path_GREP" --version 2>&1` in
4526*GNU*)
4527 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4528*)
4529 ac_count=0
4530 $as_echo_n 0123456789 >"conftest.in"
4531 while :
4532 do
4533 cat "conftest.in" "conftest.in" >"conftest.tmp"
4534 mv "conftest.tmp" "conftest.in"
4535 cp "conftest.in" "conftest.nl"
4536 $as_echo 'GREP' >> "conftest.nl"
4537 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4538 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4539 as_fn_arith $ac_count + 1 && ac_count=$as_val
4540 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4541 # Best one so far, save it but keep looking for a better one
4542 ac_cv_path_GREP="$ac_path_GREP"
4543 ac_path_GREP_max=$ac_count
4544 fi
4545 # 10*(2^10) chars as input seems more than enough
4546 test $ac_count -gt 10 && break
4547 done
4548 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4549esac
4550
4551 $ac_path_GREP_found && break 3
4552 done
4553 done
4554 done
4555IFS=$as_save_IFS
4556 if test -z "$ac_cv_path_GREP"; then
4557 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4558 fi
4559else
4560 ac_cv_path_GREP=$GREP
4561fi
4562
4563fi
4564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4565$as_echo "$ac_cv_path_GREP" >&6; }
4566 GREP="$ac_cv_path_GREP"
4567
4568
Łukasz Langaa785c872016-09-09 17:37:37 -07004569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4570$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4571if ${ac_cv_path_SED+:} false; then :
4572 $as_echo_n "(cached) " >&6
4573else
4574 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4575 for ac_i in 1 2 3 4 5 6 7; do
4576 ac_script="$ac_script$as_nl$ac_script"
4577 done
4578 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4579 { ac_script=; unset ac_script;}
4580 if test -z "$SED"; then
4581 ac_path_SED_found=false
4582 # Loop through the user's path and test for each of PROGNAME-LIST
4583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4584for as_dir in $PATH
4585do
4586 IFS=$as_save_IFS
4587 test -z "$as_dir" && as_dir=.
4588 for ac_prog in sed gsed; do
4589 for ac_exec_ext in '' $ac_executable_extensions; do
4590 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4591 as_fn_executable_p "$ac_path_SED" || continue
4592# Check for GNU ac_path_SED and select it if it is found.
4593 # Check for GNU $ac_path_SED
4594case `"$ac_path_SED" --version 2>&1` in
4595*GNU*)
4596 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4597*)
4598 ac_count=0
4599 $as_echo_n 0123456789 >"conftest.in"
4600 while :
4601 do
4602 cat "conftest.in" "conftest.in" >"conftest.tmp"
4603 mv "conftest.tmp" "conftest.in"
4604 cp "conftest.in" "conftest.nl"
4605 $as_echo '' >> "conftest.nl"
4606 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4607 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4608 as_fn_arith $ac_count + 1 && ac_count=$as_val
4609 if test $ac_count -gt ${ac_path_SED_max-0}; then
4610 # Best one so far, save it but keep looking for a better one
4611 ac_cv_path_SED="$ac_path_SED"
4612 ac_path_SED_max=$ac_count
4613 fi
4614 # 10*(2^10) chars as input seems more than enough
4615 test $ac_count -gt 10 && break
4616 done
4617 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4618esac
4619
4620 $ac_path_SED_found && break 3
4621 done
4622 done
4623 done
4624IFS=$as_save_IFS
4625 if test -z "$ac_cv_path_SED"; then
4626 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4627 fi
4628else
4629 ac_cv_path_SED=$SED
4630fi
4631
4632fi
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4634$as_echo "$ac_cv_path_SED" >&6; }
4635 SED="$ac_cv_path_SED"
4636 rm -f conftest.sed
4637
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004638
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004639
4640
Matthias Kloseb9621712010-04-24 17:59:49 +00004641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4642$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004644# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004645if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004646 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004647
4648 case $withval in
4649 no) with_cxx_main=no
4650 MAINCC='$(CC)';;
4651 yes) with_cxx_main=yes
4652 MAINCC='$(CXX)';;
4653 *) with_cxx_main=yes
4654 MAINCC=$withval
4655 if test -z "$CXX"
4656 then
4657 CXX=$withval
4658 fi;;
4659 esac
4660else
4661
4662 with_cxx_main=no
4663 MAINCC='$(CC)'
4664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004665fi
4666
Matthias Kloseb9621712010-04-24 17:59:49 +00004667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4668$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004669
4670preset_cxx="$CXX"
4671if test -z "$CXX"
4672then
4673 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004674 gcc) if test -n "$ac_tool_prefix"; then
4675 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4676set dummy ${ac_tool_prefix}g++; ac_word=$2
4677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4678$as_echo_n "checking for $ac_word... " >&6; }
4679if ${ac_cv_path_CXX+:} false; then :
4680 $as_echo_n "(cached) " >&6
4681else
4682 case $CXX in
4683 [\\/]* | ?:[\\/]*)
4684 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4685 ;;
4686 *)
4687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4688for as_dir in notfound
4689do
4690 IFS=$as_save_IFS
4691 test -z "$as_dir" && as_dir=.
4692 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004694 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4696 break 2
4697 fi
4698done
4699 done
4700IFS=$as_save_IFS
4701
4702 ;;
4703esac
4704fi
4705CXX=$ac_cv_path_CXX
4706if test -n "$CXX"; then
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4708$as_echo "$CXX" >&6; }
4709else
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4711$as_echo "no" >&6; }
4712fi
4713
4714
4715fi
4716if test -z "$ac_cv_path_CXX"; then
4717 ac_pt_CXX=$CXX
4718 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004719set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4721$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004722if ${ac_cv_path_ac_pt_CXX+:} false; then :
4723 $as_echo_n "(cached) " >&6
4724else
4725 case $ac_pt_CXX in
4726 [\\/]* | ?:[\\/]*)
4727 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4728 ;;
4729 *)
4730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4731for as_dir in notfound
4732do
4733 IFS=$as_save_IFS
4734 test -z "$as_dir" && as_dir=.
4735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004737 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4739 break 2
4740 fi
4741done
4742 done
4743IFS=$as_save_IFS
4744
4745 ;;
4746esac
4747fi
4748ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4749if test -n "$ac_pt_CXX"; then
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4751$as_echo "$ac_pt_CXX" >&6; }
4752else
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4754$as_echo "no" >&6; }
4755fi
4756
4757 if test "x$ac_pt_CXX" = x; then
4758 CXX="g++"
4759 else
4760 case $cross_compiling:$ac_tool_warned in
4761yes:)
4762{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4763$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4764ac_tool_warned=yes ;;
4765esac
4766 CXX=$ac_pt_CXX
4767 fi
4768else
4769 CXX="$ac_cv_path_CXX"
4770fi
4771 ;;
4772 cc) if test -n "$ac_tool_prefix"; then
4773 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4774set dummy ${ac_tool_prefix}c++; ac_word=$2
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4776$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004777if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004779else
4780 case $CXX in
4781 [\\/]* | ?:[\\/]*)
4782 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4783 ;;
4784 *)
4785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786for as_dir in notfound
4787do
4788 IFS=$as_save_IFS
4789 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 break 2
4795 fi
4796done
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004798IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800 ;;
4801esac
4802fi
4803CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004804if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4806$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004807else
Matthias Kloseb9621712010-04-24 17:59:49 +00004808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004811
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812
4813fi
4814if test -z "$ac_cv_path_CXX"; then
4815 ac_pt_CXX=$CXX
4816 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004820if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 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 +00004826 ;;
4827 *)
4828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829for as_dir in notfound
4830do
4831 IFS=$as_save_IFS
4832 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837 break 2
4838 fi
4839done
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004841IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843 ;;
4844esac
4845fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4847if test -n "$ac_pt_CXX"; then
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4849$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004850else
Matthias Kloseb9621712010-04-24 17:59:49 +00004851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004854
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004855 if test "x$ac_pt_CXX" = x; then
4856 CXX="c++"
4857 else
4858 case $cross_compiling:$ac_tool_warned in
4859yes:)
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4861$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4862ac_tool_warned=yes ;;
4863esac
4864 CXX=$ac_pt_CXX
4865 fi
4866else
4867 CXX="$ac_cv_path_CXX"
4868fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004869 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004870 clang|*/clang) if test -n "$ac_tool_prefix"; then
4871 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4872set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
4875if ${ac_cv_path_CXX+:} false; then :
4876 $as_echo_n "(cached) " >&6
4877else
4878 case $CXX in
4879 [\\/]* | ?:[\\/]*)
4880 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4881 ;;
4882 *)
4883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4884for as_dir in notfound
4885do
4886 IFS=$as_save_IFS
4887 test -z "$as_dir" && as_dir=.
4888 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004890 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4892 break 2
4893 fi
4894done
4895 done
4896IFS=$as_save_IFS
4897
Ned Deilycbfb9a52012-06-23 16:02:19 -07004898 ;;
4899esac
4900fi
4901CXX=$ac_cv_path_CXX
4902if test -n "$CXX"; then
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4904$as_echo "$CXX" >&6; }
4905else
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907$as_echo "no" >&6; }
4908fi
4909
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004910
4911fi
4912if test -z "$ac_cv_path_CXX"; then
4913 ac_pt_CXX=$CXX
4914 # Extract the first word of "clang++", so it can be a program name with args.
4915set dummy clang++; ac_word=$2
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4917$as_echo_n "checking for $ac_word... " >&6; }
4918if ${ac_cv_path_ac_pt_CXX+:} false; then :
4919 $as_echo_n "(cached) " >&6
4920else
4921 case $ac_pt_CXX in
4922 [\\/]* | ?:[\\/]*)
4923 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4924 ;;
4925 *)
4926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4927for as_dir in notfound
4928do
4929 IFS=$as_save_IFS
4930 test -z "$as_dir" && as_dir=.
4931 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004932 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004933 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4935 break 2
4936 fi
4937done
4938 done
4939IFS=$as_save_IFS
4940
4941 ;;
4942esac
4943fi
4944ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4945if test -n "$ac_pt_CXX"; then
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4947$as_echo "$ac_pt_CXX" >&6; }
4948else
4949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4950$as_echo "no" >&6; }
4951fi
4952
4953 if test "x$ac_pt_CXX" = x; then
4954 CXX="clang++"
4955 else
4956 case $cross_compiling:$ac_tool_warned in
4957yes:)
4958{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4959$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4960ac_tool_warned=yes ;;
4961esac
4962 CXX=$ac_pt_CXX
4963 fi
4964else
4965 CXX="$ac_cv_path_CXX"
4966fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004967 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004968 icc|*/icc) if test -n "$ac_tool_prefix"; then
4969 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4970set dummy ${ac_tool_prefix}icpc; ac_word=$2
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972$as_echo_n "checking for $ac_word... " >&6; }
4973if ${ac_cv_path_CXX+:} false; then :
4974 $as_echo_n "(cached) " >&6
4975else
4976 case $CXX in
4977 [\\/]* | ?:[\\/]*)
4978 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4979 ;;
4980 *)
4981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in notfound
4983do
4984 IFS=$as_save_IFS
4985 test -z "$as_dir" && as_dir=.
4986 for ac_exec_ext in '' $ac_executable_extensions; do
4987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4988 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990 break 2
4991 fi
4992done
4993 done
4994IFS=$as_save_IFS
4995
4996 ;;
4997esac
4998fi
4999CXX=$ac_cv_path_CXX
5000if test -n "$CXX"; then
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5002$as_echo "$CXX" >&6; }
5003else
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
5006fi
5007
5008
5009fi
5010if test -z "$ac_cv_path_CXX"; then
5011 ac_pt_CXX=$CXX
5012 # Extract the first word of "icpc", so it can be a program name with args.
5013set dummy icpc; ac_word=$2
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5015$as_echo_n "checking for $ac_word... " >&6; }
5016if ${ac_cv_path_ac_pt_CXX+:} false; then :
5017 $as_echo_n "(cached) " >&6
5018else
5019 case $ac_pt_CXX in
5020 [\\/]* | ?:[\\/]*)
5021 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5022 ;;
5023 *)
5024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5025for as_dir in notfound
5026do
5027 IFS=$as_save_IFS
5028 test -z "$as_dir" && as_dir=.
5029 for ac_exec_ext in '' $ac_executable_extensions; do
5030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5031 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5033 break 2
5034 fi
5035done
5036 done
5037IFS=$as_save_IFS
5038
5039 ;;
5040esac
5041fi
5042ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5043if test -n "$ac_pt_CXX"; then
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5045$as_echo "$ac_pt_CXX" >&6; }
5046else
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5048$as_echo "no" >&6; }
5049fi
5050
5051 if test "x$ac_pt_CXX" = x; then
5052 CXX="icpc"
5053 else
5054 case $cross_compiling:$ac_tool_warned in
5055yes:)
5056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5058ac_tool_warned=yes ;;
5059esac
5060 CXX=$ac_pt_CXX
5061 fi
5062else
5063 CXX="$ac_cv_path_CXX"
5064fi
5065 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005066 esac
5067 if test "$CXX" = "notfound"
5068 then
5069 CXX=""
5070 fi
5071fi
5072if test -z "$CXX"
5073then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005074 if test -n "$ac_tool_prefix"; then
5075 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5076 do
5077 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5078set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5080$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005081if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005083else
5084 if test -n "$CXX"; then
5085 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5086else
5087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5088for as_dir in $PATH
5089do
5090 IFS=$as_save_IFS
5091 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005093 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005094 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005096 break 2
5097 fi
5098done
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005100IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101
5102fi
5103fi
5104CXX=$ac_cv_prog_CXX
5105if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5107$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108else
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5110$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005111fi
5112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005113
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005114 test -n "$CXX" && break
5115 done
5116fi
5117if test -z "$CXX"; then
5118 ac_ct_CXX=$CXX
5119 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5120do
5121 # Extract the first word of "$ac_prog", so it can be a program name with args.
5122set dummy $ac_prog; ac_word=$2
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5124$as_echo_n "checking for $ac_word... " >&6; }
5125if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5126 $as_echo_n "(cached) " >&6
5127else
5128 if test -n "$ac_ct_CXX"; then
5129 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5130else
5131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5132for as_dir in $PATH
5133do
5134 IFS=$as_save_IFS
5135 test -z "$as_dir" && as_dir=.
5136 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005137 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005138 ac_cv_prog_ac_ct_CXX="$ac_prog"
5139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5140 break 2
5141 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005142done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005143 done
5144IFS=$as_save_IFS
5145
5146fi
5147fi
5148ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5149if test -n "$ac_ct_CXX"; then
5150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5151$as_echo "$ac_ct_CXX" >&6; }
5152else
5153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158 test -n "$ac_ct_CXX" && break
5159done
5160
5161 if test "x$ac_ct_CXX" = x; then
5162 CXX="notfound"
5163 else
5164 case $cross_compiling:$ac_tool_warned in
5165yes:)
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5167$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5168ac_tool_warned=yes ;;
5169esac
5170 CXX=$ac_ct_CXX
5171 fi
5172fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005173
5174 if test "$CXX" = "notfound"
5175 then
5176 CXX=""
5177 fi
5178fi
5179if test "$preset_cxx" != "$CXX"
5180then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005181 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182
5183 By default, distutils will build C++ extension modules with \"$CXX\".
5184 If this is not intended, then set CXX on the configure command line.
5185 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005186$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005187
5188 By default, distutils will build C++ extension modules with \"$CXX\".
5189 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005190 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005191fi
5192
5193
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005194MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5195
5196
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5198$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5199cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005200#undef bfin
5201#undef cris
5202#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005203#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005204#undef hppa
5205#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005206#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005207#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005208#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005209#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005210#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005211#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005212 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005213#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214# if defined(__x86_64__) && defined(__LP64__)
5215 x86_64-linux-gnu
5216# elif defined(__x86_64__) && defined(__ILP32__)
5217 x86_64-linux-gnux32
5218# elif defined(__i386__)
5219 i386-linux-gnu
5220# elif defined(__aarch64__) && defined(__AARCH64EL__)
5221# if defined(__ILP32__)
5222 aarch64_ilp32-linux-gnu
5223# else
5224 aarch64-linux-gnu
5225# endif
5226# elif defined(__aarch64__) && defined(__AARCH64EB__)
5227# if defined(__ILP32__)
5228 aarch64_be_ilp32-linux-gnu
5229# else
5230 aarch64_be-linux-gnu
5231# endif
5232# elif defined(__alpha__)
5233 alpha-linux-gnu
5234# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5235# if defined(__ARMEL__)
5236 arm-linux-gnueabihf
5237# else
5238 armeb-linux-gnueabihf
5239# endif
5240# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5241# if defined(__ARMEL__)
5242 arm-linux-gnueabi
5243# else
5244 armeb-linux-gnueabi
5245# endif
5246# elif defined(__hppa__)
5247 hppa-linux-gnu
5248# elif defined(__ia64__)
5249 ia64-linux-gnu
5250# elif defined(__m68k__) && !defined(__mcoldfire__)
5251 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005252# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5253# if _MIPS_SIM == _ABIO32
5254 mipsisa32r6el-linux-gnu
5255# elif _MIPS_SIM == _ABIN32
5256 mipsisa64r6el-linux-gnuabin32
5257# elif _MIPS_SIM == _ABI64
5258 mipsisa64r6el-linux-gnuabi64
5259# else
5260# error unknown platform triplet
5261# endif
5262# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5263# if _MIPS_SIM == _ABIO32
5264 mipsisa32r6-linux-gnu
5265# elif _MIPS_SIM == _ABIN32
5266 mipsisa64r6-linux-gnuabin32
5267# elif _MIPS_SIM == _ABI64
5268 mipsisa64r6-linux-gnuabi64
5269# else
5270# error unknown platform triplet
5271# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005272# elif defined(__mips_hard_float) && defined(_MIPSEL)
5273# if _MIPS_SIM == _ABIO32
5274 mipsel-linux-gnu
5275# elif _MIPS_SIM == _ABIN32
5276 mips64el-linux-gnuabin32
5277# elif _MIPS_SIM == _ABI64
5278 mips64el-linux-gnuabi64
5279# else
5280# error unknown platform triplet
5281# endif
5282# elif defined(__mips_hard_float)
5283# if _MIPS_SIM == _ABIO32
5284 mips-linux-gnu
5285# elif _MIPS_SIM == _ABIN32
5286 mips64-linux-gnuabin32
5287# elif _MIPS_SIM == _ABI64
5288 mips64-linux-gnuabi64
5289# else
5290# error unknown platform triplet
5291# endif
5292# elif defined(__or1k__)
5293 or1k-linux-gnu
5294# elif defined(__powerpc__) && defined(__SPE__)
5295 powerpc-linux-gnuspe
5296# elif defined(__powerpc64__)
5297# if defined(__LITTLE_ENDIAN__)
5298 powerpc64le-linux-gnu
5299# else
5300 powerpc64-linux-gnu
5301# endif
5302# elif defined(__powerpc__)
5303 powerpc-linux-gnu
5304# elif defined(__s390x__)
5305 s390x-linux-gnu
5306# elif defined(__s390__)
5307 s390-linux-gnu
5308# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5309 sh4-linux-gnu
5310# elif defined(__sparc__) && defined(__arch64__)
5311 sparc64-linux-gnu
5312# elif defined(__sparc__)
5313 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005314# elif defined(__riscv)
5315# if __riscv_xlen == 32
5316 riscv32-linux-gnu
5317# elif __riscv_xlen == 64
5318 riscv64-linux-gnu
5319# else
5320# error unknown platform triplet
5321# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005322# else
5323# error unknown platform triplet
5324# endif
5325#elif defined(__FreeBSD_kernel__)
5326# if defined(__LP64__)
5327 x86_64-kfreebsd-gnu
5328# elif defined(__i386__)
5329 i386-kfreebsd-gnu
5330# else
5331# error unknown platform triplet
5332# endif
5333#elif defined(__gnu_hurd__)
5334 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005335#elif defined(__APPLE__)
5336 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005337#elif defined(__VXWORKS__)
5338 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005339#else
5340# error unknown platform triplet
5341#endif
5342
5343EOF
5344
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005345if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005346 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5348$as_echo "$PLATFORM_TRIPLET" >&6; }
5349else
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5351$as_echo "none" >&6; }
5352fi
5353rm -f conftest.c conftest.out
5354
5355if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5356 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5357 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5358 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005359elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5360 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005361fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005362
doko@ubuntu.com55532312016-06-14 08:55:19 +02005363if test x$MULTIARCH != x; then
5364 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5365fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005366
5367
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5369$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5370save_LDFLAGS="$LDFLAGS"
5371LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005372
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374/* end confdefs.h. */
5375
5376int
5377main ()
5378{
5379
5380 ;
5381 return 0;
5382}
5383_ACEOF
5384if ac_fn_c_try_link "$LINENO"; then :
5385 NO_AS_NEEDED="-Wl,--no-as-needed"
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5387$as_echo "yes" >&6; }
5388else
5389 NO_AS_NEEDED=""
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391$as_echo "no" >&6; }
5392fi
5393rm -f core conftest.err conftest.$ac_objext \
5394 conftest$ac_exeext conftest.$ac_ext
5395LDFLAGS="$save_LDFLAGS"
5396
5397
5398
5399# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400
Matthias Kloseb9621712010-04-24 17:59:49 +00005401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5402$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005403if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405else
5406 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5407 then ac_cv_path_EGREP="$GREP -E"
5408 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 # Loop through the user's path and test for each of PROGNAME-LIST
5412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5414do
5415 IFS=$as_save_IFS
5416 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 for ac_prog in egrep; do
5418 for ac_exec_ext in '' $ac_executable_extensions; do
5419 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005420 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005421# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 # Check for GNU $ac_path_EGREP
5423case `"$ac_path_EGREP" --version 2>&1` in
5424*GNU*)
5425 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5426*)
5427 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 while :
5430 do
5431 cat "conftest.in" "conftest.in" >"conftest.tmp"
5432 mv "conftest.tmp" "conftest.in"
5433 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5436 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005438 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5439 # Best one so far, save it but keep looking for a better one
5440 ac_cv_path_EGREP="$ac_path_EGREP"
5441 ac_path_EGREP_max=$ac_count
5442 fi
5443 # 10*(2^10) chars as input seems more than enough
5444 test $ac_count -gt 10 && break
5445 done
5446 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5447esac
5448
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 $ac_path_EGREP_found && break 3
5450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005455 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 +00005456 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457else
5458 ac_cv_path_EGREP=$EGREP
5459fi
5460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005461 fi
5462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5464$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005465 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005466
5467
Matthias Kloseb9621712010-04-24 17:59:49 +00005468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5469$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005470if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005471 $as_echo_n "(cached) " >&6
5472else
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005474/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005475#include <stdlib.h>
5476#include <stdarg.h>
5477#include <string.h>
5478#include <float.h>
5479
5480int
5481main ()
5482{
5483
5484 ;
5485 return 0;
5486}
5487_ACEOF
5488if ac_fn_c_try_compile "$LINENO"; then :
5489 ac_cv_header_stdc=yes
5490else
5491 ac_cv_header_stdc=no
5492fi
5493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5498/* end confdefs.h. */
5499#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005500
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005501_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005505else
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005507fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005508rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509
Matthias Kloseb9621712010-04-24 17:59:49 +00005510fi
5511
5512if test $ac_cv_header_stdc = yes; then
5513 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5515/* end confdefs.h. */
5516#include <stdlib.h>
5517
5518_ACEOF
5519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5520 $EGREP "free" >/dev/null 2>&1; then :
5521
5522else
5523 ac_cv_header_stdc=no
5524fi
5525rm -f conftest*
5526
5527fi
5528
5529if test $ac_cv_header_stdc = yes; then
5530 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5531 if test "$cross_compiling" = yes; then :
5532 :
5533else
5534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5535/* end confdefs.h. */
5536#include <ctype.h>
5537#include <stdlib.h>
5538#if ((' ' & 0x0FF) == 0x020)
5539# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5540# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5541#else
5542# define ISLOWER(c) \
5543 (('a' <= (c) && (c) <= 'i') \
5544 || ('j' <= (c) && (c) <= 'r') \
5545 || ('s' <= (c) && (c) <= 'z'))
5546# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5547#endif
5548
5549#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5550int
5551main ()
5552{
5553 int i;
5554 for (i = 0; i < 256; i++)
5555 if (XOR (islower (i), ISLOWER (i))
5556 || toupper (i) != TOUPPER (i))
5557 return 2;
5558 return 0;
5559}
5560_ACEOF
5561if ac_fn_c_try_run "$LINENO"; then :
5562
5563else
5564 ac_cv_header_stdc=no
5565fi
5566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5567 conftest.$ac_objext conftest.beam conftest.$ac_ext
5568fi
5569
5570fi
5571fi
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5573$as_echo "$ac_cv_header_stdc" >&6; }
5574if test $ac_cv_header_stdc = yes; then
5575
5576$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5577
5578fi
5579
5580# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5581for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5582 inttypes.h stdint.h unistd.h
5583do :
5584 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5585ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5586"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005587if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 cat >>confdefs.h <<_ACEOF
5589#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5590_ACEOF
5591
5592fi
5593
5594done
5595
5596
5597
5598 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 +02005599if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005600 MINIX=yes
5601else
5602 MINIX=
5603fi
5604
5605
5606 if test "$MINIX" = yes; then
5607
5608$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5609
5610
5611$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5612
5613
5614$as_echo "#define _MINIX 1" >>confdefs.h
5615
5616 fi
5617
5618
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5620$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005621if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005622 $as_echo_n "(cached) " >&6
5623else
5624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5625/* end confdefs.h. */
5626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005627# define __EXTENSIONS__ 1
5628 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005629int
5630main ()
5631{
5632
5633 ;
5634 return 0;
5635}
5636_ACEOF
5637if ac_fn_c_try_compile "$LINENO"; then :
5638 ac_cv_safe_to_define___extensions__=yes
5639else
5640 ac_cv_safe_to_define___extensions__=no
5641fi
5642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5643fi
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5645$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5646 test $ac_cv_safe_to_define___extensions__ = yes &&
5647 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5648
5649 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5650
5651 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5652
5653 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5654
5655 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5656
5657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5660$as_echo_n "checking for the Android API level... " >&6; }
5661cat >> conftest.c <<EOF
5662#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005663android_api = __ANDROID_API__
5664arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005665#else
5666#error not Android
5667#endif
5668EOF
5669
5670if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005671 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5672 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5674$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005675 if test -z "$ANDROID_API_LEVEL"; then
5676 echo 'Fatal: you must define __ANDROID_API__'
5677 exit 1
5678 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005679
5680cat >>confdefs.h <<_ACEOF
5681#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5682_ACEOF
5683
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005684
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5686$as_echo_n "checking for the Android arm ABI... " >&6; }
5687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5688$as_echo "$_arm_arch" >&6; }
5689 if test "$_arm_arch" = 7; then
5690 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5691 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5692 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005693else
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5695$as_echo "not Android" >&6; }
5696fi
5697rm -f conftest.c conftest.out
5698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699# Check for unsupported systems
5700case $ac_sys_system/$ac_sys_release in
5701atheos*|Linux*/1*)
5702 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5703 echo See README for details.
5704 exit 1;;
5705esac
5706
5707
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5709$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710
5711# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005712if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713 withval=$with_suffix;
5714 case $withval in
5715 no) EXEEXT=;;
5716 yes) EXEEXT=.exe;;
5717 *) EXEEXT=$withval;;
5718 esac
5719fi
5720
Matthias Kloseb9621712010-04-24 17:59:49 +00005721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5722$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723
5724# Test whether we're running on a non-case-sensitive system, in which
5725# case we give a warning if no ext is given
5726
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5728$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729if test ! -d CaseSensitiveTestDir; then
5730mkdir CaseSensitiveTestDir
5731fi
5732
5733if test -d casesensitivetestdir
5734then
Matthias Kloseb9621712010-04-24 17:59:49 +00005735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5736$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737 BUILDEXEEXT=.exe
5738else
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741 BUILDEXEEXT=$EXEEXT
5742fi
5743rmdir CaseSensitiveTestDir
5744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745case $ac_sys_system in
5746hp*|HP*)
5747 case $CC in
5748 cc|*/cc) CC="$CC -Ae";;
5749 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750esac
5751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5754$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755if test -z "$LIBRARY"
5756then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005757 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5760$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761
5762# LDLIBRARY is the name of the library to link against (as opposed to the
5763# name of the library into which to insert object files). BLDLIBRARY is also
5764# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5765# is blank as the main program is not linked directly against LDLIBRARY.
5766# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5767# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5768# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5769# DLLLIBRARY is the shared (i.e., DLL) library.
5770#
5771# RUNSHARED is used to run shared python without installed libraries
5772#
5773# INSTSONAME is the name of the shared library that will be use to install
5774# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005775#
5776# LDVERSION is the shared library version number, normally the Python version
5777# with the ABI build flags appended.
5778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779
5780
5781
5782
5783
5784
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786LDLIBRARY="$LIBRARY"
5787BLDLIBRARY='$(LDLIBRARY)'
5788INSTSONAME='$(LDLIBRARY)'
5789DLLLIBRARY=''
5790LDLIBRARYDIR=''
5791RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005792LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793
5794# LINKCC is the command that links the python executable -- default is $(CC).
5795# If CXX is set, and if it is needed to link a main function that was
5796# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5797# python might then depend on the C++ runtime
5798# This is altered for AIX in order to build the export list before
5799# linking.
5800
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
5807 AIX*)
5808 exp_extra="\"\""
5809 if test $ac_sys_release -ge 5 -o \
5810 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5811 exp_extra="."
5812 fi
5813 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814 QNX*)
5815 # qcc must be used because the other compilers do not
5816 # support -N.
5817 LINKCC=qcc;;
5818 esac
5819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5821$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822
5823# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5824# make sure we default having it set to "no": this is used by
5825# distutils.unixccompiler to know if it should add --enable-new-dtags
5826# to linker command lines, and failing to detect GNU ld simply results
5827# in the same bahaviour as before.
5828
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5830$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831ac_prog=ld
5832if test "$GCC" = yes; then
5833 ac_prog=`$CC -print-prog-name=ld`
5834fi
5835case `"$ac_prog" -V 2>&1 < /dev/null` in
5836 *GNU*)
5837 GNULD=yes;;
5838 *)
5839 GNULD=no;;
5840esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5842$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5845$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005847if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848 enableval=$enable_shared;
5849fi
5850
5851
5852if test -z "$enable_shared"
5853then
5854 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005855 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856 enable_shared="yes";;
5857 *)
5858 enable_shared="no";;
5859 esac
5860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5862$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863
Matthias Kloseb9621712010-04-24 17:59:49 +00005864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5865$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005867if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868 enableval=$enable_profiling;
5869fi
5870
5871if test "x$enable_profiling" = xyes; then
5872 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005873 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875/* end confdefs.h. */
5876int main() { return 0; }
5877_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005878if ac_fn_c_try_link "$LINENO"; then :
5879
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005883rm -f core conftest.err conftest.$ac_objext \
5884 conftest$ac_exeext conftest.$ac_ext
5885 CC="$ac_save_cc"
5886else
5887 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5890$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891
doko@ubuntu.comba015832012-06-30 16:52:05 +02005892if test "x$enable_profiling" = xyes; then
5893 BASECFLAGS="-pg $BASECFLAGS"
5894 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895fi
5896
Matthias Kloseb9621712010-04-24 17:59:49 +00005897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5898$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899
5900# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5901# library that we build, but we do not want to link against it (we
5902# will find it with a -framework option). For this reason there is an
5903# extra variable BLDLIBRARY against which Python and the extension
5904# modules are linked, BLDLIBRARY. This is normally the same as
5905# LDLIBRARY, but empty for MacOSX framework builds.
5906if test "$enable_framework"
5907then
5908 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005909 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 BLDLIBRARY=''
5911else
5912 BLDLIBRARY='$(LDLIBRARY)'
5913fi
5914
5915# Other platforms follow
5916if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005917 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918
Matthias Kloseb9621712010-04-24 17:59:49 +00005919$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920
5921 case $ac_sys_system in
5922 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005923 LDLIBRARY='libpython$(LDVERSION).dll.a'
5924 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 ;;
5926 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).so'
5928 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005929 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005931 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005932 then
5933 PY3LIBRARY=libpython3.so
5934 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005936 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 LDLIBRARY='libpython$(LDVERSION).so'
5938 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005939 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005941 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005942 then
5943 PY3LIBRARY=libpython3.so
5944 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 ;;
5946 hp*|HP*)
5947 case `uname -m` in
5948 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
5951 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 ;;
5954 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005955 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005956 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 LDLIBRARY='libpython$(LDVERSION).dylib'
5960 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005961 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005963 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005966 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967
5968 esac
5969else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005970 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 case $ac_sys_system in
5972 CYGWIN*)
5973 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005974 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 ;;
5976 esac
5977fi
5978
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005979if test "$cross_compiling" = yes; then
5980 RUNSHARED=
5981fi
5982
Matthias Kloseb9621712010-04-24 17:59:49 +00005983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5984$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005987if test -n "$ac_tool_prefix"; then
5988 for ac_prog in ar aal
5989 do
5990 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5991set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5993$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005994if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996else
5997 if test -n "$AR"; then
5998 ac_cv_prog_AR="$AR" # Let the user override the test.
5999else
6000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6001for as_dir in $PATH
6002do
6003 IFS=$as_save_IFS
6004 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006005 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006007 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009 break 2
6010 fi
6011done
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013IFS=$as_save_IFS
6014
6015fi
6016fi
6017AR=$ac_cv_prog_AR
6018if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6020$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021else
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6023$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024fi
6025
6026
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006027 test -n "$AR" && break
6028 done
6029fi
6030if test -z "$AR"; then
6031 ac_ct_AR=$AR
6032 for ac_prog in ar aal
6033do
6034 # Extract the first word of "$ac_prog", so it can be a program name with args.
6035set dummy $ac_prog; ac_word=$2
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037$as_echo_n "checking for $ac_word... " >&6; }
6038if ${ac_cv_prog_ac_ct_AR+:} false; then :
6039 $as_echo_n "(cached) " >&6
6040else
6041 if test -n "$ac_ct_AR"; then
6042 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6043else
6044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH
6046do
6047 IFS=$as_save_IFS
6048 test -z "$as_dir" && as_dir=.
6049 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006051 ac_cv_prog_ac_ct_AR="$ac_prog"
6052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6053 break 2
6054 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006056 done
6057IFS=$as_save_IFS
6058
6059fi
6060fi
6061ac_ct_AR=$ac_cv_prog_ac_ct_AR
6062if test -n "$ac_ct_AR"; then
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6064$as_echo "$ac_ct_AR" >&6; }
6065else
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
6068fi
6069
6070
6071 test -n "$ac_ct_AR" && break
6072done
6073
6074 if test "x$ac_ct_AR" = x; then
6075 AR="ar"
6076 else
6077 case $cross_compiling:$ac_tool_warned in
6078yes:)
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6081ac_tool_warned=yes ;;
6082esac
6083 AR=$ac_ct_AR
6084 fi
6085fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086
6087
6088# tweak ARFLAGS only if the user didn't set it on the command line
6089
6090if test -z "$ARFLAGS"
6091then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006092 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093fi
6094
doko@ubuntu.com58844492012-06-30 18:25:32 +02006095if test -n "$ac_tool_prefix"; then
6096 for ac_prog in readelf
6097 do
6098 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6099set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6101$as_echo_n "checking for $ac_word... " >&6; }
6102if ${ac_cv_prog_READELF+:} false; then :
6103 $as_echo_n "(cached) " >&6
6104else
6105 if test -n "$READELF"; then
6106 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6107else
6108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109for as_dir in $PATH
6110do
6111 IFS=$as_save_IFS
6112 test -z "$as_dir" && as_dir=.
6113 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006115 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6117 break 2
6118 fi
6119done
6120 done
6121IFS=$as_save_IFS
6122
6123fi
6124fi
6125READELF=$ac_cv_prog_READELF
6126if test -n "$READELF"; then
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6128$as_echo "$READELF" >&6; }
6129else
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6131$as_echo "no" >&6; }
6132fi
6133
6134
6135 test -n "$READELF" && break
6136 done
6137fi
6138if test -z "$READELF"; then
6139 ac_ct_READELF=$READELF
6140 for ac_prog in readelf
6141do
6142 # Extract the first word of "$ac_prog", so it can be a program name with args.
6143set dummy $ac_prog; ac_word=$2
6144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6145$as_echo_n "checking for $ac_word... " >&6; }
6146if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6147 $as_echo_n "(cached) " >&6
6148else
6149 if test -n "$ac_ct_READELF"; then
6150 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6151else
6152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6153for as_dir in $PATH
6154do
6155 IFS=$as_save_IFS
6156 test -z "$as_dir" && as_dir=.
6157 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006158 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006159 ac_cv_prog_ac_ct_READELF="$ac_prog"
6160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6161 break 2
6162 fi
6163done
6164 done
6165IFS=$as_save_IFS
6166
6167fi
6168fi
6169ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6170if test -n "$ac_ct_READELF"; then
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6172$as_echo "$ac_ct_READELF" >&6; }
6173else
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6175$as_echo "no" >&6; }
6176fi
6177
6178
6179 test -n "$ac_ct_READELF" && break
6180done
6181
6182 if test "x$ac_ct_READELF" = x; then
6183 READELF=":"
6184 else
6185 case $cross_compiling:$ac_tool_warned in
6186yes:)
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6188$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6189ac_tool_warned=yes ;;
6190esac
6191 READELF=$ac_ct_READELF
6192 fi
6193fi
6194
6195if test "$cross_compiling" = yes; then
6196 case "$READELF" in
6197 readelf|:)
6198 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6199 ;;
6200 esac
6201fi
6202
6203
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006206hp*|HP*)
6207 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208 if test -z "$INSTALL"
6209 then
6210 INSTALL="${srcdir}/install-sh -c"
6211 fi
6212esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213# Find a good install program. We prefer a C program (faster),
6214# so one script is as good as another. But avoid the broken or
6215# incompatible versions:
6216# SysV /etc/install, /usr/sbin/install
6217# SunOS /usr/etc/install
6218# IRIX /sbin/install
6219# AIX /bin/install
6220# AmigaOS /C/install, which installs bootblocks on floppy discs
6221# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6222# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6223# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6224# OS/2's system install, which has a completely different semantic
6225# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006226# Reject install programs that cannot install multiple files.
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6228$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006230if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006231 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232else
6233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234for as_dir in $PATH
6235do
6236 IFS=$as_save_IFS
6237 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006238 # Account for people who put trailing slashes in PATH elements.
6239case $as_dir/ in #((
6240 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006242 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243 /usr/ucb/* ) ;;
6244 *)
6245 # OSF1 and SCO ODT 3.0 have their own names for install.
6246 # Don't use installbsd from OSF since it installs stuff as root
6247 # by default.
6248 for ac_prog in ginstall scoinst install; do
6249 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006250 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251 if test $ac_prog = install &&
6252 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6253 # AIX install. It has an incompatible calling convention.
6254 :
6255 elif test $ac_prog = install &&
6256 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6257 # program-specific install script used by HP pwplus--don't use.
6258 :
6259 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006260 rm -rf conftest.one conftest.two conftest.dir
6261 echo one > conftest.one
6262 echo two > conftest.two
6263 mkdir conftest.dir
6264 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6265 test -s conftest.one && test -s conftest.two &&
6266 test -s conftest.dir/conftest.one &&
6267 test -s conftest.dir/conftest.two
6268 then
6269 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6270 break 3
6271 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272 fi
6273 fi
6274 done
6275 done
6276 ;;
6277esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006278
6279 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280IFS=$as_save_IFS
6281
Matthias Kloseb9621712010-04-24 17:59:49 +00006282rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283
6284fi
6285 if test "${ac_cv_path_install+set}" = set; then
6286 INSTALL=$ac_cv_path_install
6287 else
6288 # As a last resort, use the slow shell script. Don't cache a
6289 # value for INSTALL within a source directory, because that will
6290 # break other packages using the cache if that directory is
6291 # removed, or if the value is a relative name.
6292 INSTALL=$ac_install_sh
6293 fi
6294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6296$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006297
6298# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6299# It thinks the first close brace ends the variable substitution.
6300test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6301
6302test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6303
6304test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6305
Matthias Klose93a0ef12012-03-15 18:08:34 +01006306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6307$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6308if test -z "$MKDIR_P"; then
6309 if ${ac_cv_path_mkdir+:} false; then :
6310 $as_echo_n "(cached) " >&6
6311else
6312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6314do
6315 IFS=$as_save_IFS
6316 test -z "$as_dir" && as_dir=.
6317 for ac_prog in mkdir gmkdir; do
6318 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006319 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006320 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6321 'mkdir (GNU coreutils) '* | \
6322 'mkdir (coreutils) '* | \
6323 'mkdir (fileutils) '4.1*)
6324 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6325 break 3;;
6326 esac
6327 done
6328 done
6329 done
6330IFS=$as_save_IFS
6331
6332fi
6333
6334 test -d ./--version && rmdir ./--version
6335 if test "${ac_cv_path_mkdir+set}" = set; then
6336 MKDIR_P="$ac_cv_path_mkdir -p"
6337 else
6338 # As a last resort, use the slow shell script. Don't cache a
6339 # value for MKDIR_P within a source directory, because that will
6340 # break other packages using the cache if that directory is
6341 # removed, or if the value is a relative name.
6342 MKDIR_P="$ac_install_sh -d"
6343 fi
6344fi
6345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6346$as_echo "$MKDIR_P" >&6; }
6347
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348
6349# Not every filesystem supports hard links
6350
6351if test -z "$LN" ; then
6352 case $ac_sys_system in
6353 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006354 *) LN=ln;;
6355 esac
6356fi
6357
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006358# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006359
6360ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006361
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6364$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365
6366# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006367if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368 withval=$with_pydebug;
6369if test "$withval" != no
6370then
6371
Matthias Kloseb9621712010-04-24 17:59:49 +00006372$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6375$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006377 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006378else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380fi
6381else
Matthias Kloseb9621712010-04-24 17:59:49 +00006382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384fi
6385
6386
Victor Stinnerf4e47032019-04-25 00:56:28 +02006387# Check for --with-trace-refs
6388# --with-trace-refs
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6390$as_echo_n "checking for --with-trace-refs... " >&6; }
6391
6392# Check whether --with-trace-refs was given.
6393if test "${with_trace_refs+set}" = set; then :
6394 withval=$with_trace_refs;
6395else
6396 with_trace_refs=no
6397fi
6398
6399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6400$as_echo "$with_trace_refs" >&6; }
6401
6402if test "$with_trace_refs" = "yes"
6403then
6404
6405$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6406
6407fi
6408
6409# Check for --with-assertions.
6410# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006411assertions='false'
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6413$as_echo_n "checking for --with-assertions... " >&6; }
6414
6415# Check whether --with-assertions was given.
6416if test "${with_assertions+set}" = set; then :
6417 withval=$with_assertions;
6418if test "$withval" != no
6419then
6420 assertions='true'
6421fi
6422fi
6423
6424if test "$assertions" = 'true'; then
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6426$as_echo "yes" >&6; }
6427elif test "$Py_DEBUG" = 'true'; then
6428 assertions='true'
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6430$as_echo "implied by --with-pydebug" >&6; }
6431else
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6433$as_echo "no" >&6; }
6434fi
6435
Brett Cannon63d98bc2016-09-06 17:12:40 -07006436# Enable optimization flags
6437
6438
6439Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6441$as_echo_n "checking for --enable-optimizations... " >&6; }
6442# Check whether --enable-optimizations was given.
6443if test "${enable_optimizations+set}" = set; then :
6444 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006445if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006446then
6447 Py_OPT='true'
6448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6449$as_echo "yes" >&6; };
6450else
6451 Py_OPT='false'
6452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; };
6454fi
6455else
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459
6460if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006461 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6462 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006463 # 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 +00006464 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006465 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006466 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006467 DEF_MAKE_RULE="build_all"
6468else
6469 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006470 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006471 DEF_MAKE_RULE="all"
6472fi
6473
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006474
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6476$as_echo_n "checking PROFILE_TASK... " >&6; }
6477if test -z "$PROFILE_TASK"
6478then
6479 PROFILE_TASK='-m test --pgo'
6480fi
6481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6482$as_echo "$PROFILE_TASK" >&6; }
6483
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006484# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6485# normal names in the default $PATH (ie: Ubuntu). They exist under the
6486# non-suffixed name in their versioned llvm directory.
6487
6488llvm_bin_dir=''
6489llvm_path="${PATH}"
6490if test "${CC}" = "clang"
6491then
6492 clang_bin=`which clang`
6493 # Some systems install clang elsewhere as a symlink to the real path
6494 # which is where the related llvm tools are located.
6495 if test -L "${clang_bin}"
6496 then
6497 clang_dir=`dirname "${clang_bin}"`
6498 clang_bin=`readlink "${clang_bin}"`
6499 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6500 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6501 fi
6502fi
6503
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006504# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6506$as_echo_n "checking for --with-lto... " >&6; }
6507
6508# Check whether --with-lto was given.
6509if test "${with_lto+set}" = set; then :
6510 withval=$with_lto;
6511if test "$withval" != no
6512then
6513 Py_LTO='true'
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6515$as_echo "yes" >&6; };
6516else
6517 Py_LTO='false'
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519$as_echo "no" >&6; };
6520fi
6521else
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6523$as_echo "no" >&6; }
6524fi
6525
6526if test "$Py_LTO" = 'true' ; then
6527 case $CC in
6528 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006529
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006530 if test -n "$ac_tool_prefix"; then
6531 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6532set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6534$as_echo_n "checking for $ac_word... " >&6; }
6535if ${ac_cv_path_LLVM_AR+:} false; then :
6536 $as_echo_n "(cached) " >&6
6537else
6538 case $LLVM_AR in
6539 [\\/]* | ?:[\\/]*)
6540 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6541 ;;
6542 *)
6543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6544for as_dir in ${llvm_path}
6545do
6546 IFS=$as_save_IFS
6547 test -z "$as_dir" && as_dir=.
6548 for ac_exec_ext in '' $ac_executable_extensions; do
6549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6550 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6552 break 2
6553 fi
6554done
6555 done
6556IFS=$as_save_IFS
6557
6558 ;;
6559esac
6560fi
6561LLVM_AR=$ac_cv_path_LLVM_AR
6562if test -n "$LLVM_AR"; then
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6564$as_echo "$LLVM_AR" >&6; }
6565else
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6567$as_echo "no" >&6; }
6568fi
6569
6570
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006571fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006572if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006573 ac_pt_LLVM_AR=$LLVM_AR
6574 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006575set dummy llvm-ar; ac_word=$2
6576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6577$as_echo_n "checking for $ac_word... " >&6; }
6578if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6579 $as_echo_n "(cached) " >&6
6580else
6581 case $ac_pt_LLVM_AR in
6582 [\\/]* | ?:[\\/]*)
6583 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6584 ;;
6585 *)
6586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6587for as_dir in ${llvm_path}
6588do
6589 IFS=$as_save_IFS
6590 test -z "$as_dir" && as_dir=.
6591 for ac_exec_ext in '' $ac_executable_extensions; do
6592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6593 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6595 break 2
6596 fi
6597done
6598 done
6599IFS=$as_save_IFS
6600
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006601 ;;
6602esac
6603fi
6604ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6605if test -n "$ac_pt_LLVM_AR"; then
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6607$as_echo "$ac_pt_LLVM_AR" >&6; }
6608else
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6610$as_echo "no" >&6; }
6611fi
6612
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006613 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006614 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006615 else
6616 case $cross_compiling:$ac_tool_warned in
6617yes:)
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6620ac_tool_warned=yes ;;
6621esac
6622 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006623 fi
6624else
6625 LLVM_AR="$ac_cv_path_LLVM_AR"
6626fi
6627
6628
6629 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6630 then
6631 LLVM_AR_FOUND="found"
6632 else
6633 LLVM_AR_FOUND="not-found"
6634 fi
6635 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6636 then
6637 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6638 if test -n "${found_llvm_ar}"
6639 then
6640 LLVM_AR='/usr/bin/xcrun llvm-ar'
6641 LLVM_AR_FOUND=found
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6643$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6644 fi
6645 fi
6646 if test $LLVM_AR_FOUND = not-found
6647 then
6648 LLVM_PROFR_ERR=yes
6649 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6650 else
6651 LLVM_AR_ERR=no
6652 fi
6653 AR="${LLVM_AR}"
6654 case $ac_sys_system in
6655 Darwin*)
6656 # Any changes made here should be reflected in the GCC+Darwin case below
6657 LTOFLAGS="-flto -Wl,-export_dynamic"
6658 ;;
6659 *)
6660 LTOFLAGS="-flto"
6661 ;;
6662 esac
6663 ;;
6664 *gcc*)
6665 case $ac_sys_system in
6666 Darwin*)
6667 LTOFLAGS="-flto -Wl,-export_dynamic"
6668 ;;
6669 *)
6670 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6671 ;;
6672 esac
6673 ;;
6674 esac
6675
6676 if test "$ac_cv_prog_cc_g" = "yes"
6677 then
6678 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6679 # to get debug symbols.
6680 LTOFLAGS="$LTOFLAGS -g"
6681 fi
6682
stratakisf92c7aa2018-12-04 15:54:01 +01006683 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006684 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006685fi
6686
6687# Enable PGO flags.
6688
6689
6690
6691
6692
6693
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006694if test -n "$ac_tool_prefix"; then
6695 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6696set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6698$as_echo_n "checking for $ac_word... " >&6; }
6699if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6700 $as_echo_n "(cached) " >&6
6701else
6702 case $LLVM_PROFDATA in
6703 [\\/]* | ?:[\\/]*)
6704 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6705 ;;
6706 *)
6707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6708for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006709do
6710 IFS=$as_save_IFS
6711 test -z "$as_dir" && as_dir=.
6712 for ac_exec_ext in '' $ac_executable_extensions; do
6713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006714 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6716 break 2
6717 fi
6718done
6719 done
6720IFS=$as_save_IFS
6721
Gregory P. Smith799520c2016-09-07 16:10:00 -07006722 ;;
6723esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006724fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006725LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6726if test -n "$LLVM_PROFDATA"; then
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6728$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006729else
6730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6731$as_echo "no" >&6; }
6732fi
6733
6734
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006735fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006736if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006737 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6738 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006739set dummy llvm-profdata; ac_word=$2
6740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6741$as_echo_n "checking for $ac_word... " >&6; }
6742if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6743 $as_echo_n "(cached) " >&6
6744else
6745 case $ac_pt_LLVM_PROFDATA in
6746 [\\/]* | ?:[\\/]*)
6747 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6748 ;;
6749 *)
6750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6751for as_dir in ${llvm_path}
6752do
6753 IFS=$as_save_IFS
6754 test -z "$as_dir" && as_dir=.
6755 for ac_exec_ext in '' $ac_executable_extensions; do
6756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6757 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6759 break 2
6760 fi
6761done
6762 done
6763IFS=$as_save_IFS
6764
Gregory P. Smith799520c2016-09-07 16:10:00 -07006765 ;;
6766esac
6767fi
6768ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6769if test -n "$ac_pt_LLVM_PROFDATA"; then
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6771$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6772else
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6774$as_echo "no" >&6; }
6775fi
6776
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006777 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006779 else
6780 case $cross_compiling:$ac_tool_warned in
6781yes:)
6782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6784ac_tool_warned=yes ;;
6785esac
6786 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006787 fi
6788else
6789 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6790fi
6791
6792
6793if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6794then
6795 LLVM_PROF_FOUND="found"
6796else
6797 LLVM_PROF_FOUND="not-found"
6798fi
6799if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6800then
6801 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6802 if test -n "${found_llvm_profdata}"
6803 then
6804 # llvm-profdata isn't directly in $PATH in some cases.
6805 # https://apple.stackexchange.com/questions/197053/
6806 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6807 LLVM_PROF_FOUND=found
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6809$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6810 fi
6811fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006812LLVM_PROF_ERR=no
6813case $CC in
6814 *clang*)
6815 # Any changes made here should be reflected in the GCC+Darwin case below
6816 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6817 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006818 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006819 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6820 if test $LLVM_PROF_FOUND = not-found
6821 then
6822 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006823 if test "${REQUIRE_PGO}" = "yes"
6824 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006825 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 -07006826 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006827 fi
6828 ;;
6829 *gcc*)
6830 case $ac_sys_system in
6831 Darwin*)
6832 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6833 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006834 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006835 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006836 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006837 then
6838 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006839 if test "${REQUIRE_PGO}" = "yes"
6840 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006841 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 -07006842 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006843 fi
6844 ;;
6845 *)
6846 PGO_PROF_GEN_FLAG="-fprofile-generate"
6847 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6848 LLVM_PROF_MERGER="true"
6849 LLVM_PROF_FILE=""
6850 ;;
6851 esac
6852 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006853 *icc*)
6854 PGO_PROF_GEN_FLAG="-prof-gen"
6855 PGO_PROF_USE_FLAG="-prof-use"
6856 LLVM_PROF_MERGER="true"
6857 LLVM_PROF_FILE=""
6858 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006859esac
6860
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6862# merged with this chunk of code?
6863
6864# Optimizer/debugger flags
6865# ------------------------
6866# (The following bit of code is complicated enough - please keep things
6867# indented properly. Just pretend you're editing Python code. ;-)
6868
6869# There are two parallel sets of case statements below, one that checks to
6870# see if OPT was set and one that does BASECFLAGS setting based upon
6871# compiler and platform. BASECFLAGS tweaks need to be made even if the
6872# user set OPT.
6873
Victor Stinner23a683a2019-04-12 21:27:37 +02006874case $CC in
6875 *clang*)
6876 cc_is_clang=1
6877 ;;
6878 *)
6879 if $CC --version 2>&1 | grep -q clang
6880 then
6881 cc_is_clang=1
6882 else
6883 cc_is_clang=
6884 fi
6885esac
6886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887# tweak OPT based on compiler and platform, only if the user didn't set
6888# it on the command line
6889
Victor Stinner9ed34a82017-05-02 22:35:58 +02006890
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006891if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892then
6893 case $GCC in
6894 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6896 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6897 WRAP="-fwrapv"
6898 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006899
Victor Stinner35f3d242017-04-21 12:35:24 +02006900 if test -n "${cc_is_clang}"
6901 then
6902 # Clang also needs -fwrapv
6903 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006904 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6905 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006906 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006907 fi
6908
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909 case $ac_cv_prog_cc_g in
6910 yes)
6911 if test "$Py_DEBUG" = 'true' ; then
6912 # Optimization messes up debuggers, so turn it off for
6913 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006914 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006915 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006916 else
Victor Stinner28205b22017-04-21 11:24:34 +02006917 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006918 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919 else
Victor Stinner28205b22017-04-21 11:24:34 +02006920 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006921 fi
6922 ;;
6923 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006924 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925 ;;
6926 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928 case $ac_sys_system in
6929 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6930 ;;
6931 esac
6932 ;;
6933
6934 *)
6935 OPT="-O"
6936 ;;
6937 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938fi
6939
6940
6941
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006942
stratakiscf10a752018-12-19 18:19:01 +01006943
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006944# The -arch flags for universal builds on OSX
6945UNIVERSAL_ARCH_FLAGS=
6946
6947
6948# tweak BASECFLAGS based on compiler and platform
6949case $GCC in
6950yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006951 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006952
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6954$as_echo_n "checking for -Wextra... " >&6; }
6955 ac_save_cc="$CC"
6956 CC="$CC -Wextra -Werror"
6957 if ${ac_cv_extra_warnings+:} false; then :
6958 $as_echo_n "(cached) " >&6
6959else
6960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6961/* end confdefs.h. */
6962
6963
6964int
6965main ()
6966{
6967
6968 ;
6969 return 0;
6970}
6971
6972_ACEOF
6973if ac_fn_c_try_compile "$LINENO"; then :
6974
6975 ac_cv_extra_warnings=yes
6976
6977else
6978
6979 ac_cv_extra_warnings=no
6980
6981fi
6982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6983fi
6984
6985 CC="$ac_save_cc"
6986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6987$as_echo "$ac_cv_extra_warnings" >&6; }
6988
6989 if test $ac_cv_extra_warnings = yes
6990 then
6991 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6992 fi
6993
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006994 # Python doesn't violate C99 aliasing rules, but older versions of
6995 # GCC produce warnings for legal Python code. Enable
6996 # -fno-strict-aliasing on versions of GCC that support but produce
6997 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6999$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000 ac_save_cc="$CC"
7001 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007002 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007003 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007005else
Matthias Kloseb9621712010-04-24 17:59:49 +00007006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007007/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007008
Matthias Kloseb159a552010-04-25 21:00:44 +00007009
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007010int
7011main ()
7012{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007013
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007014 ;
7015 return 0;
7016}
Matthias Kloseb159a552010-04-25 21:00:44 +00007017
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007019if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007020
7021 CC="$ac_save_cc -fstrict-aliasing"
7022 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007024/* end confdefs.h. */
7025
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007026 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007027int
7028main ()
7029{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007030double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031 ;
7032 return 0;
7033}
Matthias Kloseb159a552010-04-25 21:00:44 +00007034
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007036if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007037
7038 ac_cv_no_strict_aliasing=no
7039
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007040else
Matthias Kloseb159a552010-04-25 21:00:44 +00007041
7042 ac_cv_no_strict_aliasing=yes
7043
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007044fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007046
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007047else
Matthias Kloseb159a552010-04-25 21:00:44 +00007048
7049 ac_cv_no_strict_aliasing=no
7050
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007051fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007053fi
7054
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007055 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007056 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7058$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007059 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007060 then
7061 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7062 fi
7063
Zachary Ware5af85642015-12-21 12:09:17 -06007064 # ICC doesn't recognize the option, but only emits a warning
7065 ## XXX does it emit an unused result warning and can it be disabled?
7066 case "$CC" in
7067 *icc*)
7068 ac_cv_disable_unused_result_warning=no
7069 ;;
7070 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7072$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7073 ac_save_cc="$CC"
7074 CC="$CC -Wunused-result -Werror"
7075 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007076 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007077 $as_echo_n "(cached) " >&6
7078else
7079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7080/* end confdefs.h. */
7081
7082
7083int
7084main ()
7085{
7086
7087 ;
7088 return 0;
7089}
7090
7091_ACEOF
7092if ac_fn_c_try_compile "$LINENO"; then :
7093
7094 ac_cv_disable_unused_result_warning=yes
7095
7096else
7097
7098 ac_cv_disable_unused_result_warning=no
7099
7100fi
7101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7102fi
7103
7104 CFLAGS="$save_CFLAGS"
7105 CC="$ac_save_cc"
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7107$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007108 ;;
7109 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007110
7111 if test $ac_cv_disable_unused_result_warning = yes
7112 then
7113 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007114 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7115 fi
7116
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7118$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7119 ac_save_cc="$CC"
7120 CC="$CC -Wunused-parameter -Werror"
7121 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7122 $as_echo_n "(cached) " >&6
7123else
7124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7125/* end confdefs.h. */
7126
7127
7128int
7129main ()
7130{
7131
7132 ;
7133 return 0;
7134}
7135
7136_ACEOF
7137if ac_fn_c_try_compile "$LINENO"; then :
7138
7139 ac_cv_disable_unused_parameter_warning=yes
7140
7141else
7142
7143 ac_cv_disable_unused_parameter_warning=no
7144
7145fi
7146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7147fi
7148
7149 CC="$ac_save_cc"
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7151$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7152
7153 if test $ac_cv_disable_unused_parameter_warning = yes
7154 then
7155 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7156 fi
7157
7158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7159$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7160 ac_save_cc="$CC"
7161 CC="$CC -Wmissing-field-initializers -Werror"
7162 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7163 $as_echo_n "(cached) " >&6
7164else
7165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7166/* end confdefs.h. */
7167
7168
7169int
7170main ()
7171{
7172
7173 ;
7174 return 0;
7175}
7176
7177_ACEOF
7178if ac_fn_c_try_compile "$LINENO"; then :
7179
7180 ac_cv_disable_missing_field_initializers=yes
7181
7182else
7183
7184 ac_cv_disable_missing_field_initializers=no
7185
7186fi
7187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7188fi
7189
7190 CC="$ac_save_cc"
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7192$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7193
7194 if test $ac_cv_disable_missing_field_initializers = yes
7195 then
7196 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007197 fi
7198
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7200$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7201 ac_save_cc="$CC"
7202 CC="$CC -Wsign-compare"
7203 save_CFLAGS="$CFLAGS"
7204 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7205 $as_echo_n "(cached) " >&6
7206else
7207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7208/* end confdefs.h. */
7209
7210
7211int
7212main ()
7213{
7214
7215 ;
7216 return 0;
7217}
7218
7219_ACEOF
7220if ac_fn_c_try_compile "$LINENO"; then :
7221
7222 ac_cv_enable_sign_compare_warning=yes
7223
7224else
7225
7226 ac_cv_enable_sign_compare_warning=no
7227
7228fi
7229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7230fi
7231
7232 CFLAGS="$save_CFLAGS"
7233 CC="$ac_save_cc"
7234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7235$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7236
7237 if test $ac_cv_enable_sign_compare_warning = yes
7238 then
7239 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7240 fi
7241
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7243$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7244 ac_save_cc="$CC"
7245 CC="$CC -Wunreachable-code"
7246 save_CFLAGS="$CFLAGS"
7247 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7248 $as_echo_n "(cached) " >&6
7249else
7250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7251/* end confdefs.h. */
7252
7253
7254int
7255main ()
7256{
7257
7258 ;
7259 return 0;
7260}
7261
7262_ACEOF
7263if ac_fn_c_try_compile "$LINENO"; then :
7264
7265 ac_cv_enable_unreachable_code_warning=yes
7266
7267else
7268
7269 ac_cv_enable_unreachable_code_warning=no
7270
7271fi
7272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7273fi
7274
7275 CFLAGS="$save_CFLAGS"
7276 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007277
7278 # Don't enable unreachable code warning in debug mode, since it usually
7279 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007280 # Issue #24324: Unfortunately, the unreachable code warning does not work
7281 # correctly on gcc and has been silently removed from the compiler.
7282 # It is supported on clang but on OS X systems gcc may be an alias
7283 # for clang. Try to determine if the compiler is not really gcc and,
7284 # if so, only then enable the warning.
7285 if test $ac_cv_enable_unreachable_code_warning = yes && \
7286 test "$Py_DEBUG" != "true" && \
7287 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007288 then
7289 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007290 else
7291 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007292 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7294$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007295
INADA Naokie3364842018-06-05 20:40:53 +09007296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7297$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7298 ac_save_cc="$CC"
7299 CC="$CC -Werror -Wstrict-prototypes"
7300 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7301 $as_echo_n "(cached) " >&6
7302else
7303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7304/* end confdefs.h. */
7305
7306
7307int
7308main ()
7309{
7310
7311 ;
7312 return 0;
7313}
7314
7315_ACEOF
7316if ac_fn_c_try_compile "$LINENO"; then :
7317
7318 ac_cv_enable_strict_prototypes_warning=yes
7319
7320else
7321
7322 ac_cv_enable_strict_prototypes_warning=no
7323
7324fi
7325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7326fi
7327
7328 CC="$ac_save_cc"
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7330$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7331
7332 if test $ac_cv_enable_strict_prototypes_warning = yes
7333 then
7334 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7335 fi
7336
Victor Stinner193ee0a2017-02-06 14:24:00 +01007337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7338$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7339 ac_save_cc="$CC"
7340 CC="$CC -Werror=implicit-function-declaration"
7341 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7342 $as_echo_n "(cached) " >&6
7343else
7344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7345/* end confdefs.h. */
7346
7347
7348int
7349main ()
7350{
7351
7352 ;
7353 return 0;
7354}
7355
7356_ACEOF
7357if ac_fn_c_try_compile "$LINENO"; then :
7358
7359 ac_cv_enable_implicit_function_declaration_error=yes
7360
7361else
7362
7363 ac_cv_enable_implicit_function_declaration_error=no
7364
7365fi
7366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7367fi
7368
7369 CC="$ac_save_cc"
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7371$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7372
7373 if test $ac_cv_enable_implicit_function_declaration_error = yes
7374 then
7375 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7376 fi
7377
Vinay Sajip0b60f642019-10-15 08:26:12 +01007378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7379$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7380 ac_save_cc="$CC"
7381 CC="$CC -fvisibility=hidden"
7382 if ${ac_cv_enable_visibility+:} false; then :
7383 $as_echo_n "(cached) " >&6
7384else
7385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7386/* end confdefs.h. */
7387
7388
7389int
7390main ()
7391{
7392
7393 ;
7394 return 0;
7395}
7396
7397_ACEOF
7398if ac_fn_c_try_compile "$LINENO"; then :
7399
7400 ac_cv_enable_visibility=yes
7401
7402else
7403
7404 ac_cv_enable_visibility=no
7405
7406fi
7407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7408fi
7409
7410 CC="$ac_save_cc"
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7412$as_echo "$ac_cv_enable_visibility" >&6; }
7413
7414 if test $ac_cv_enable_visibility = yes
7415 then
7416 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7417 fi
7418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7420 # support. Without this, treatment of subnormals doesn't follow
7421 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007422 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423 alpha*)
7424 BASECFLAGS="$BASECFLAGS -mieee"
7425 ;;
7426 esac
7427
7428 case $ac_sys_system in
7429 SCO_SV*)
7430 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7431 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007432
Ned Deily87adb6e2013-10-18 21:09:56 -07007433 Darwin*)
7434 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7435 # used to be here, but non-Apple gcc doesn't accept them.
7436 if test "${CC}" = gcc
7437 then
7438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007439$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007440 case "${UNIVERSALSDK}" in
7441 */MacOSX10.4u.sdk)
7442 # Build using 10.4 SDK, force usage of gcc when the
7443 # compiler is gcc, otherwise the user will get very
7444 # confusing error messages when building on OSX 10.6
7445 CC=gcc-4.0
7446 CPP=cpp-4.0
7447 ;;
7448 esac
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007450$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007451 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452
Ned Deily87adb6e2013-10-18 21:09:56 -07007453 if test "${enable_universalsdk}"
7454 then
7455 case "$UNIVERSAL_ARCHS" in
7456 32-bit)
7457 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7458 LIPO_32BIT_FLAGS=""
7459 ARCH_RUN_32BIT=""
7460 ;;
7461 64-bit)
7462 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7463 LIPO_32BIT_FLAGS=""
7464 ARCH_RUN_32BIT="true"
7465 ;;
7466 all)
7467 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7468 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7469 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7470 ;;
7471 intel)
7472 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7473 LIPO_32BIT_FLAGS="-extract i386"
7474 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7475 ;;
7476 intel-32)
7477 UNIVERSAL_ARCH_FLAGS="-arch i386"
7478 LIPO_32BIT_FLAGS=""
7479 ARCH_RUN_32BIT=""
7480 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007481 intel-64)
7482 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7483 LIPO_32BIT_FLAGS=""
7484 ARCH_RUN_32BIT="true"
7485 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007486 3-way)
7487 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7488 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7489 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7490 ;;
7491 *)
7492 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7493 ;;
7494 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495
Ned Deily87adb6e2013-10-18 21:09:56 -07007496 if test "${UNIVERSALSDK}" != "/"
7497 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007498 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7499 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007500 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007501 else
7502 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7503 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007504 fi
7505 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506
Ned Deily87adb6e2013-10-18 21:09:56 -07007507 # Calculate an appropriate deployment target for this build:
7508 # The deployment target value is used explicitly to enable certain
7509 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007510 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007511 # component of the string returned by distutils.get_platform().
7512 #
7513 # Use the value from:
7514 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7515 # 2. the operating system version of the build machine if >= 10.6
7516 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7517 # below to pick either 10.3, 10.4, or 10.5 as the target.
7518 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519
Ned Deily87adb6e2013-10-18 21:09:56 -07007520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7521$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007522 cur_target_major=`sw_vers -productVersion | \
7523 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7524 cur_target_minor=`sw_vers -productVersion | \
7525 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7526 cur_target="${cur_target_major}.${cur_target_minor}"
7527 if test ${cur_target_major} -eq 10 && \
7528 test ${cur_target_minor} -ge 3 && \
7529 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007530 then
Ned Deily36820b62014-06-25 13:44:22 -07007531 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007532 cur_target=10.3
7533 if test ${enable_universalsdk}
7534 then
7535 case "$UNIVERSAL_ARCHS" in
7536 all|3-way|intel|64-bit)
7537 # These configurations were first supported in 10.5
7538 cur_target='10.5'
7539 ;;
7540 esac
7541 else
7542 if test `/usr/bin/arch` = "i386"
7543 then
7544 # 10.4 was the first release to support Intel archs
7545 cur_target="10.4"
7546 fi
7547 fi
7548 fi
7549 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007550
Ned Deily87adb6e2013-10-18 21:09:56 -07007551 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7552 # environment with a value that is the same as what we'll use
7553 # in the Makefile to ensure that we'll get the same compiler
7554 # environment during configure and build time.
7555 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7556 export MACOSX_DEPLOYMENT_TARGET
7557 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7559$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007560
Ned Deily87adb6e2013-10-18 21:09:56 -07007561 # end of Darwin* tests
7562 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563 esac
7564 ;;
7565
7566*)
7567 case $ac_sys_system in
7568 OpenUNIX*|UnixWare*)
7569 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7570 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571 SCO_SV*)
7572 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7573 ;;
7574 esac
7575 ;;
7576esac
7577
Zachary Ware5af85642015-12-21 12:09:17 -06007578# ICC needs -fp-model strict or floats behave badly
7579case "$CC" in
7580*icc*)
7581 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7582 ;;
7583esac
7584
T. Woutersddbfa2c2017-05-23 01:30:49 +02007585if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586 :
7587else
7588 OPT="-DNDEBUG $OPT"
7589fi
7590
7591if test "$ac_arch_flags"
7592then
7593 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7594fi
7595
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596# On some compilers, pthreads are available without further options
7597# (e.g. MacOS X). On some of these systems, the compiler will not
7598# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7599# So we have to see first whether pthreads are available without
7600# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7602$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007603if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605else
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607 ac_cv_pthread_is_default=no
7608else
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610/* end confdefs.h. */
7611
Stefan Krah7dba5942012-11-22 22:49:11 +01007612#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613#include <pthread.h>
7614
7615void* routine(void* p){return NULL;}
7616
7617int main(){
7618 pthread_t p;
7619 if(pthread_create(&p,NULL,routine,NULL)!=0)
7620 return 1;
7621 (void)pthread_detach(p);
7622 return 0;
7623}
7624
7625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007626if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627
7628 ac_cv_pthread_is_default=yes
7629 ac_cv_kthread=no
7630 ac_cv_pthread=no
7631
7632else
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637fi
7638
7639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640fi
7641
Matthias Kloseb9621712010-04-24 17:59:49 +00007642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7643$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644
7645
7646if test $ac_cv_pthread_is_default = yes
7647then
7648 ac_cv_kpthread=no
7649else
7650# -Kpthread, if available, provides the right #defines
7651# and linker options to make pthread_create available
7652# Some compilers won't report that they do not support -Kpthread,
7653# so we need to run a program to see whether it really made the
7654# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7656$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007657if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659else
7660 ac_save_cc="$CC"
7661CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007662if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663 ac_cv_kpthread=no
7664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666/* end confdefs.h. */
7667
Stefan Krah7dba5942012-11-22 22:49:11 +01007668#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669#include <pthread.h>
7670
7671void* routine(void* p){return NULL;}
7672
7673int main(){
7674 pthread_t p;
7675 if(pthread_create(&p,NULL,routine,NULL)!=0)
7676 return 1;
7677 (void)pthread_detach(p);
7678 return 0;
7679}
7680
7681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007682if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683 ac_cv_kpthread=yes
7684else
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689fi
7690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691CC="$ac_save_cc"
7692fi
7693
Matthias Kloseb9621712010-04-24 17:59:49 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7695$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696fi
7697
7698if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7699then
7700# -Kthread, if available, provides the right #defines
7701# and linker options to make pthread_create available
7702# Some compilers won't report that they do not support -Kthread,
7703# so we need to run a program to see whether it really made the
7704# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7706$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007707if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709else
7710 ac_save_cc="$CC"
7711CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007712if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713 ac_cv_kthread=no
7714else
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716/* end confdefs.h. */
7717
Stefan Krah7dba5942012-11-22 22:49:11 +01007718#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719#include <pthread.h>
7720
7721void* routine(void* p){return NULL;}
7722
7723int main(){
7724 pthread_t p;
7725 if(pthread_create(&p,NULL,routine,NULL)!=0)
7726 return 1;
7727 (void)pthread_detach(p);
7728 return 0;
7729}
7730
7731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007732if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733 ac_cv_kthread=yes
7734else
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739fi
7740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741CC="$ac_save_cc"
7742fi
7743
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7745$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746fi
7747
7748if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7749then
7750# -pthread, if available, provides the right #defines
7751# and linker options to make pthread_create available
7752# Some compilers won't report that they do not support -pthread,
7753# so we need to run a program to see whether it really made the
7754# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7756$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007757if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759else
7760 ac_save_cc="$CC"
7761CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007762if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763 ac_cv_pthread=no
7764else
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766/* end confdefs.h. */
7767
Stefan Krah7dba5942012-11-22 22:49:11 +01007768#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769#include <pthread.h>
7770
7771void* routine(void* p){return NULL;}
7772
7773int main(){
7774 pthread_t p;
7775 if(pthread_create(&p,NULL,routine,NULL)!=0)
7776 return 1;
7777 (void)pthread_detach(p);
7778 return 0;
7779}
7780
7781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007782if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783 ac_cv_pthread=yes
7784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7788 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789fi
7790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791CC="$ac_save_cc"
7792fi
7793
Matthias Kloseb9621712010-04-24 17:59:49 +00007794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7795$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796fi
7797
7798# If we have set a CC compiler flag for thread support then
7799# check if it works for CXX, too.
7800ac_cv_cxx_thread=no
7801if test ! -z "$CXX"
7802then
Matthias Kloseb9621712010-04-24 17:59:49 +00007803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7804$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805ac_save_cxx="$CXX"
7806
7807if test "$ac_cv_kpthread" = "yes"
7808then
7809 CXX="$CXX -Kpthread"
7810 ac_cv_cxx_thread=yes
7811elif test "$ac_cv_kthread" = "yes"
7812then
7813 CXX="$CXX -Kthread"
7814 ac_cv_cxx_thread=yes
7815elif test "$ac_cv_pthread" = "yes"
7816then
7817 CXX="$CXX -pthread"
7818 ac_cv_cxx_thread=yes
7819fi
7820
7821if test $ac_cv_cxx_thread = yes
7822then
7823 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7824 $CXX -c conftest.$ac_ext 2>&5
7825 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7826 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7827 then
7828 ac_cv_cxx_thread=yes
7829 else
7830 ac_cv_cxx_thread=no
7831 fi
7832 rm -fr conftest*
7833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7835$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007836fi
7837CXX="$ac_save_cxx"
7838
7839
7840# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7842$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007843if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007845else
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007847/* end confdefs.h. */
7848#include <stdlib.h>
7849#include <stdarg.h>
7850#include <string.h>
7851#include <float.h>
7852
7853int
7854main ()
7855{
7856
7857 ;
7858 return 0;
7859}
7860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007861if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007862 ac_cv_header_stdc=yes
7863else
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7867
7868if test $ac_cv_header_stdc = yes; then
7869 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007871/* end confdefs.h. */
7872#include <string.h>
7873
7874_ACEOF
7875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 $EGREP "memchr" >/dev/null 2>&1; then :
7877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007878else
7879 ac_cv_header_stdc=no
7880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007881rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007882
7883fi
7884
7885if test $ac_cv_header_stdc = yes; then
7886 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007888/* end confdefs.h. */
7889#include <stdlib.h>
7890
7891_ACEOF
7892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 $EGREP "free" >/dev/null 2>&1; then :
7894
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007895else
7896 ac_cv_header_stdc=no
7897fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007898rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007899
7900fi
7901
7902if test $ac_cv_header_stdc = yes; then
7903 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007905 :
7906else
Matthias Kloseb9621712010-04-24 17:59:49 +00007907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007908/* end confdefs.h. */
7909#include <ctype.h>
7910#include <stdlib.h>
7911#if ((' ' & 0x0FF) == 0x020)
7912# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7913# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7914#else
7915# define ISLOWER(c) \
7916 (('a' <= (c) && (c) <= 'i') \
7917 || ('j' <= (c) && (c) <= 'r') \
7918 || ('s' <= (c) && (c) <= 'z'))
7919# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7920#endif
7921
7922#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7923int
7924main ()
7925{
7926 int i;
7927 for (i = 0; i < 256; i++)
7928 if (XOR (islower (i), ISLOWER (i))
7929 || toupper (i) != TOUPPER (i))
7930 return 2;
7931 return 0;
7932}
7933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007934if ac_fn_c_try_run "$LINENO"; then :
7935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007936else
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007941fi
7942
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007943fi
7944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7946$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007947if test $ac_cv_header_stdc = yes; then
7948
Matthias Kloseb9621712010-04-24 17:59:49 +00007949$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007950
7951fi
7952
stratakise768c862018-01-23 16:11:24 +01007953for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007954fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007955ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007956sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007957utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007958poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007959sys/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 +01007960sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007961sys/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 +01007962sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007963sys/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 -07007964libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007965linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007966sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007967do :
7968 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7969ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007970if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007971 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007972#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007973_ACEOF
7974
7975fi
7976
Guido van Rossum627b2d71993-12-24 10:39:16 +00007977done
7978
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007979ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007980for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7983$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007984if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007986else
Matthias Kloseb9621712010-04-24 17:59:49 +00007987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007988/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007989#include <sys/types.h>
7990#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007991
Martin v. Löwis11437992002-04-12 09:54:03 +00007992int
7993main ()
7994{
7995if ((DIR *) 0)
7996return 0;
7997 ;
7998 return 0;
7999}
8000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008003else
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008008eval ac_res=\$$as_ac_Header
8009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8010$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008011if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008012 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008013#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008014_ACEOF
8015
8016ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008017fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019done
8020# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8021if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8023$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008024if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008026else
Martin v. Löwis11437992002-04-12 09:54:03 +00008027 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031/* Override any GCC internal prototype to avoid an error.
8032 Use char because int might match the return type of a GCC
8033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034#ifdef __cplusplus
8035extern "C"
8036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008037char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008038int
8039main ()
8040{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 ;
8043 return 0;
8044}
8045_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046for ac_lib in '' dir; do
8047 if test -z "$ac_lib"; then
8048 ac_res="none required"
8049 else
8050 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008051 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008058 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061done
Victor Stinnere0be4232011-10-25 13:06:09 +02008062if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064else
8065 ac_cv_search_opendir=no
8066fi
8067rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008068LIBS=$ac_func_search_save_LIBS
8069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8071$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008073if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008076fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
Michael W. Hudson54241132001-12-07 15:38:26 +00008078else
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8080$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008081if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008083else
8084 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088/* Override any GCC internal prototype to avoid an error.
8089 Use char because int might match the return type of a GCC
8090 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008091#ifdef __cplusplus
8092extern "C"
8093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008094char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008095int
8096main ()
8097{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ;
8100 return 0;
8101}
8102_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103for ac_lib in '' x; do
8104 if test -z "$ac_lib"; then
8105 ac_res="none required"
8106 else
8107 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008108 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008110 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008111 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113rm -f core conftest.err conftest.$ac_objext \
8114 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008115 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118done
Victor Stinnere0be4232011-10-25 13:06:09 +02008119if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121else
8122 ac_cv_search_opendir=no
8123fi
8124rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008125LIBS=$ac_func_search_save_LIBS
8126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8128$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008130if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008132
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008133fi
8134
8135fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8138$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008139if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008141else
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008143/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008144#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008145int
8146main ()
8147{
8148return makedev(0, 0);
8149 ;
8150 return 0;
8151}
8152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008153if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008154 ac_cv_header_sys_types_h_makedev=yes
8155else
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008158rm -f core conftest.err conftest.$ac_objext \
8159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008160
8161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8163$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008164
8165if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008166ac_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 +02008167if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008170
8171fi
8172
8173
8174
8175 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 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 +02008177if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008178
Matthias Kloseb9621712010-04-24 17:59:49 +00008179$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008180
8181fi
8182
8183
8184 fi
8185fi
8186
Michael W. Hudson54241132001-12-07 15:38:26 +00008187
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008188# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8189# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8190SAVE_CFLAGS=$CFLAGS
8191CFLAGS="-std=c99 $CFLAGS"
8192for ac_header in bluetooth/bluetooth.h
8193do :
8194 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8195if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8196 cat >>confdefs.h <<_ACEOF
8197#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8198_ACEOF
8199
8200fi
8201
8202done
8203
8204CFLAGS=$SAVE_CFLAGS
8205
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008206# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8207for ac_header in net/if.h
8208do :
8209 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8210#ifdef STDC_HEADERS
8211# include <stdlib.h>
8212# include <stddef.h>
8213#else
8214# ifdef HAVE_STDLIB_H
8215# include <stdlib.h>
8216# endif
8217#endif
8218#ifdef HAVE_SYS_SOCKET_H
8219# include <sys/socket.h>
8220#endif
8221
8222"
Victor Stinnere0be4232011-10-25 13:06:09 +02008223if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008224 cat >>confdefs.h <<_ACEOF
8225#define HAVE_NET_IF_H 1
8226_ACEOF
8227
8228fi
8229
8230done
8231
8232
Martin v. Löwis11017b12006-01-14 18:12:57 +00008233# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008234for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008235do :
8236 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 +00008237#ifdef HAVE_ASM_TYPES_H
8238#include <asm/types.h>
8239#endif
8240#ifdef HAVE_SYS_SOCKET_H
8241#include <sys/socket.h>
8242#endif
8243
Matthias Kloseb9621712010-04-24 17:59:49 +00008244"
Victor Stinnere0be4232011-10-25 13:06:09 +02008245if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008246 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008247#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008248_ACEOF
8249
8250fi
8251
8252done
8253
8254
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008255# On Linux, qrtr.h requires asm/types.h
8256for ac_header in linux/qrtr.h
8257do :
8258 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8259#ifdef HAVE_ASM_TYPES_H
8260#include <asm/types.h>
8261#endif
8262#ifdef HAVE_SYS_SOCKET_H
8263#include <sys/socket.h>
8264#endif
8265
8266"
8267if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8268 cat >>confdefs.h <<_ACEOF
8269#define HAVE_LINUX_QRTR_H 1
8270_ACEOF
8271
8272fi
8273
8274done
8275
8276
caaveryeffc12f2017-09-06 18:18:10 -04008277for ac_header in linux/vm_sockets.h
8278do :
8279 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8280#ifdef HAVE_SYS_SOCKET_H
8281#include <sys/socket.h>
8282#endif
8283
8284"
8285if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8286 cat >>confdefs.h <<_ACEOF
8287#define HAVE_LINUX_VM_SOCKETS_H 1
8288_ACEOF
8289
8290fi
8291
8292done
8293
8294
karl ding360371f2020-04-29 15:31:19 -07008295# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8296for 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 +02008297do :
8298 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8299ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8300#ifdef HAVE_SYS_SOCKET_H
8301#include <sys/socket.h>
8302#endif
8303
8304"
8305if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8306 cat >>confdefs.h <<_ACEOF
8307#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8308_ACEOF
8309
8310fi
8311
8312done
8313
8314
Guido van Rossum627b2d71993-12-24 10:39:16 +00008315# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008316was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8318$as_echo_n "checking for clock_t in time.h... " >&6; }
8319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008320/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008321#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008322
8323_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008326 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008327else
Martin v. Löwis11437992002-04-12 09:54:03 +00008328
8329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008331
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008332
Guido van Rossum627b2d71993-12-24 10:39:16 +00008333fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008334rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8337$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008338
Matthias Kloseb9621712010-04-24 17:59:49 +00008339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8340$as_echo_n "checking for makedev... " >&6; }
8341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008342/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008343
Jesus Cea740f53a2010-04-28 11:35:30 +00008344#if defined(MAJOR_IN_MKDEV)
8345#include <sys/mkdev.h>
8346#elif defined(MAJOR_IN_SYSMACROS)
8347#include <sys/sysmacros.h>
8348#else
8349#include <sys/types.h>
8350#endif
8351
Neal Norwitz11690112002-07-30 01:08:28 +00008352int
8353main ()
8354{
Jesus Cea740f53a2010-04-28 11:35:30 +00008355
8356 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008357 ;
8358 return 0;
8359}
Matthias Kloseb159a552010-04-25 21:00:44 +00008360
Neal Norwitz11690112002-07-30 01:08:28 +00008361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008362if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008363 ac_cv_has_makedev=yes
8364else
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008367rm -f core conftest.err conftest.$ac_objext \
8368 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8370$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008371if test "$ac_cv_has_makedev" = "yes"; then
8372
Matthias Kloseb9621712010-04-24 17:59:49 +00008373$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008374
8375fi
8376
Christian Heimes985ecdc2013-11-20 11:46:18 +01008377# byte swapping
8378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8379$as_echo_n "checking for le64toh... " >&6; }
8380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8381/* end confdefs.h. */
8382
8383#ifdef HAVE_ENDIAN_H
8384#include <endian.h>
8385#elif defined(HAVE_SYS_ENDIAN_H)
8386#include <sys/endian.h>
8387#endif
8388
8389int
8390main ()
8391{
8392
8393 le64toh(1)
8394 ;
8395 return 0;
8396}
8397
8398_ACEOF
8399if ac_fn_c_try_link "$LINENO"; then :
8400 ac_cv_has_le64toh=yes
8401else
8402 ac_cv_has_le64toh=no
8403fi
8404rm -f core conftest.err conftest.$ac_objext \
8405 conftest$ac_exeext conftest.$ac_ext
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8407$as_echo "$ac_cv_has_le64toh" >&6; }
8408if test "$ac_cv_has_le64toh" = "yes"; then
8409
8410$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8411
8412fi
8413
Martin v. Löwis399a6892002-10-04 10:22:02 +00008414use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008415# Don't use largefile support for GNU/Hurd
8416case $ac_sys_system in GNU*)
8417 use_lfs=no
8418esac
8419
Martin v. Löwis399a6892002-10-04 10:22:02 +00008420if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008421# Two defines needed to enable largefile support on various platforms
8422# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008423case $ac_sys_system/$ac_sys_release in
8424AIX*)
8425
8426$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8427
8428 ;;
8429esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008430
Matthias Kloseb9621712010-04-24 17:59:49 +00008431$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008432
8433
Matthias Kloseb9621712010-04-24 17:59:49 +00008434$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008435
Martin v. Löwis399a6892002-10-04 10:22:02 +00008436fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008437
Guido van Rossum84e7b241996-08-19 21:59:00 +00008438# Add some code to confdefs.h so that the test for off_t works on SCO
8439cat >> confdefs.h <<\EOF
8440#if defined(SCO_DS)
8441#undef _OFF_T
8442#endif
8443EOF
8444
Guido van Rossumef2255b2000-03-10 22:30:29 +00008445# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008446ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008447if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008449else
Martin v. Löwis11437992002-04-12 09:54:03 +00008450
8451cat >>confdefs.h <<_ACEOF
8452#define mode_t int
8453_ACEOF
8454
8455fi
8456
Matthias Kloseb9621712010-04-24 17:59:49 +00008457ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008458if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008460else
Martin v. Löwis11437992002-04-12 09:54:03 +00008461
8462cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008464_ACEOF
8465
8466fi
8467
Matthias Kloseb9621712010-04-24 17:59:49 +00008468ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008469if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008471else
Martin v. Löwis11437992002-04-12 09:54:03 +00008472
8473cat >>confdefs.h <<_ACEOF
8474#define pid_t int
8475_ACEOF
8476
8477fi
8478
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008479
Martin v. Löwis11437992002-04-12 09:54:03 +00008480cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008481#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008482_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008485if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008487else
Martin v. Löwis11437992002-04-12 09:54:03 +00008488
8489cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008491_ACEOF
8492
8493fi
8494
Matthias Kloseb9621712010-04-24 17:59:49 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8496$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008497if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008499else
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008501/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008502#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008503
8504_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008505if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507 ac_cv_type_uid_t=yes
8508else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008509 ac_cv_type_uid_t=no
8510fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008511rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008512
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8515$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008516if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008517
Matthias Kloseb9621712010-04-24 17:59:49 +00008518$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008519
8520
Matthias Kloseb9621712010-04-24 17:59:49 +00008521$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008522
8523fi
8524
Mark Dickinson983bc162012-12-02 12:11:38 +00008525
Matthias Kloseb9621712010-04-24 17:59:49 +00008526ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008527if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528
Matthias Kloseb9621712010-04-24 17:59:49 +00008529$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008530
8531fi
8532
Stefan Krah1919b7e2012-03-21 18:25:23 +01008533ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8534if test "x$ac_cv_type___uint128_t" = xyes; then :
8535
8536$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8537
8538fi
8539
Jack Jansendd19cf82001-12-06 22:36:17 +00008540
Michael W. Hudson54241132001-12-07 15:38:26 +00008541# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008542# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543# The cast to long int works around a bug in the HP C Compiler
8544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8546# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8548$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008549if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008551else
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 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 +00008553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 if test "$ac_cv_type_int" = yes; then
8556 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8557$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008558as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008559See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 else
8561 ac_cv_sizeof_int=0
8562 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8567$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568
8569
8570
Martin v. Löwis11437992002-04-12 09:54:03 +00008571cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008572#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008573_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008574
8575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576# The cast to long int works around a bug in the HP C Compiler
8577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8579# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8581$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008582if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008584else
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 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 +00008586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 if test "$ac_cv_type_long" = yes; then
8589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008591as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008592See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593 else
8594 ac_cv_sizeof_long=0
8595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8600$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601
8602
8603
Martin v. Löwis11437992002-04-12 09:54:03 +00008604cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008605#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008606_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008607
8608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609# The cast to long int works around a bug in the HP C Compiler
8610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8612# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8614$as_echo_n "checking size of long long... " >&6; }
8615if ${ac_cv_sizeof_long_long+:} false; then :
8616 $as_echo_n "(cached) " >&6
8617else
8618 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8619
8620else
8621 if test "$ac_cv_type_long_long" = yes; then
8622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8624as_fn_error 77 "cannot compute sizeof (long long)
8625See \`config.log' for more details" "$LINENO" 5; }
8626 else
8627 ac_cv_sizeof_long_long=0
8628 fi
8629fi
8630
8631fi
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8633$as_echo "$ac_cv_sizeof_long_long" >&6; }
8634
8635
8636
8637cat >>confdefs.h <<_ACEOF
8638#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8639_ACEOF
8640
8641
8642# The cast to long int works around a bug in the HP C Compiler
8643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8645# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8647$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008648if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008650else
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 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 +00008652
Martin v. Löwis11437992002-04-12 09:54:03 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 if test "$ac_cv_type_void_p" = yes; then
8655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008657as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008658See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659 else
8660 ac_cv_sizeof_void_p=0
8661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8666$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667
8668
8669
Martin v. Löwis11437992002-04-12 09:54:03 +00008670cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008671#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008672_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008673
8674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675# The cast to long int works around a bug in the HP C Compiler
8676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8680$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008681if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008683else
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 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 +00008685
Martin v. Löwis11437992002-04-12 09:54:03 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 if test "$ac_cv_type_short" = yes; then
8688 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008690as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008691See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692 else
8693 ac_cv_sizeof_short=0
8694 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696
Martin v. Löwis11437992002-04-12 09:54:03 +00008697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8699$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700
8701
8702
Martin v. Löwis11437992002-04-12 09:54:03 +00008703cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008704#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008705_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008706
8707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708# The cast to long int works around a bug in the HP C Compiler
8709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8711# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8713$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008714if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008716else
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 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 +00008718
Martin v. Löwis11437992002-04-12 09:54:03 +00008719else
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 if test "$ac_cv_type_float" = yes; then
8721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008723as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008724See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008725 else
8726 ac_cv_sizeof_float=0
8727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729
Martin v. Löwis11437992002-04-12 09:54:03 +00008730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8732$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733
8734
8735
Martin v. Löwis11437992002-04-12 09:54:03 +00008736cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008737#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008738_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008739
8740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741# The cast to long int works around a bug in the HP C Compiler
8742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8744# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8746$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008747if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008749else
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 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 +00008751
Martin v. Löwis11437992002-04-12 09:54:03 +00008752else
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 if test "$ac_cv_type_double" = yes; then
8754 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008756as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008757See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758 else
8759 ac_cv_sizeof_double=0
8760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762
Martin v. Löwis11437992002-04-12 09:54:03 +00008763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8765$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766
8767
8768
Martin v. Löwis11437992002-04-12 09:54:03 +00008769cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008770#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008771_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008772
8773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008774# The cast to long int works around a bug in the HP C Compiler
8775# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8776# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8777# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8779$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008780if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008782else
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 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 +00008784
Martin v. Löwis11437992002-04-12 09:54:03 +00008785else
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 if test "$ac_cv_type_fpos_t" = yes; then
8787 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008789as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008790See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791 else
8792 ac_cv_sizeof_fpos_t=0
8793 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795
Martin v. Löwis11437992002-04-12 09:54:03 +00008796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8798$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799
8800
8801
Martin v. Löwis11437992002-04-12 09:54:03 +00008802cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008803#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008804_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008805
Michael W. Hudson54241132001-12-07 15:38:26 +00008806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008807# The cast to long int works around a bug in the HP C Compiler
8808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8810# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8812$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008813if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 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 +00008817
Martin v. Löwis18e16552006-02-15 17:27:45 +00008818else
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 if test "$ac_cv_type_size_t" = yes; then
8820 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008822as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008823See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824 else
8825 ac_cv_sizeof_size_t=0
8826 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828
Martin v. Löwis18e16552006-02-15 17:27:45 +00008829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8831$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008832
8833
8834
Martin v. Löwis18e16552006-02-15 17:27:45 +00008835cat >>confdefs.h <<_ACEOF
8836#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8837_ACEOF
8838
8839
Christian Heimes400adb02008-02-01 08:12:03 +00008840# The cast to long int works around a bug in the HP C Compiler
8841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8843# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8845$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008846if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008848else
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 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 +00008850
Christian Heimes400adb02008-02-01 08:12:03 +00008851else
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 if test "$ac_cv_type_pid_t" = yes; then
8853 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8854$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008855as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008856See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008857 else
8858 ac_cv_sizeof_pid_t=0
8859 fi
8860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008861
Christian Heimes400adb02008-02-01 08:12:03 +00008862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8864$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008865
8866
8867
8868cat >>confdefs.h <<_ACEOF
8869#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8870_ACEOF
8871
8872
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008873# The cast to long int works around a bug in the HP C Compiler
8874# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8875# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8876# This bug is HP SR number 8606223364.
8877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8878$as_echo_n "checking size of uintptr_t... " >&6; }
8879if ${ac_cv_sizeof_uintptr_t+:} false; then :
8880 $as_echo_n "(cached) " >&6
8881else
8882 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8883
8884else
8885 if test "$ac_cv_type_uintptr_t" = yes; then
8886 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8887$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8888as_fn_error 77 "cannot compute sizeof (uintptr_t)
8889See \`config.log' for more details" "$LINENO" 5; }
8890 else
8891 ac_cv_sizeof_uintptr_t=0
8892 fi
8893fi
8894
8895fi
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8897$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8898
8899
8900
8901cat >>confdefs.h <<_ACEOF
8902#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8903_ACEOF
8904
8905
Michael W. Hudson54241132001-12-07 15:38:26 +00008906
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008907
Eitan Adler3055c942018-05-15 22:58:09 -07008908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8909$as_echo_n "checking for long double... " >&6; }
8910if ${ac_cv_type_long_double+:} false; then :
8911 $as_echo_n "(cached) " >&6
8912else
8913 if test "$GCC" = yes; then
8914 ac_cv_type_long_double=yes
8915 else
8916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8917/* end confdefs.h. */
8918/* The Stardent Vistra knows sizeof (long double), but does
8919 not support it. */
8920 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008921int
8922main ()
8923{
Eitan Adler3055c942018-05-15 22:58:09 -07008924static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8925 sizeof (double) <= sizeof (long double))];
8926test_array [0] = 0;
8927return test_array [0];
8928
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008929 ;
8930 return 0;
8931}
8932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008933if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008934 ac_cv_type_long_double=yes
8935else
8936 ac_cv_type_long_double=no
8937fi
8938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8939 fi
8940fi
8941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8942$as_echo "$ac_cv_type_long_double" >&6; }
8943 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008944
Matthias Kloseb9621712010-04-24 17:59:49 +00008945$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008946
Eitan Adler3055c942018-05-15 22:58:09 -07008947 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008948
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008949# The cast to long int works around a bug in the HP C Compiler
8950# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8951# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8952# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8954$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008955if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008957else
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 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 +00008959
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 if test "$ac_cv_type_long_double" = yes; then
8962 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008964as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008965See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008966 else
8967 ac_cv_sizeof_long_double=0
8968 fi
8969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8973$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008974
8975
8976
8977cat >>confdefs.h <<_ACEOF
8978#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8979_ACEOF
8980
8981
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983# The cast to long int works around a bug in the HP C Compiler
8984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8988$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008989if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008991else
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 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 +00008993
Thomas Woutersb2137042007-02-01 18:02:27 +00008994else
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 if test "$ac_cv_type__Bool" = yes; then
8996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008998as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008999See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000 else
9001 ac_cv_sizeof__Bool=0
9002 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009004
Thomas Woutersb2137042007-02-01 18:02:27 +00009005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9007$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008
9009
9010
Thomas Woutersb2137042007-02-01 18:02:27 +00009011cat >>confdefs.h <<_ACEOF
9012#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9013_ACEOF
9014
9015
Thomas Woutersb2137042007-02-01 18:02:27 +00009016
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017# The cast to long int works around a bug in the HP C Compiler
9018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9020# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9022$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009023if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009025else
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009027#ifdef HAVE_SYS_TYPES_H
9028#include <sys/types.h>
9029#endif
9030
Matthias Kloseb9621712010-04-24 17:59:49 +00009031"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009032
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009033else
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 if test "$ac_cv_type_off_t" = yes; then
9035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009037as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009038See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009039 else
9040 ac_cv_sizeof_off_t=0
9041 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009043
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9046$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009047
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009048
9049
Martin v. Löwis11437992002-04-12 09:54:03 +00009050cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009051#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009052_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009053
Michael W. Hudson54241132001-12-07 15:38:26 +00009054
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009055
Matthias Kloseb9621712010-04-24 17:59:49 +00009056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9057$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009058if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009059 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009060
Matthias Kloseb9621712010-04-24 17:59:49 +00009061$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9064$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009065else
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9067$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009068fi
9069
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009070# The cast to long int works around a bug in the HP C Compiler
9071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9073# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9075$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009076if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009078else
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009080#ifdef HAVE_SYS_TYPES_H
9081#include <sys/types.h>
9082#endif
9083#ifdef HAVE_TIME_H
9084#include <time.h>
9085#endif
9086
Matthias Kloseb9621712010-04-24 17:59:49 +00009087"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009088
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009089else
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 if test "$ac_cv_type_time_t" = yes; then
9091 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9092$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009093as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009094See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009095 else
9096 ac_cv_sizeof_time_t=0
9097 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009099
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9102$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009103
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009104
9105
Martin v. Löwis11437992002-04-12 09:54:03 +00009106cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009107#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009108_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009109
Michael W. Hudson54241132001-12-07 15:38:26 +00009110
9111
Trent Mick635f6fb2000-08-23 21:33:05 +00009112# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009113ac_save_cc="$CC"
9114if test "$ac_cv_kpthread" = "yes"
9115then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009116elif test "$ac_cv_kthread" = "yes"
9117then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009118elif test "$ac_cv_pthread" = "yes"
9119then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009120fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009121
Matthias Kloseb9621712010-04-24 17:59:49 +00009122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9123$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009124have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009126/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009127
9128 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009129int
9130main ()
9131{
Guido van Rossum12580492000-09-24 16:47:19 +00009132pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 ;
9134 return 0;
9135}
Matthias Kloseb159a552010-04-25 21:00:44 +00009136
Martin v. Löwis11437992002-04-12 09:54:03 +00009137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009138if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009139 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9143$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009144if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009145 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9148# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9150$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009151if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009153else
Matthias Kloseb9621712010-04-24 17:59:49 +00009154 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009155#ifdef HAVE_PTHREAD_H
9156#include <pthread.h>
9157#endif
9158
Matthias Kloseb9621712010-04-24 17:59:49 +00009159"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009161else
Matthias Kloseb9621712010-04-24 17:59:49 +00009162 if test "$ac_cv_type_pthread_t" = yes; then
9163 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9164$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009165as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009166See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009167 else
9168 ac_cv_sizeof_pthread_t=0
9169 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009171
Trent Mick635f6fb2000-08-23 21:33:05 +00009172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9174$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009176
9177
Martin v. Löwis11437992002-04-12 09:54:03 +00009178cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009179#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009180_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009182
Trent Mick635f6fb2000-08-23 21:33:05 +00009183fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009184
9185# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9186# This checking will be unnecessary after removing deprecated TLS API.
9187# The cast to long int works around a bug in the HP C Compiler
9188# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9189# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9190# This bug is HP SR number 8606223364.
9191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9192$as_echo_n "checking size of pthread_key_t... " >&6; }
9193if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9194 $as_echo_n "(cached) " >&6
9195else
9196 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9197"; then :
9198
9199else
9200 if test "$ac_cv_type_pthread_key_t" = yes; then
9201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9202$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9203as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9204See \`config.log' for more details" "$LINENO" 5; }
9205 else
9206 ac_cv_sizeof_pthread_key_t=0
9207 fi
9208fi
9209
9210fi
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9212$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9213
9214
9215
9216cat >>confdefs.h <<_ACEOF
9217#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9218_ACEOF
9219
9220
9221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9222$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9223if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9225/* end confdefs.h. */
9226#include <pthread.h>
9227int
9228main ()
9229{
9230pthread_key_t k; k * 1;
9231 ;
9232 return 0;
9233}
9234_ACEOF
9235if ac_fn_c_try_compile "$LINENO"; then :
9236 ac_pthread_key_t_is_arithmetic_type=yes
9237else
9238 ac_pthread_key_t_is_arithmetic_type=no
9239
9240fi
9241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9243$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9244 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9245
9246$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9247
9248 fi
9249else
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9251$as_echo "no" >&6; }
9252fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009253CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009254
Michael W. Hudson54241132001-12-07 15:38:26 +00009255
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009256case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009257 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009258 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9259 ;;
9260 Darwin/*)
9261 OTHER_LIBTOOL_OPT=""
9262 ;;
9263esac
9264
9265
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009266
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009267case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009268 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009269 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9270 if test "${enable_universalsdk}"; then
9271 :
9272 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009273 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009274 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009275 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009276 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009277 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009278 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009279 if test ${gcc_version} '<' 4.0
9280 then
9281 LIBTOOL_CRUFT="-lcc_dynamic"
9282 else
9283 LIBTOOL_CRUFT=""
9284 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009285 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009286 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009287else
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009289/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009290
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009291 #include <unistd.h>
9292 int main(int argc, char*argv[])
9293 {
9294 if (sizeof(long) == 4) {
9295 return 0;
9296 } else {
9297 return 1;
9298 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009299 }
9300
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009302if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009303 ac_osx_32bit=yes
9304else
Matthias Kloseb9621712010-04-24 17:59:49 +00009305 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9308 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009309fi
9310
9311
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009312 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009313 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009314 i386)
9315 MACOSX_DEFAULT_ARCH="i386"
9316 ;;
9317 ppc)
9318 MACOSX_DEFAULT_ARCH="ppc"
9319 ;;
9320 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009321 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009322 ;;
9323 esac
9324 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009325 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009326 i386)
9327 MACOSX_DEFAULT_ARCH="x86_64"
9328 ;;
9329 ppc)
9330 MACOSX_DEFAULT_ARCH="ppc64"
9331 ;;
9332 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009333 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009334 ;;
9335 esac
9336
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009337 fi
9338
9339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009340 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009341 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009342esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9344$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009345if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009346then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009347 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009349 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009350
Matthias Kloseb9621712010-04-24 17:59:49 +00009351$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9354$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009355 if test $enable_shared = "yes"
9356 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009357 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 +00009358 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009359else
Matthias Kloseb9621712010-04-24 17:59:49 +00009360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9361$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009362fi
9363
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9365$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009366case $ac_sys_system/$ac_sys_release in
9367 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009370
Matthias Kloseb9621712010-04-24 17:59:49 +00009371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9372$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009373 ;;
9374 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9376$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009377 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009378esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009379
Guido van Rossum0a516c91994-09-12 10:58:40 +00009380# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009381
Michael W. Hudson54241132001-12-07 15:38:26 +00009382
9383
9384
9385
Benjamin Peterson99f03762010-04-11 22:15:28 +00009386
Thomas Wouters477c8d52006-05-27 19:21:47 +00009387
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009388# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9389# -- usually .so, .sl on HP-UX, .dll on Cygwin
9390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9391$as_echo_n "checking the extension of shared libraries... " >&6; }
9392if test -z "$SHLIB_SUFFIX"; then
9393 case $ac_sys_system in
9394 hp*|HP*)
9395 case `uname -m` in
9396 ia64) SHLIB_SUFFIX=.so;;
9397 *) SHLIB_SUFFIX=.sl;;
9398 esac
9399 ;;
9400 CYGWIN*) SHLIB_SUFFIX=.dll;;
9401 *) SHLIB_SUFFIX=.so;;
9402 esac
9403fi
9404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9405$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009406
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009408# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009409# (Shared libraries in this instance are shared modules to be loaded into
9410# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9412$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009413if test -z "$LDSHARED"
9414then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009415 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009416 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009417 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009418 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009419 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009421 if test "$GCC" = "yes" ; then
9422 LDSHARED='$(CC) -shared'
9423 LDCXXSHARED='$(CXX) -shared'
9424 else
9425 LDSHARED='$(CC) -G'
9426 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009427 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009428 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009429 if test "$GCC" = "yes" ; then
9430 LDSHARED='$(CC) -shared'
9431 LDCXXSHARED='$(CXX) -shared'
9432 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009433 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009434 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009435 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009436 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009437 LDSHARED='$(CC) -bundle'
9438 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009439 if test "$enable_framework" ; then
9440 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009441 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9442 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009443 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009444 else
9445 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009446 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009447 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009448 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009449 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009450 LDSHARED='$(CC) -bundle'
9451 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +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 Jansene578a632001-08-15 01:27:14 +00009457 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009458 # No framework, use the Python app as bundle-loader
9459 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009460 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009461 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009462 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009463 Darwin/*)
9464 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9465 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009466
Ned Deily36820b62014-06-25 13:44:22 -07009467 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9468 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9469 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9470 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9471 if test ${dep_target_major} -eq 10 && \
9472 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009473 then
Ned Deily36820b62014-06-25 13:44:22 -07009474 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009475 LDSHARED='$(CC) -bundle'
9476 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009477 if test "$enable_framework" ; then
9478 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009479 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9480 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009481 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009482 else
9483 # No framework, use the Python app as bundle-loader
9484 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9485 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009486 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009487 fi
Ned Deily36820b62014-06-25 13:44:22 -07009488 else
9489 # building for OS X 10.3 and later
9490 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9491 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9492 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009493 fi
9494 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009495 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009496 LDSHARED='$(CC) -shared'
9497 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009498 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009499 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009500 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009501 LDSHARED='$(CC) -shared'
9502 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009503 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009504 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009505 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009506 OpenBSD*)
9507 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9508 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009509 LDSHARED='$(CC) -shared $(CCSHARED)'
9510 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009511 else
9512 case `uname -r` in
9513 [01].* | 2.[0-7] | 2.[0-7].*)
9514 LDSHARED="ld -Bshareable ${LDFLAGS}"
9515 ;;
9516 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009517 LDSHARED='$(CC) -shared $(CCSHARED)'
9518 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009519 ;;
9520 esac
9521 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009522 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009523 LDSHARED='$(CC) -shared'
9524 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009525 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009526 if test "$GCC" = "yes" ; then
9527 LDSHARED='$(CC) -shared'
9528 LDCXXSHARED='$(CXX) -shared'
9529 else
9530 LDSHARED='$(CC) -G'
9531 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009532 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009533 SCO_SV*)
9534 LDSHARED='$(CC) -Wl,-G,-Bexport'
9535 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9536 CYGWIN*)
9537 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9538 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009539 *) LDSHARED="ld";;
9540 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9543$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009544LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009545BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009546# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009547# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9549$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009550if test -z "$CCSHARED"
9551then
Guido van Rossum07397971997-04-29 21:49:50 +00009552 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009553 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009554 then CCSHARED="-fPIC";
9555 elif test `uname -p` = sparc;
9556 then CCSHARED="-xcode=pic32";
9557 else CCSHARED="-Kpic";
9558 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009559 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009560 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009561 else CCSHARED="+z";
9562 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009563 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009564 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009565 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009566 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009567 if test "$GCC" = "yes"
9568 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009569 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009570 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009571 SCO_SV*)
9572 if test "$GCC" = "yes"
9573 then CCSHARED="-fPIC"
9574 else CCSHARED="-Kpic -belf"
9575 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009576 VxWorks*)
9577 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009578 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9581$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009582# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009583# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9585$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009586if test -z "$LINKFORSHARED"
9587then
Guido van Rossum07397971997-04-29 21:49:50 +00009588 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009589 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009590 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009591 LINKFORSHARED="-Wl,-E -Wl,+s";;
9592# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009593 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009594 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009595 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009597 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009598
9599 # Issue #18075: the default maximum stack size (8MBytes) is too
9600 # small for the default recursion limit. Increase the stack size
9601 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009602 # Note: This matches the value of THREAD_STACK_SIZE in
9603 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009604 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9605
Jack Jansene578a632001-08-15 01:27:14 +00009606 if test "$enable_framework"
9607 then
Jack Jansenda49e192005-01-07 13:08:22 +00009608 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009609 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009610 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009611 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009612 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009613 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009614 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009615 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9616 then
9617 LINKFORSHARED="-Wl,--export-dynamic"
9618 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009619 SunOS/5*) case $CC in
9620 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009621 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009622 then
9623 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009624 fi;;
9625 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009626 CYGWIN*)
9627 if test $enable_shared = "no"
9628 then
9629 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9630 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009631 QNX*)
9632 # -Wl,-E causes the symbols to be added to the dynamic
9633 # symbol table so that they can be found when a module
9634 # is loaded. -N 2048K causes the stack size to be set
9635 # to 2048 kilobytes so that the stack doesn't overflow
9636 # when running test_compile.py.
9637 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009638 VxWorks*)
9639 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009640 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9643$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009644
Michael W. Hudson54241132001-12-07 15:38:26 +00009645
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009646
Matthias Kloseb9621712010-04-24 17:59:49 +00009647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9648$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009649if test ! "$LIBRARY" = "$LDLIBRARY"
9650then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009651 case $ac_sys_system in
9652 CYGWIN*)
9653 # Cygwin needs CCSHARED when building extension DLLs
9654 # but not when building the interpreter DLL.
9655 CFLAGSFORSHARED='';;
9656 *)
9657 CFLAGSFORSHARED='$(CCSHARED)'
9658 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9661$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009662
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009663# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9664# library (with --enable-shared).
9665# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009666# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9667# if it is not required, since it creates a dependency of the shared library
9668# to LIBS. This, in turn, means that applications linking the shared libpython
9669# don't need to link LIBS explicitly. The default should be only changed
9670# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009671
Matthias Kloseb9621712010-04-24 17:59:49 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9673$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009674case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009675 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009676 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009677esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9679$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009680
9681
Guido van Rossum627b2d71993-12-24 10:39:16 +00009682# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9684$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009686 $as_echo_n "(cached) " >&6
9687else
9688 ac_check_lib_save_LIBS=$LIBS
9689LIBS="-lsendfile $LIBS"
9690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9691/* end confdefs.h. */
9692
9693/* Override any GCC internal prototype to avoid an error.
9694 Use char because int might match the return type of a GCC
9695 builtin and then its argument prototype would still apply. */
9696#ifdef __cplusplus
9697extern "C"
9698#endif
9699char sendfile ();
9700int
9701main ()
9702{
9703return sendfile ();
9704 ;
9705 return 0;
9706}
9707_ACEOF
9708if ac_fn_c_try_link "$LINENO"; then :
9709 ac_cv_lib_sendfile_sendfile=yes
9710else
9711 ac_cv_lib_sendfile_sendfile=no
9712fi
9713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext
9715LIBS=$ac_check_lib_save_LIBS
9716fi
9717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9718$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009719if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009720 cat >>confdefs.h <<_ACEOF
9721#define HAVE_LIBSENDFILE 1
9722_ACEOF
9723
9724 LIBS="-lsendfile $LIBS"
9725
9726fi
9727
Matthias Kloseb9621712010-04-24 17:59:49 +00009728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9729$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009730if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009731 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009732else
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009734LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738/* Override any GCC internal prototype to avoid an error.
9739 Use char because int might match the return type of a GCC
9740 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009741#ifdef __cplusplus
9742extern "C"
9743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009744char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009745int
9746main ()
9747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ;
9750 return 0;
9751}
9752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009755else
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009758rm -f core conftest.err conftest.$ac_objext \
9759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009760LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9763$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009764if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 cat >>confdefs.h <<_ACEOF
9766#define HAVE_LIBDL 1
9767_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009769 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009770
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009771fi
9772 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9774$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009775if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009777else
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009779LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783/* Override any GCC internal prototype to avoid an error.
9784 Use char because int might match the return type of a GCC
9785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009786#ifdef __cplusplus
9787extern "C"
9788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009789char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009790int
9791main ()
9792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ;
9795 return 0;
9796}
9797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009800else
Matthias Kloseb9621712010-04-24 17:59:49 +00009801 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009803rm -f core conftest.err conftest.$ac_objext \
9804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009805LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9808$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009809if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 cat >>confdefs.h <<_ACEOF
9811#define HAVE_LIBDLD 1
9812_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009814 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009816fi
9817 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009818
Michael Felt0d3ccb42017-12-30 22:39:20 +01009819# checks for uuid.h location
9820for ac_header in uuid/uuid.h uuid.h
9821do :
9822 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9823ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9824if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9825 cat >>confdefs.h <<_ACEOF
9826#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9827_ACEOF
9828
9829fi
9830
9831done
9832
9833
Berker Peksag9a10ff42017-11-08 23:09:16 +03009834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9835$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9837/* end confdefs.h. */
9838#include <uuid/uuid.h>
9839int
9840main ()
9841{
9842
9843#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009844void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009845#endif
9846
9847 ;
9848 return 0;
9849}
9850_ACEOF
9851if ac_fn_c_try_compile "$LINENO"; then :
9852
9853$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9854
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9856$as_echo "yes" >&6; }
9857else
9858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9859$as_echo "no" >&6; }
9860
9861fi
9862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9863
Michael Felt0d3ccb42017-12-30 22:39:20 +01009864# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009865# FreeBSD and OpenBSD provides support as well
9866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9867$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9869/* end confdefs.h. */
9870#include <uuid.h>
9871int
9872main ()
9873{
9874
9875#ifndef uuid_create
9876void *x = uuid_create
9877#endif
9878
9879 ;
9880 return 0;
9881}
9882_ACEOF
9883if ac_fn_c_try_compile "$LINENO"; then :
9884
9885$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9886
9887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9888$as_echo "yes" >&6; }
9889else
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891$as_echo "no" >&6; }
9892
9893fi
9894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9895
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009896# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9897# stream in big-endian byte-order
9898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9899$as_echo_n "checking for uuid_enc_be... " >&6; }
9900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9901/* end confdefs.h. */
9902#include <uuid.h>
9903int
9904main ()
9905{
9906
9907#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009908void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009909#endif
9910
9911 ;
9912 return 0;
9913}
9914_ACEOF
9915if ac_fn_c_try_compile "$LINENO"; then :
9916
9917$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9918
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9920$as_echo "yes" >&6; }
9921else
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923$as_echo "no" >&6; }
9924
9925fi
9926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9927
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009928# 'Real Time' functions on Solaris
9929# posix4 on Solaris 2.6
9930# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009932$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009933if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009935else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009936 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009940/* Override any GCC internal prototype to avoid an error.
9941 Use char because int might match the return type of a GCC
9942 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009943#ifdef __cplusplus
9944extern "C"
9945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009946char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009947int
9948main ()
9949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009950return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 ;
9952 return 0;
9953}
9954_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955for ac_lib in '' pthread rt posix4; do
9956 if test -z "$ac_lib"; then
9957 ac_res="none required"
9958 else
9959 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009960 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009963 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009965rm -f core conftest.err conftest.$ac_objext \
9966 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009967 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009970done
Victor Stinnere0be4232011-10-25 13:06:09 +02009971if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009973else
9974 ac_cv_search_sem_init=no
9975fi
9976rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009977LIBS=$ac_func_search_save_LIBS
9978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9980$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009982if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009983 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009984
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009985fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009986
Martin v. Löwis519adae2003-09-20 10:47:47 +00009987
Martin v. Löwis19d17342003-06-14 21:03:05 +00009988# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9990$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009991if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009992 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009993else
9994 ac_check_lib_save_LIBS=$LIBS
9995LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009997/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999/* Override any GCC internal prototype to avoid an error.
10000 Use char because int might match the return type of a GCC
10001 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010002#ifdef __cplusplus
10003extern "C"
10004#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010005char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010006int
10007main ()
10008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010010 ;
10011 return 0;
10012}
10013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010015 ac_cv_lib_intl_textdomain=yes
10016else
Matthias Kloseb9621712010-04-24 17:59:49 +000010017 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010019rm -f core conftest.err conftest.$ac_objext \
10020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010021LIBS=$ac_check_lib_save_LIBS
10022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10024$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010025if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010026
Matthias Kloseb9621712010-04-24 17:59:49 +000010027$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010028
Brett Cannonc6d936e2009-06-07 20:09:53 +000010029 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010030fi
10031
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010032
10033# checks for system dependent C++ extensions support
10034case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010035 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10036$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010038/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010039
Georg Brandl59e87bd2011-02-15 19:48:59 +000010040 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010041int
10042main ()
10043{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010044loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 ;
10046 return 0;
10047}
Matthias Kloseb159a552010-04-25 21:00:44 +000010048
Martin v. Löwis11437992002-04-12 09:54:03 +000010049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010050if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010051
Matthias Kloseb159a552010-04-25 21:00:44 +000010052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010054
Matthias Kloseb159a552010-04-25 21:00:44 +000010055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010056$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010057
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010058else
Matthias Kloseb159a552010-04-25 21:00:44 +000010059
10060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010061$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010062
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010064rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010065 conftest$ac_exeext conftest.$ac_ext
10066# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10067# of the AIX system used to build/package Python executable. This tag serves
10068# as a baseline for bdist module packages
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10070$as_echo_n "checking for the system builddate... " >&6; }
10071 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10072
10073cat >>confdefs.h <<_ACEOF
10074#define AIX_BUILDDATE $AIX_BUILDDATE
10075_ACEOF
10076
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10078$as_echo "$AIX_BUILDDATE" >&6; }
10079 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010080 *) ;;
10081esac
10082
Christian Heimes985ecdc2013-11-20 11:46:18 +010010083# check for systems that require aligned memory access
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10085$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010086if ${ac_cv_aligned_required+:} false; then :
10087 $as_echo_n "(cached) " >&6
10088else
10089 if test "$cross_compiling" = yes; then :
10090 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010091else
10092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10093/* end confdefs.h. */
10094
10095int main()
10096{
10097 char s[16];
10098 int i, *p1, *p2;
10099 for (i=0; i < 16; i++)
10100 s[i] = i;
10101 p1 = (int*)(s+1);
10102 p2 = (int*)(s+2);
10103 if (*p1 == *p2)
10104 return 1;
10105 return 0;
10106}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010107_ACEOF
10108if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010109 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010110else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010111 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010112fi
10113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10114 conftest.$ac_objext conftest.beam conftest.$ac_ext
10115fi
10116
10117
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010118fi
10119
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10121$as_echo "$ac_cv_aligned_required" >&6; }
10122if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010123
10124$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10125
10126fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010127
10128# str, bytes and memoryview hash algorithm
10129
10130
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10132$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10133
10134# Check whether --with-hash_algorithm was given.
10135if test "${with_hash_algorithm+set}" = set; then :
10136 withval=$with_hash_algorithm;
10137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10138$as_echo "$withval" >&6; }
10139case "$withval" in
10140 siphash24)
10141 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10142
10143 ;;
10144 fnv)
10145 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10146
10147 ;;
10148 *)
10149 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10150 ;;
10151esac
10152
10153else
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10155$as_echo "default" >&6; }
10156fi
10157
10158
Paul Ganssle62972d92020-05-16 04:20:06 -040010159validate_tzpath() {
10160 # Checks that each element of hte path is an absolute path
10161 if test -z "$1"; then
10162 # Empty string is allowed: it indicates no system TZPATH
10163 return 0
10164 fi
10165
10166 # Bad paths are those that don't start with /
10167 if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
10168 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10169 return 1;
10170 fi
10171}
10172
10173TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10175$as_echo_n "checking for --with-tzpath... " >&6; }
10176
10177# Check whether --with-tzpath was given.
10178if test "${with_tzpath+set}" = set; then :
10179 withval=$with_tzpath;
10180case "$withval" in
10181 yes)
10182 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10183 ;;
10184 *)
10185 validate_tzpath "$withval"
10186 TZPATH="$withval"
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10188$as_echo "\"$withval\"" >&6; }
10189 ;;
10190esac
10191
10192else
10193 validate_tzpath "$TZPATH"
10194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10195$as_echo "\"$TZPATH\"" >&6; }
10196fi
10197
10198
10199
Charles-François Natalid30b0222014-05-08 23:08:51 +010010200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10201$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10202
10203# Check whether --with-address_sanitizer was given.
10204if test "${with_address_sanitizer+set}" = set; then :
10205 withval=$with_address_sanitizer;
10206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10207$as_echo "$withval" >&6; }
10208BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10209LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010210# ASan works by controlling memory allocation, our own malloc interferes.
10211with_pymalloc="no"
10212
10213else
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
10216fi
10217
10218
10219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10220$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10221
10222# Check whether --with-memory_sanitizer was given.
10223if test "${with_memory_sanitizer+set}" = set; then :
10224 withval=$with_memory_sanitizer;
10225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10226$as_echo "$withval" >&6; }
10227BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10228LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10229# MSan works by controlling memory allocation, our own malloc interferes.
10230with_pymalloc="no"
10231
10232else
10233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10234$as_echo "no" >&6; }
10235fi
10236
10237
10238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10239$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10240
10241# Check whether --with-undefined_behavior_sanitizer was given.
10242if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10243 withval=$with_undefined_behavior_sanitizer;
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10245$as_echo "$withval" >&6; }
10246BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10247LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010248
10249else
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251$as_echo "no" >&6; }
10252fi
10253
10254
Guido van Rossum70c7f481998-03-26 18:44:10 +000010255# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10257$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010258if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010260else
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010262LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010264/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010266/* Override any GCC internal prototype to avoid an error.
10267 Use char because int might match the return type of a GCC
10268 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010269#ifdef __cplusplus
10270extern "C"
10271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010272char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010273int
10274main ()
10275{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 ;
10278 return 0;
10279}
10280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010281if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010283else
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010286rm -f core conftest.err conftest.$ac_objext \
10287 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010288LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10291$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010292if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010293 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010294fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010295 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10297$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010298if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010300else
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010302LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306/* Override any GCC internal prototype to avoid an error.
10307 Use char because int might match the return type of a GCC
10308 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010309#ifdef __cplusplus
10310extern "C"
10311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010312char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010313int
10314main ()
10315{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010316return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ;
10318 return 0;
10319}
10320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010323else
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010326rm -f core conftest.err conftest.$ac_objext \
10327 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010328LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10331$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010332if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010333 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010334fi
10335 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010336
Matthias Kloseb9621712010-04-24 17:59:49 +000010337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10338$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010341if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010342 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10344$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010345LIBS="$withval $LIBS"
10346
10347else
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350fi
10351
Guido van Rossum7f43da71994-08-01 12:15:30 +000010352
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010353
10354
10355
10356
10357
10358
Victor Stinnerb477d192020-01-22 22:48:16 +010010359
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010360if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10361 if test -n "$ac_tool_prefix"; then
10362 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10363set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365$as_echo_n "checking for $ac_word... " >&6; }
10366if ${ac_cv_path_PKG_CONFIG+:} false; then :
10367 $as_echo_n "(cached) " >&6
10368else
10369 case $PKG_CONFIG in
10370 [\\/]* | ?:[\\/]*)
10371 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10372 ;;
10373 *)
10374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375for as_dir in $PATH
10376do
10377 IFS=$as_save_IFS
10378 test -z "$as_dir" && as_dir=.
10379 for ac_exec_ext in '' $ac_executable_extensions; do
10380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10381 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383 break 2
10384 fi
10385done
10386 done
10387IFS=$as_save_IFS
10388
10389 ;;
10390esac
10391fi
10392PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10393if test -n "$PKG_CONFIG"; then
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10395$as_echo "$PKG_CONFIG" >&6; }
10396else
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399fi
10400
10401
10402fi
10403if test -z "$ac_cv_path_PKG_CONFIG"; then
10404 ac_pt_PKG_CONFIG=$PKG_CONFIG
10405 # Extract the first word of "pkg-config", so it can be a program name with args.
10406set dummy pkg-config; ac_word=$2
10407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10408$as_echo_n "checking for $ac_word... " >&6; }
10409if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10410 $as_echo_n "(cached) " >&6
10411else
10412 case $ac_pt_PKG_CONFIG in
10413 [\\/]* | ?:[\\/]*)
10414 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10415 ;;
10416 *)
10417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10418for as_dir in $PATH
10419do
10420 IFS=$as_save_IFS
10421 test -z "$as_dir" && as_dir=.
10422 for ac_exec_ext in '' $ac_executable_extensions; do
10423 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10424 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10426 break 2
10427 fi
10428done
10429 done
10430IFS=$as_save_IFS
10431
10432 ;;
10433esac
10434fi
10435ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10436if test -n "$ac_pt_PKG_CONFIG"; then
10437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10438$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10439else
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441$as_echo "no" >&6; }
10442fi
10443
10444 if test "x$ac_pt_PKG_CONFIG" = x; then
10445 PKG_CONFIG=""
10446 else
10447 case $cross_compiling:$ac_tool_warned in
10448yes:)
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10450$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10451ac_tool_warned=yes ;;
10452esac
10453 PKG_CONFIG=$ac_pt_PKG_CONFIG
10454 fi
10455else
10456 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10457fi
10458
10459fi
10460if test -n "$PKG_CONFIG"; then
10461 _pkg_min_version=0.9.0
10462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10463$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10464 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10466$as_echo "yes" >&6; }
10467 else
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10469$as_echo "no" >&6; }
10470 PKG_CONFIG=""
10471 fi
10472fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010473
10474# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10476$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010477
10478# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010479if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010480 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010481else
10482 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010483fi
10484
10485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10487$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010488
10489# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10491$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010492
10493# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010494if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010495 withval=$with_system_ffi;
10496fi
10497
10498
Zachary Waref40d4dd2016-09-17 01:25:24 -050010499if test "$ac_sys_system" = "Darwin"
10500then
10501 case "$with_system_ffi" in
10502 "")
10503 with_system_ffi="no"
10504 ;;
10505 yes|no)
10506 ;;
10507 *)
10508 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10509 ;;
10510 esac
10511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10512$as_echo "$with_system_ffi" >&6; }
10513else
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10515$as_echo "yes" >&6; }
10516 if test "$with_system_ffi" != ""
10517 then
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10519$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10520 fi
10521 with_system_ffi="yes"
10522fi
Zachary Ware935043d2016-09-09 17:01:21 -070010523
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010524if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010525 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10526else
10527 LIBFFI_INCLUDEDIR=""
10528fi
10529
10530
Stefan Krah60187b52012-03-23 19:06:27 +010010531# Check for use of the system libmpdec library
10532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10533$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10534
10535# Check whether --with-system_libmpdec was given.
10536if test "${with_system_libmpdec+set}" = set; then :
10537 withval=$with_system_libmpdec;
10538else
10539 with_system_libmpdec="no"
10540fi
10541
10542
10543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10544$as_echo "$with_system_libmpdec" >&6; }
10545
Stefan Krah815280e2020-02-29 19:43:42 +010010546# Check whether _decimal should use a coroutine-local or thread-local context
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10548$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10549
10550# Check whether --with-decimal_contextvar was given.
10551if test "${with_decimal_contextvar+set}" = set; then :
10552 withval=$with_decimal_contextvar;
10553else
10554 with_decimal_contextvar="yes"
10555fi
10556
10557
10558if test "$with_decimal_contextvar" != "no"
10559then
10560
10561$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10562
10563fi
10564
10565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10566$as_echo "$with_decimal_contextvar" >&6; }
10567
Benjamin Peterson076ed002010-10-31 17:11:02 +000010568# Check for support for loadable sqlite extensions
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10570$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10571# Check whether --enable-loadable-sqlite-extensions was given.
10572if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10573 enableval=$enable_loadable_sqlite_extensions;
10574else
10575 enable_loadable_sqlite_extensions="no"
10576fi
10577
10578
10579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10580$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10581
Ned Deilyd819b932013-09-06 01:07:05 -070010582# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10583
10584
10585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10586$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10587
10588# Check whether --with-tcltk-includes was given.
10589if test "${with_tcltk_includes+set}" = set; then :
10590 withval=$with_tcltk_includes;
10591else
10592 with_tcltk_includes="default"
10593fi
10594
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10596$as_echo "$with_tcltk_includes" >&6; }
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10598$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10599
10600# Check whether --with-tcltk-libs was given.
10601if test "${with_tcltk_libs+set}" = set; then :
10602 withval=$with_tcltk_libs;
10603else
10604 with_tcltk_libs="default"
10605fi
10606
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10608$as_echo "$with_tcltk_libs" >&6; }
10609if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10610then
10611 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10612 then
10613 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10614 fi
10615 TCLTK_INCLUDES=""
10616 TCLTK_LIBS=""
10617else
10618 TCLTK_INCLUDES="$with_tcltk_includes"
10619 TCLTK_LIBS="$with_tcltk_libs"
10620fi
10621
Matthias Klose55708cc2009-04-30 08:06:49 +000010622# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10624$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010625
10626# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010627if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010628 withval=$with_dbmliborder;
10629if test x$with_dbmliborder = xyes
10630then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010631as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010632else
10633 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10634 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10635 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010636 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010637 fi
10638 done
10639fi
10640fi
10641
Matthias Kloseb9621712010-04-24 17:59:49 +000010642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10643$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010644
Martin v. Löwis11437992002-04-12 09:54:03 +000010645# Templates for things AC_DEFINEd more than once.
10646# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010647
10648
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010649if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010650then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010651 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010653
10654 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010655 if test "$ac_sys_system" = "SunOS"; then
10656 CFLAGS="$CFLAGS -D_REENTRANT"
10657 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010658elif test "$ac_cv_kpthread" = "yes"
10659then
10660 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010661 if test "$ac_cv_cxx_thread" = "yes"; then
10662 CXX="$CXX -Kpthread"
10663 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010664 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010665elif test "$ac_cv_kthread" = "yes"
10666then
10667 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010668 if test "$ac_cv_cxx_thread" = "yes"; then
10669 CXX="$CXX -Kthread"
10670 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010671 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010672elif test "$ac_cv_pthread" = "yes"
10673then
10674 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010675 if test "$ac_cv_cxx_thread" = "yes"; then
10676 CXX="$CXX -pthread"
10677 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010678 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010679else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010680 if test ! -z "$withval" -a -d "$withval"
10681 then LDFLAGS="$LDFLAGS -L$withval"
10682 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010683
10684 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010685 # define _POSIX_THREADS in unistd.h. Some apparently don't
10686 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10688$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010691
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010692#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010693#ifdef _POSIX_THREADS
10694yes
10695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010696
10697_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010698if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010700 unistd_defines_pthreads=yes
10701else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010702 unistd_defines_pthreads=no
10703fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010704rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10707$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010710
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010711 # Just looking for pthread_create in libpthread is not enough:
10712 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10713 # So we really have to include pthread.h, and then link.
10714 _libs=$LIBS
10715 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10717$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010719/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010720
10721#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010722#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010723
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010724void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010725int
10726main ()
10727{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010728
10729pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 ;
10731 return 0;
10732}
10733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010734if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010735
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10737$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010738 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010739
Guido van Rossum02a1c402000-02-25 19:26:31 +000010740else
Martin v. Löwis11437992002-04-12 09:54:03 +000010741
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010742 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010744if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010745
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010746 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010747
Guido van Rossumad678af1998-10-02 14:42:15 +000010748else
Guido van Rossumad678af1998-10-02 14:42:15 +000010749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10751$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010752if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010754else
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010756LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760/* Override any GCC internal prototype to avoid an error.
10761 Use char because int might match the return type of a GCC
10762 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010763#ifdef __cplusplus
10764extern "C"
10765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010766char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010767int
10768main ()
10769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010770return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 ;
10772 return 0;
10773}
10774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010776 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010777else
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010780rm -f core conftest.err conftest.$ac_objext \
10781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010782LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10785$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010786if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010787
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010788 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010789 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010790
Greg Steinadf63d62000-07-05 10:38:09 +000010791else
Greg Steinadf63d62000-07-05 10:38:09 +000010792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10794$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010795if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010797else
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010799LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803/* Override any GCC internal prototype to avoid an error.
10804 Use char because int might match the return type of a GCC
10805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010806#ifdef __cplusplus
10807extern "C"
10808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010809char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010810int
10811main ()
10812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 ;
10815 return 0;
10816}
10817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010820else
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010823rm -f core conftest.err conftest.$ac_objext \
10824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10828$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010829if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010830
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010831 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010832 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010833
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010834else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10837$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010838if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010840else
Martin v. Löwis11437992002-04-12 09:54:03 +000010841 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010842LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846/* Override any GCC internal prototype to avoid an error.
10847 Use char because int might match the return type of a GCC
10848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010849#ifdef __cplusplus
10850extern "C"
10851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010852char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010853int
10854main ()
10855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ;
10858 return 0;
10859}
10860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010863else
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010866rm -f core conftest.err conftest.$ac_objext \
10867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010868LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10871$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010872if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010873
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010874 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010875 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010876
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010877else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010878
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10880$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010881if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010882 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010883else
Martin v. Löwis11437992002-04-12 09:54:03 +000010884 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010885LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889/* Override any GCC internal prototype to avoid an error.
10890 Use char because int might match the return type of a GCC
10891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010892#ifdef __cplusplus
10893extern "C"
10894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010895char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010896int
10897main ()
10898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 ;
10901 return 0;
10902}
10903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010904if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010906else
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010909rm -f core conftest.err conftest.$ac_objext \
10910 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010911LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10914$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010915if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010916
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010917 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010918 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010919
Guido van Rossumb93a8621998-05-07 13:27:32 +000010920else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010921
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010922 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10923
Guido van Rossum2d38f911996-06-26 19:47:01 +000010924fi
10925
Guido van Rossum627b2d71993-12-24 10:39:16 +000010926
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010927fi
10928
Guido van Rossum0be3e491997-05-22 20:33:33 +000010929fi
10930
Guido van Rossum49545951997-12-02 19:28:29 +000010931fi
10932
Guido van Rossumb93a8621998-05-07 13:27:32 +000010933fi
10934
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010936rm -f core conftest.err conftest.$ac_objext \
10937 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10940$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010941if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010943else
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010945LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949/* Override any GCC internal prototype to avoid an error.
10950 Use char because int might match the return type of a GCC
10951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010952#ifdef __cplusplus
10953extern "C"
10954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010955char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010956int
10957main ()
10958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ;
10961 return 0;
10962}
10963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010964if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010966else
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010969rm -f core conftest.err conftest.$ac_objext \
10970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010971LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10974$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010975if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010976
Martin v. Löwis130fb172001-07-19 11:00:41 +000010977 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010978
Guido van Rossum627b2d71993-12-24 10:39:16 +000010979fi
10980
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010981
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010982fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010983
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010984if test "$posix_threads" = "yes"; then
10985 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010988
10989 fi
10990
10991 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10992 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010993 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010994$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010995
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010996 ;;
10997 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010998$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010999
11000 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011001 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011002$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011003
11004 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011005 esac
11006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11008$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011009 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011010 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011011else
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011013 ac_cv_pthread_system_supported=no
11014else
Matthias Kloseb9621712010-04-24 17:59:49 +000011015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011016/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011017
11018 #include <stdio.h>
11019 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011020 void *foo(void *parm) {
11021 return NULL;
11022 }
11023 main() {
11024 pthread_attr_t attr;
11025 pthread_t id;
11026 if (pthread_attr_init(&attr)) exit(-1);
11027 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11028 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11029 exit(0);
11030 }
11031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011032if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011033 ac_cv_pthread_system_supported=yes
11034else
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011039fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041
Guido van Rossum627b2d71993-12-24 10:39:16 +000011042fi
11043
Matthias Kloseb9621712010-04-24 17:59:49 +000011044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11045$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011046 if test "$ac_cv_pthread_system_supported" = "yes"; then
11047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011049
11050 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 for ac_func in pthread_sigmask
11052do :
11053 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011054if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011055 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011056#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011057_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011058 case $ac_sys_system in
11059 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011062
11063 ;;
11064 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011065fi
11066done
11067
pdoxe14679c2017-10-05 00:01:56 -070011068 for ac_func in pthread_getcpuclockid
11069do :
11070 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11071if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11072 cat >>confdefs.h <<_ACEOF
11073#define HAVE_PTHREAD_GETCPUCLOCKID 1
11074_ACEOF
11075
11076fi
11077done
11078
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011079fi
11080
11081
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011082# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011083
Matthias Kloseb9621712010-04-24 17:59:49 +000011084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11085$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011087if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011089 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11091$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092 ipv6=no
11093 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011094 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11095$as_echo "yes" >&6; }
11096 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097
11098 ipv6=yes
11099 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101else
Martin v. Löwis11437992002-04-12 09:54:03 +000011102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011104/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105 /* AF_INET6 available check */
11106#include <sys/types.h>
11107#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011108int
11109main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011111int domain = AF_INET6;
11112 ;
11113 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114}
Martin v. Löwis11437992002-04-12 09:54:03 +000011115_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011116if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011117
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11119$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011121
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011122else
Matthias Kloseb159a552010-04-25 21:00:44 +000011123
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11125$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011127
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011131if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11133$as_echo_n "checking if RFC2553 API is available... " >&6; }
11134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011135/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011136
11137 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011138#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011139int
11140main ()
11141{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011142struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011143 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 ;
11145 return 0;
11146}
Matthias Kloseb159a552010-04-25 21:00:44 +000011147
Martin v. Löwis11437992002-04-12 09:54:03 +000011148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011149if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011150
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011152$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011153 ipv6=yes
11154
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011155else
Matthias Kloseb159a552010-04-25 21:00:44 +000011156
11157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011158$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011159 ipv6=no
11160
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011163fi
11164
11165if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011167
11168fi
11169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170fi
11171
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011172
11173ipv6type=unknown
11174ipv6lib=none
11175ipv6trylibc=no
11176
11177if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11179$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011180 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11181 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011182 case $i in
11183 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011185/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011186
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011187#include <netinet/in.h>
11188#ifdef IPV6_INRIA_VERSION
11189yes
11190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011191_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011192if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011193 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011194 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011195fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011196rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011197
11198 ;;
11199 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011201/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011202
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011203#include <netinet/in.h>
11204#ifdef __KAME__
11205yes
11206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011207_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011208if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011210 ipv6type=$i;
11211 ipv6lib=inet6
11212 ipv6libdir=/usr/local/v6/lib
11213 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011214fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011215rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011216
11217 ;;
11218 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011221
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011222#include <features.h>
11223#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11224yes
11225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011226_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011228 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011229 ipv6type=$i;
11230 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011231fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011232rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011233
11234 ;;
11235 linux-inet6)
11236 if test -d /usr/inet6; then
11237 ipv6type=$i
11238 ipv6lib=inet6
11239 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011240 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011241 fi
11242 ;;
11243 solaris)
11244 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011245 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011246 ipv6type=$i
11247 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011248 fi
11249 fi
11250 ;;
11251 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011253/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011254
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011255#include <sys/param.h>
11256#ifdef _TOSHIBA_INET6
11257yes
11258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011259_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011261 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011262 ipv6type=$i;
11263 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011264 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011265fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011266rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011267
11268 ;;
11269 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011271/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011272
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011273#include </usr/local/v6/include/sys/v6config.h>
11274#ifdef __V6D__
11275yes
11276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011277_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011280 ipv6type=$i;
11281 ipv6lib=v6;
11282 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011283 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011284fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011285rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011286
11287 ;;
11288 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011290/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011291
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011292#include <sys/param.h>
11293#ifdef _ZETA_MINAMI_INET6
11294yes
11295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011296_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011299 ipv6type=$i;
11300 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011301 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011302fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011303rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304
11305 ;;
11306 esac
11307 if test "$ipv6type" != "unknown"; then
11308 break
11309 fi
11310 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11312$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011313fi
11314
11315if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11316 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11317 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11318 echo "using lib$ipv6lib"
11319 else
11320 if test $ipv6trylibc = "yes"; then
11321 echo "using libc"
11322 else
11323 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11324 echo "You need to fetch lib$ipv6lib.a from appropriate"
11325 echo 'ipv6 kit and compile beforehand.'
11326 exit 1
11327 fi
11328 fi
11329fi
11330
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11332$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11334/* end confdefs.h. */
11335 /* CAN_RAW_FD_FRAMES available check */
11336#include <linux/can/raw.h>
11337int
11338main ()
11339{
11340int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11341 ;
11342 return 0;
11343}
11344_ACEOF
11345if ac_fn_c_try_compile "$LINENO"; then :
11346
11347
11348$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11349
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11351$as_echo "yes" >&6; }
11352
11353else
11354
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356$as_echo "no" >&6; }
11357
11358fi
11359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11360
Zackery Spytz97e0de02020-04-09 06:03:49 -060011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11362$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11364/* end confdefs.h. */
11365
11366#include <linux/can/raw.h>
11367int
11368main ()
11369{
11370int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11371 ;
11372 return 0;
11373}
11374_ACEOF
11375if ac_fn_c_try_compile "$LINENO"; then :
11376
11377
11378$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11379
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11381$as_echo "yes" >&6; }
11382
11383else
11384
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
11387
11388fi
11389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11390
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011391# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11393$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011396if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397 withval=$with_doc_strings;
11398fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011399
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011400
11401if test -z "$with_doc_strings"
11402then with_doc_strings="yes"
11403fi
11404if test "$with_doc_strings" != "no"
11405then
11406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011408
11409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11411$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011412
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011413# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11415$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011417# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011418if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011419 withval=$with_pymalloc;
11420fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011421
Neil Schemenauera35c6882001-02-27 04:45:05 +000011422
Neil Schemenauer16c22972002-03-22 15:34:49 +000011423if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011424then
11425 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011426fi
11427if test "$with_pymalloc" != "no"
11428then
Martin v. Löwis11437992002-04-12 09:54:03 +000011429
Matthias Kloseb9621712010-04-24 17:59:49 +000011430$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011431
11432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11434$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011435
Nick Coghlan6ea41862017-06-11 13:16:15 +100011436# Check for --with-c-locale-coercion
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11438$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11439
11440# Check whether --with-c-locale-coercion was given.
11441if test "${with_c_locale_coercion+set}" = set; then :
11442 withval=$with_c_locale_coercion;
11443fi
11444
11445
11446if test -z "$with_c_locale_coercion"
11447then
11448 with_c_locale_coercion="yes"
11449fi
11450if test "$with_c_locale_coercion" != "no"
11451then
11452
11453$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11454
11455fi
11456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11457$as_echo "$with_c_locale_coercion" >&6; }
11458
Benjamin Peterson05159c42009-12-03 03:01:27 +000011459# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11461$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011462
11463# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011464if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011465 withval=$with_valgrind;
11466else
11467 with_valgrind=no
11468fi
11469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11471$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011472if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 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 +020011474if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011475
Matthias Kloseb9621712010-04-24 17:59:49 +000011476$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011477
11478else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011479 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011480
11481fi
11482
11483
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011484 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011485fi
11486
Łukasz Langaa785c872016-09-09 17:37:37 -070011487# Check for DTrace support
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11489$as_echo_n "checking for --with-dtrace... " >&6; }
11490
11491# Check whether --with-dtrace was given.
11492if test "${with_dtrace+set}" = set; then :
11493 withval=$with_dtrace;
11494else
11495 with_dtrace=no
11496fi
11497
11498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11499$as_echo "$with_dtrace" >&6; }
11500
11501
11502
11503
11504
11505DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011506DTRACE_HEADERS=
11507DTRACE_OBJS=
11508
11509if test "$with_dtrace" = "yes"
11510then
11511 # Extract the first word of "dtrace", so it can be a program name with args.
11512set dummy dtrace; ac_word=$2
11513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11514$as_echo_n "checking for $ac_word... " >&6; }
11515if ${ac_cv_path_DTRACE+:} false; then :
11516 $as_echo_n "(cached) " >&6
11517else
11518 case $DTRACE in
11519 [\\/]* | ?:[\\/]*)
11520 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11521 ;;
11522 *)
11523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11524for as_dir in $PATH
11525do
11526 IFS=$as_save_IFS
11527 test -z "$as_dir" && as_dir=.
11528 for ac_exec_ext in '' $ac_executable_extensions; do
11529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11530 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11532 break 2
11533 fi
11534done
11535 done
11536IFS=$as_save_IFS
11537
11538 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11539 ;;
11540esac
11541fi
11542DTRACE=$ac_cv_path_DTRACE
11543if test -n "$DTRACE"; then
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11545$as_echo "$DTRACE" >&6; }
11546else
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11548$as_echo "no" >&6; }
11549fi
11550
11551
11552 if test "$DTRACE" = "not found"; then
11553 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11554 fi
11555
11556$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11557
11558 DTRACE_HEADERS="Include/pydtrace_probes.h"
11559
11560 # On OS X, DTrace providers do not need to be explicitly compiled and
11561 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11562 # generation flag '-G'. We check for presence of this flag, rather than
11563 # hardcoding support by OS, in the interest of robustness.
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11565$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11566if ${ac_cv_dtrace_link+:} false; then :
11567 $as_echo_n "(cached) " >&6
11568else
11569 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011570 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011571 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011572 ac_cv_dtrace_link=yes
11573
11574fi
11575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11576$as_echo "$ac_cv_dtrace_link" >&6; }
11577 if test "$ac_cv_dtrace_link" = "yes"; then
11578 DTRACE_OBJS="Python/pydtrace.o"
11579 fi
11580fi
11581
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011582# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011583
Guido van Rossum98935bf2001-09-05 19:13:16 +000011584DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011585
Guido van Rossume97ee181999-12-20 21:27:22 +000011586# the dlopen() function means we might want to use dynload_shlib.o. some
11587# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011588for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011589do :
11590 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011591if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011593#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011594_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011595
Guido van Rossume97ee181999-12-20 21:27:22 +000011596fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011597done
Guido van Rossume97ee181999-12-20 21:27:22 +000011598
Michael W. Hudson54241132001-12-07 15:38:26 +000011599
Guido van Rossume97ee181999-12-20 21:27:22 +000011600# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11601# loading of modules.
11602
Matthias Kloseb9621712010-04-24 17:59:49 +000011603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11604$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011605if test -z "$DYNLOADFILE"
11606then
11607 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011608 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11609 if test "$ac_cv_func_dlopen" = yes
11610 then DYNLOADFILE="dynload_shlib.o"
11611 else DYNLOADFILE="dynload_aix.o"
11612 fi
11613 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011614 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011615 *)
11616 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11617 # out any dynamic loading
11618 if test "$ac_cv_func_dlopen" = yes
11619 then DYNLOADFILE="dynload_shlib.o"
11620 else DYNLOADFILE="dynload_stub.o"
11621 fi
11622 ;;
11623 esac
11624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11626$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011627if test "$DYNLOADFILE" != "dynload_stub.o"
11628then
Martin v. Löwis11437992002-04-12 09:54:03 +000011629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011631
11632fi
11633
Neil Schemenauer4e425612001-06-19 15:44:15 +000011634# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11635
Michael W. Hudson54241132001-12-07 15:38:26 +000011636
Matthias Kloseb9621712010-04-24 17:59:49 +000011637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11638$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011639if test -z "$MACHDEP_OBJS"
11640then
Jack Jansene578a632001-08-15 01:27:14 +000011641 MACHDEP_OBJS=$extra_machdep_objs
11642else
11643 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011644fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011645if test -z "$MACHDEP_OBJS"; then
11646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11647$as_echo "none" >&6; }
11648else
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11650$as_echo "$MACHDEP_OBJS" >&6; }
11651fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011652
Guido van Rossum627b2d71993-12-24 10:39:16 +000011653# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011654for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011655 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11656 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011657 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011658 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011659 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011660 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011661 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011662 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011663 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011664 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011665 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011666 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011667 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011668 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011669 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011670 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011671 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011672 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11673 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011674 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011675 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011676 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011677 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011678 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011679do :
11680 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11681ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011682if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011683 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011684#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011685_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011686
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011687fi
11688done
11689
Michael W. Hudson54241132001-12-07 15:38:26 +000011690
Benjamin Peterson40caa052018-09-12 15:52:40 -070011691# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11692# links. Some libc implementations have a stub lchmod implementation that always
11693# returns an error.
11694if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011695 for ac_func in lchmod
11696do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011697 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11698if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011699 cat >>confdefs.h <<_ACEOF
11700#define HAVE_LCHMOD 1
11701_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011702
11703fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011704done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011705
11706fi
11707
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011708ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11709 #include <dirent.h>
11710"
11711if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11712
11713$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11714
11715fi
11716
11717
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011718# For some functions, having a definition is not sufficient, since
11719# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11721$as_echo_n "checking for chroot... " >&6; }
11722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011723/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011724#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011725int
11726main ()
11727{
11728void *x=chroot
11729 ;
11730 return 0;
11731}
11732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011733if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011734
Matthias Kloseb9621712010-04-24 17:59:49 +000011735$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011736
Matthias Kloseb159a552010-04-25 21:00:44 +000011737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011738$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011739else
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11741$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011742
11743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11746$as_echo_n "checking for link... " >&6; }
11747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011748/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011749#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011750int
11751main ()
11752{
11753void *x=link
11754 ;
11755 return 0;
11756}
11757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011758if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011759
Matthias Kloseb9621712010-04-24 17:59:49 +000011760$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011761
Matthias Kloseb159a552010-04-25 21:00:44 +000011762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011764else
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11766$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011767
11768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11771$as_echo_n "checking for symlink... " >&6; }
11772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011773/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011774#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011775int
11776main ()
11777{
11778void *x=symlink
11779 ;
11780 return 0;
11781}
11782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011783if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011784
Matthias Kloseb9621712010-04-24 17:59:49 +000011785$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011786
Matthias Kloseb159a552010-04-25 21:00:44 +000011787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011788$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11791$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011792
11793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11796$as_echo_n "checking for fchdir... " >&6; }
11797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011798/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011799#include <unistd.h>
11800int
11801main ()
11802{
11803void *x=fchdir
11804 ;
11805 return 0;
11806}
11807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011808if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011809
Matthias Kloseb9621712010-04-24 17:59:49 +000011810$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011811
Matthias Kloseb159a552010-04-25 21:00:44 +000011812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011813$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11816$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011817
11818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11821$as_echo_n "checking for fsync... " >&6; }
11822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011823/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011824#include <unistd.h>
11825int
11826main ()
11827{
11828void *x=fsync
11829 ;
11830 return 0;
11831}
11832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011834
Matthias Kloseb9621712010-04-24 17:59:49 +000011835$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011836
Matthias Kloseb159a552010-04-25 21:00:44 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011838$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011839else
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11841$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011842
11843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11846$as_echo_n "checking for fdatasync... " >&6; }
11847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011848/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011849#include <unistd.h>
11850int
11851main ()
11852{
11853void *x=fdatasync
11854 ;
11855 return 0;
11856}
11857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011858if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011861
Matthias Kloseb159a552010-04-25 21:00:44 +000011862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011863$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011864else
Matthias Kloseb9621712010-04-24 17:59:49 +000011865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11866$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011867
11868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11871$as_echo_n "checking for epoll... " >&6; }
11872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011873/* end confdefs.h. */
11874#include <sys/epoll.h>
11875int
11876main ()
11877{
11878void *x=epoll_create
11879 ;
11880 return 0;
11881}
11882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011886
Matthias Kloseb159a552010-04-25 21:00:44 +000011887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011888$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011889else
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11891$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011892
11893fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11896$as_echo_n "checking for epoll_create1... " >&6; }
11897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11898/* end confdefs.h. */
11899#include <sys/epoll.h>
11900int
11901main ()
11902{
11903void *x=epoll_create1
11904 ;
11905 return 0;
11906}
11907_ACEOF
11908if ac_fn_c_try_compile "$LINENO"; then :
11909
11910$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11911
11912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11913$as_echo "yes" >&6; }
11914else
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11916$as_echo "no" >&6; }
11917
11918fi
11919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11921$as_echo_n "checking for kqueue... " >&6; }
11922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011923/* end confdefs.h. */
11924
11925#include <sys/types.h>
11926#include <sys/event.h>
11927
11928int
11929main ()
11930{
11931int x=kqueue()
11932 ;
11933 return 0;
11934}
11935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011936if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011937
Matthias Kloseb9621712010-04-24 17:59:49 +000011938$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011939
Matthias Kloseb159a552010-04-25 21:00:44 +000011940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011941$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011942else
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11944$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011945
11946fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11949$as_echo_n "checking for prlimit... " >&6; }
11950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11951/* end confdefs.h. */
11952
11953#include <sys/time.h>
11954#include <sys/resource.h>
11955
11956int
11957main ()
11958{
11959void *x=prlimit
11960 ;
11961 return 0;
11962}
11963_ACEOF
11964if ac_fn_c_try_compile "$LINENO"; then :
11965
11966$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11967
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11969$as_echo "yes" >&6; }
11970else
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972$as_echo "no" >&6; }
11973
11974fi
11975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11976
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11978$as_echo_n "checking for memfd_create... " >&6; }
11979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11980/* end confdefs.h. */
11981
11982#ifdef HAVE_SYS_MMAN_H
11983#include <sys/mman.h>
11984#endif
11985#ifdef HAVE_SYS_MEMFD_H
11986#include <sys/memfd.h>
11987#endif
11988
11989int
11990main ()
11991{
11992void *x=memfd_create
11993 ;
11994 return 0;
11995}
11996_ACEOF
11997if ac_fn_c_try_compile "$LINENO"; then :
11998
11999$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12000
12001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12002$as_echo "yes" >&6; }
12003else
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12005$as_echo "no" >&6; }
12006
12007fi
12008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12009
Martin v. Löwisd5843682002-11-21 20:41:28 +000012010# On some systems (eg. FreeBSD 5), we would find a definition of the
12011# functions ctermid_r, setgroups in the library, but no prototype
12012# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12013# address to avoid compiler warnings and potential miscompilations
12014# because of the missing prototypes.
12015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12017$as_echo_n "checking for ctermid_r... " >&6; }
12018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012020
Martin v. Löwisd5843682002-11-21 20:41:28 +000012021#include <stdio.h>
12022
Martin v. Löwisd5843682002-11-21 20:41:28 +000012023int
12024main ()
12025{
12026void* p = ctermid_r
12027 ;
12028 return 0;
12029}
12030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012034
Matthias Kloseb159a552010-04-25 21:00:44 +000012035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012036$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012037else
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12039$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012040
12041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12043
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12045$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012046if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012047 $as_echo_n "(cached) " >&6
12048else
12049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012050/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012051#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012052int
12053main ()
12054{
12055void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012056
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012057 ;
12058 return 0;
12059}
12060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012061if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012062 ac_cv_flock_decl=yes
12063else
12064 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012065
12066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012068
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012069fi
12070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12071$as_echo "$ac_cv_flock_decl" >&6; }
12072if test "x${ac_cv_flock_decl}" = xyes; then
12073 for ac_func in flock
12074do :
12075 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012076if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012077 cat >>confdefs.h <<_ACEOF
12078#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012079_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012080
Antoine Pitroua3000072010-09-07 14:52:42 +000012081else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012083$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012084if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012085 $as_echo_n "(cached) " >&6
12086else
12087 ac_check_lib_save_LIBS=$LIBS
12088LIBS="-lbsd $LIBS"
12089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12090/* end confdefs.h. */
12091
12092/* Override any GCC internal prototype to avoid an error.
12093 Use char because int might match the return type of a GCC
12094 builtin and then its argument prototype would still apply. */
12095#ifdef __cplusplus
12096extern "C"
12097#endif
12098char flock ();
12099int
12100main ()
12101{
12102return flock ();
12103 ;
12104 return 0;
12105}
12106_ACEOF
12107if ac_fn_c_try_link "$LINENO"; then :
12108 ac_cv_lib_bsd_flock=yes
12109else
12110 ac_cv_lib_bsd_flock=no
12111fi
12112rm -f core conftest.err conftest.$ac_objext \
12113 conftest$ac_exeext conftest.$ac_ext
12114LIBS=$ac_check_lib_save_LIBS
12115fi
12116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12117$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012118if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012119 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012120
12121
12122$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12123
12124
12125fi
12126
12127
12128fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012129done
12130
Antoine Pitroua3000072010-09-07 14:52:42 +000012131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012132
Matthias Kloseb9621712010-04-24 17:59:49 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12134$as_echo_n "checking for getpagesize... " >&6; }
12135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012136/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012137
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012138#include <unistd.h>
12139
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012140int
12141main ()
12142{
12143void* p = getpagesize
12144 ;
12145 return 0;
12146}
12147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012148if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012149
Matthias Kloseb9621712010-04-24 17:59:49 +000012150$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012151
Matthias Kloseb159a552010-04-25 21:00:44 +000012152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012153$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012154else
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12156$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012157
12158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012160
Victor Stinner984890f2011-11-24 13:53:38 +010012161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12162$as_echo_n "checking for broken unsetenv... " >&6; }
12163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12164/* end confdefs.h. */
12165
12166#include <stdlib.h>
12167
12168int
12169main ()
12170{
12171int res = unsetenv("DUMMY")
12172 ;
12173 return 0;
12174}
12175_ACEOF
12176if ac_fn_c_try_compile "$LINENO"; then :
12177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12178$as_echo "no" >&6; }
12179else
12180
12181$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12182
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12184$as_echo "yes" >&6; }
12185
12186fi
12187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12188
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012189for ac_prog in true
12190do
12191 # Extract the first word of "$ac_prog", so it can be a program name with args.
12192set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12194$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012195if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012197else
12198 if test -n "$TRUE"; then
12199 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12200else
12201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12202for as_dir in $PATH
12203do
12204 IFS=$as_save_IFS
12205 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012207 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012208 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 $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 +000012210 break 2
12211 fi
12212done
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012215
12216fi
12217fi
12218TRUE=$ac_cv_prog_TRUE
12219if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12221$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12224$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012225fi
12226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012228 test -n "$TRUE" && break
12229done
12230test -n "$TRUE" || TRUE="/bin/true"
12231
12232
Matthias Kloseb9621712010-04-24 17:59:49 +000012233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12234$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012235if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012237else
12238 ac_check_lib_save_LIBS=$LIBS
12239LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012241/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243/* Override any GCC internal prototype to avoid an error.
12244 Use char because int might match the return type of a GCC
12245 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012246#ifdef __cplusplus
12247extern "C"
12248#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012249char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012250int
12251main ()
12252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012254 ;
12255 return 0;
12256}
12257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012258if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012259 ac_cv_lib_c_inet_aton=yes
12260else
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012263rm -f core conftest.err conftest.$ac_objext \
12264 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012265LIBS=$ac_check_lib_save_LIBS
12266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12268$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012269if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012270 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012271else
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12273$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012274if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012276else
12277 ac_check_lib_save_LIBS=$LIBS
12278LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012280/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012282/* Override any GCC internal prototype to avoid an error.
12283 Use char because int might match the return type of a GCC
12284 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012285#ifdef __cplusplus
12286extern "C"
12287#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012288char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012289int
12290main ()
12291{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012293 ;
12294 return 0;
12295}
12296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012297if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012298 ac_cv_lib_resolv_inet_aton=yes
12299else
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012302rm -f core conftest.err conftest.$ac_objext \
12303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012304LIBS=$ac_check_lib_save_LIBS
12305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12307$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012308if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012309 cat >>confdefs.h <<_ACEOF
12310#define HAVE_LIBRESOLV 1
12311_ACEOF
12312
12313 LIBS="-lresolv $LIBS"
12314
12315fi
12316
12317
12318fi
12319
12320
Christian Heimesd0764e22007-12-04 15:00:33 +000012321# On Tru64, chflags seems to be present, but calling it will
12322# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12324$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012325if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012327else
Matthias Kloseb9621712010-04-24 17:59:49 +000012328 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012329 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012332/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012333
Christian Heimesd0764e22007-12-04 15:00:33 +000012334#include <sys/stat.h>
12335#include <unistd.h>
12336int main(int argc, char*argv[])
12337{
12338 if(chflags(argv[0], 0) != 0)
12339 return 1;
12340 return 0;
12341}
Ned Deily3eb67d52011-06-28 00:00:28 -070012342
Christian Heimesd0764e22007-12-04 15:00:33 +000012343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012344if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012345 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012346else
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12350 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012351fi
12352
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012353
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12356$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012357if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012359if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012360 ac_cv_have_chflags="yes"
12361else
12362 ac_cv_have_chflags="no"
12363fi
12364
12365fi
12366if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012369
12370fi
12371
Matthias Kloseb9621712010-04-24 17:59:49 +000012372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12373$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012374if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012376else
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012378 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012381/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012382
Christian Heimesd0764e22007-12-04 15:00:33 +000012383#include <sys/stat.h>
12384#include <unistd.h>
12385int main(int argc, char*argv[])
12386{
12387 if(lchflags(argv[0], 0) != 0)
12388 return 1;
12389 return 0;
12390}
Ned Deily3eb67d52011-06-28 00:00:28 -070012391
Christian Heimesd0764e22007-12-04 15:00:33 +000012392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012394 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012395else
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12399 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012400fi
12401
12402
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12405$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012406if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012408if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012409 ac_cv_have_lchflags="yes"
12410else
12411 ac_cv_have_lchflags="no"
12412fi
12413
12414fi
12415if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012416
Matthias Kloseb9621712010-04-24 17:59:49 +000012417$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012418
12419fi
12420
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012421case $ac_sys_system/$ac_sys_release in
12422Darwin/*)
12423 _CUR_CFLAGS="${CFLAGS}"
12424 _CUR_LDFLAGS="${LDFLAGS}"
12425 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12426 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12427 ;;
12428esac
12429
Matthias Kloseb9621712010-04-24 17:59:49 +000012430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12431$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012432if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012434else
12435 ac_check_lib_save_LIBS=$LIBS
12436LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012438/* end confdefs.h. */
12439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440/* Override any GCC internal prototype to avoid an error.
12441 Use char because int might match the return type of a GCC
12442 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012443#ifdef __cplusplus
12444extern "C"
12445#endif
12446char inflateCopy ();
12447int
12448main ()
12449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012450return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012451 ;
12452 return 0;
12453}
12454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012455if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012456 ac_cv_lib_z_inflateCopy=yes
12457else
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012460rm -f core conftest.err conftest.$ac_objext \
12461 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012462LIBS=$ac_check_lib_save_LIBS
12463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12465$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012466if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012467
Matthias Kloseb9621712010-04-24 17:59:49 +000012468$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012469
12470fi
12471
12472
12473case $ac_sys_system/$ac_sys_release in
12474Darwin/*)
12475 CFLAGS="${_CUR_CFLAGS}"
12476 LDFLAGS="${_CUR_LDFLAGS}"
12477 ;;
12478esac
12479
Matthias Kloseb9621712010-04-24 17:59:49 +000012480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12481$as_echo_n "checking for hstrerror... " >&6; }
12482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012483/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012484
Martin v. Löwise9416172003-05-03 10:12:45 +000012485#include <netdb.h>
12486
Martin v. Löwise9416172003-05-03 10:12:45 +000012487int
12488main ()
12489{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012490void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012491 ;
12492 return 0;
12493}
12494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012495if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012496
Matthias Kloseb9621712010-04-24 17:59:49 +000012497$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012498
Matthias Kloseb159a552010-04-25 21:00:44 +000012499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012500$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012501else
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12503$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012504
12505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012506rm -f core conftest.err conftest.$ac_objext \
12507 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508
Matthias Kloseb9621712010-04-24 17:59:49 +000012509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12510$as_echo_n "checking for inet_aton... " >&6; }
12511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012512/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012513
Martin v. Löwis86d66262006-02-17 08:40:11 +000012514#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012515#include <sys/socket.h>
12516#include <netinet/in.h>
12517#include <arpa/inet.h>
12518
Martin v. Löwise9416172003-05-03 10:12:45 +000012519int
12520main ()
12521{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012522void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012523 ;
12524 return 0;
12525}
12526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012528
Matthias Kloseb9621712010-04-24 17:59:49 +000012529$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012530
Matthias Kloseb159a552010-04-25 21:00:44 +000012531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012532$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12535$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012536
12537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012538rm -f core conftest.err conftest.$ac_objext \
12539 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540
Matthias Kloseb9621712010-04-24 17:59:49 +000012541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12542$as_echo_n "checking for inet_pton... " >&6; }
12543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012544/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012545
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012546#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012547#include <sys/socket.h>
12548#include <netinet/in.h>
12549#include <arpa/inet.h>
12550
Martin v. Löwise9416172003-05-03 10:12:45 +000012551int
12552main ()
12553{
12554void* p = inet_pton
12555 ;
12556 return 0;
12557}
12558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012560
Matthias Kloseb9621712010-04-24 17:59:49 +000012561$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012562
Matthias Kloseb159a552010-04-25 21:00:44 +000012563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012564$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012565else
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12567$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012568
12569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012571
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012572# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12574$as_echo_n "checking for setgroups... " >&6; }
12575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012576/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012577
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012578#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012579#ifdef HAVE_GRP_H
12580#include <grp.h>
12581#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012582
Martin v. Löwisd5843682002-11-21 20:41:28 +000012583int
12584main ()
12585{
12586void* p = setgroups
12587 ;
12588 return 0;
12589}
12590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012592
Matthias Kloseb9621712010-04-24 17:59:49 +000012593$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012594
Matthias Kloseb159a552010-04-25 21:00:44 +000012595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012596$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012597else
Matthias Kloseb9621712010-04-24 17:59:49 +000012598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12599$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012600
12601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012603
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012604# check for openpty and forkpty
12605
12606for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012607do :
12608 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012609if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012611#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012612_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012613
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012614else
Matthias Kloseb9621712010-04-24 17:59:49 +000012615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12616$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012617if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012618 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012619else
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012621LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012625/* Override any GCC internal prototype to avoid an error.
12626 Use char because int might match the return type of a GCC
12627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012628#ifdef __cplusplus
12629extern "C"
12630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012631char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012632int
12633main ()
12634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ;
12637 return 0;
12638}
12639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012640if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012642else
Matthias Kloseb9621712010-04-24 17:59:49 +000012643 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012645rm -f core conftest.err conftest.$ac_objext \
12646 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012647LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12650$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012651if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012652 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012653 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012654else
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12656$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012657if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012659else
12660 ac_check_lib_save_LIBS=$LIBS
12661LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012663/* end confdefs.h. */
12664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665/* Override any GCC internal prototype to avoid an error.
12666 Use char because int might match the return type of a GCC
12667 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012668#ifdef __cplusplus
12669extern "C"
12670#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012671char openpty ();
12672int
12673main ()
12674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012676 ;
12677 return 0;
12678}
12679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012680if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012681 ac_cv_lib_bsd_openpty=yes
12682else
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012685rm -f core conftest.err conftest.$ac_objext \
12686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012687LIBS=$ac_check_lib_save_LIBS
12688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12690$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012691if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012693 LIBS="$LIBS -lbsd"
12694fi
12695
12696
12697fi
12698
Fred Drake8cef4cf2000-06-28 16:40:38 +000012699
12700fi
12701done
12702
12703for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012704do :
12705 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012706if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012708#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012709_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012710
Fred Drake8cef4cf2000-06-28 16:40:38 +000012711else
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12713$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012714if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012715 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012716else
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012718LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722/* Override any GCC internal prototype to avoid an error.
12723 Use char because int might match the return type of a GCC
12724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012725#ifdef __cplusplus
12726extern "C"
12727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012728char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012729int
12730main ()
12731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012732return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012733 ;
12734 return 0;
12735}
12736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012737if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012739else
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012742rm -f core conftest.err conftest.$ac_objext \
12743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012744LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12747$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012748if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012750 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012751else
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12753$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012754if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012756else
12757 ac_check_lib_save_LIBS=$LIBS
12758LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012760/* end confdefs.h. */
12761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762/* Override any GCC internal prototype to avoid an error.
12763 Use char because int might match the return type of a GCC
12764 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012765#ifdef __cplusplus
12766extern "C"
12767#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012768char forkpty ();
12769int
12770main ()
12771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012773 ;
12774 return 0;
12775}
12776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012778 ac_cv_lib_bsd_forkpty=yes
12779else
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012782rm -f core conftest.err conftest.$ac_objext \
12783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012784LIBS=$ac_check_lib_save_LIBS
12785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12787$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012788if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012790 LIBS="$LIBS -lbsd"
12791fi
12792
12793
12794fi
12795
Fred Drake8cef4cf2000-06-28 16:40:38 +000012796
12797fi
12798done
12799
Jack Jansendd19cf82001-12-06 22:36:17 +000012800
Michael W. Hudson54241132001-12-07 15:38:26 +000012801# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012802for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012803do :
12804 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12805ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012806if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012808#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012809_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012810
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012812done
12813
Michael W. Hudson54241132001-12-07 15:38:26 +000012814
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012815ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012816if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012817 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012818
Martin v. Löwis1142de32002-03-29 16:28:31 +000012819else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012821 *" dup2.$ac_objext "* ) ;;
12822 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012824esac
12825
Martin v. Löwis1142de32002-03-29 16:28:31 +000012826fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012827
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012828ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012829if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012830 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12831
12832else
12833 case " $LIBOBJS " in
12834 *" strdup.$ac_objext "* ) ;;
12835 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12836 ;;
12837esac
12838
12839fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012840
12841
12842for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012843do :
12844 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012845if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012847#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012850/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012851#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012852int
12853main ()
12854{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012855getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 ;
12857 return 0;
12858}
12859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012860if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012863
Guido van Rossum627b2d71993-12-24 10:39:16 +000012864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012866
Guido van Rossum627b2d71993-12-24 10:39:16 +000012867fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012868done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012869
Jack Jansen150753c2003-03-29 22:07:47 +000012870for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012871do :
12872 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012873if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012874 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012875#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012878/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012879#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012880int
12881main ()
12882{
12883setpgrp(0,0);
12884 ;
12885 return 0;
12886}
12887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012888if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012891
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012894
12895fi
12896done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012897
Michael W. Hudson54241132001-12-07 15:38:26 +000012898
Gregory P. Smith387512c2018-12-30 15:42:32 -080012899# We search for both crypt and crypt_r as one or the other may be defined
12900# This gets us our -lcrypt in LIBS when required on the target platform.
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12902$as_echo_n "checking for library containing crypt... " >&6; }
12903if ${ac_cv_search_crypt+:} false; then :
12904 $as_echo_n "(cached) " >&6
12905else
12906 ac_func_search_save_LIBS=$LIBS
12907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12908/* end confdefs.h. */
12909
12910/* Override any GCC internal prototype to avoid an error.
12911 Use char because int might match the return type of a GCC
12912 builtin and then its argument prototype would still apply. */
12913#ifdef __cplusplus
12914extern "C"
12915#endif
12916char crypt ();
12917int
12918main ()
12919{
12920return crypt ();
12921 ;
12922 return 0;
12923}
12924_ACEOF
12925for ac_lib in '' crypt; do
12926 if test -z "$ac_lib"; then
12927 ac_res="none required"
12928 else
12929 ac_res=-l$ac_lib
12930 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12931 fi
12932 if ac_fn_c_try_link "$LINENO"; then :
12933 ac_cv_search_crypt=$ac_res
12934fi
12935rm -f core conftest.err conftest.$ac_objext \
12936 conftest$ac_exeext
12937 if ${ac_cv_search_crypt+:} false; then :
12938 break
12939fi
12940done
12941if ${ac_cv_search_crypt+:} false; then :
12942
12943else
12944 ac_cv_search_crypt=no
12945fi
12946rm conftest.$ac_ext
12947LIBS=$ac_func_search_save_LIBS
12948fi
12949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12950$as_echo "$ac_cv_search_crypt" >&6; }
12951ac_res=$ac_cv_search_crypt
12952if test "$ac_res" != no; then :
12953 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12954
12955fi
12956
12957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12958$as_echo_n "checking for library containing crypt_r... " >&6; }
12959if ${ac_cv_search_crypt_r+:} false; then :
12960 $as_echo_n "(cached) " >&6
12961else
12962 ac_func_search_save_LIBS=$LIBS
12963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12964/* end confdefs.h. */
12965
12966/* Override any GCC internal prototype to avoid an error.
12967 Use char because int might match the return type of a GCC
12968 builtin and then its argument prototype would still apply. */
12969#ifdef __cplusplus
12970extern "C"
12971#endif
12972char crypt_r ();
12973int
12974main ()
12975{
12976return crypt_r ();
12977 ;
12978 return 0;
12979}
12980_ACEOF
12981for ac_lib in '' crypt; do
12982 if test -z "$ac_lib"; then
12983 ac_res="none required"
12984 else
12985 ac_res=-l$ac_lib
12986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12987 fi
12988 if ac_fn_c_try_link "$LINENO"; then :
12989 ac_cv_search_crypt_r=$ac_res
12990fi
12991rm -f core conftest.err conftest.$ac_objext \
12992 conftest$ac_exeext
12993 if ${ac_cv_search_crypt_r+:} false; then :
12994 break
12995fi
12996done
12997if ${ac_cv_search_crypt_r+:} false; then :
12998
12999else
13000 ac_cv_search_crypt_r=no
13001fi
13002rm conftest.$ac_ext
13003LIBS=$ac_func_search_save_LIBS
13004fi
13005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13006$as_echo "$ac_cv_search_crypt_r" >&6; }
13007ac_res=$ac_cv_search_crypt_r
13008if test "$ac_res" != no; then :
13009 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13010
13011fi
13012
13013
13014ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13015if test "x$ac_cv_func_crypt_r" = xyes; then :
13016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13017/* end confdefs.h. */
13018
13019#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13020#include <crypt.h>
13021
13022int
13023main ()
13024{
13025
13026struct crypt_data d;
13027char *r = crypt_r("", "", &d);
13028
13029 ;
13030 return 0;
13031}
13032_ACEOF
13033if ac_fn_c_try_compile "$LINENO"; then :
13034
13035$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13036
13037fi
13038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13039
13040fi
13041
13042
Victor Stinnere0be4232011-10-25 13:06:09 +020013043for ac_func in clock_gettime
13044do :
13045 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13046if test "x$ac_cv_func_clock_gettime" = xyes; then :
13047 cat >>confdefs.h <<_ACEOF
13048#define HAVE_CLOCK_GETTIME 1
13049_ACEOF
13050
13051else
13052
13053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13054$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13055if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13056 $as_echo_n "(cached) " >&6
13057else
13058 ac_check_lib_save_LIBS=$LIBS
13059LIBS="-lrt $LIBS"
13060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13061/* end confdefs.h. */
13062
13063/* Override any GCC internal prototype to avoid an error.
13064 Use char because int might match the return type of a GCC
13065 builtin and then its argument prototype would still apply. */
13066#ifdef __cplusplus
13067extern "C"
13068#endif
13069char clock_gettime ();
13070int
13071main ()
13072{
13073return clock_gettime ();
13074 ;
13075 return 0;
13076}
13077_ACEOF
13078if ac_fn_c_try_link "$LINENO"; then :
13079 ac_cv_lib_rt_clock_gettime=yes
13080else
13081 ac_cv_lib_rt_clock_gettime=no
13082fi
13083rm -f core conftest.err conftest.$ac_objext \
13084 conftest$ac_exeext conftest.$ac_ext
13085LIBS=$ac_check_lib_save_LIBS
13086fi
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13088$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13089if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13090
Victor Stinner7efb8332014-08-29 15:41:08 +020013091 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013092 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13093
13094
13095$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13096
13097
13098fi
13099
13100
13101fi
13102done
13103
13104
13105for ac_func in clock_getres
13106do :
13107 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13108if test "x$ac_cv_func_clock_getres" = xyes; then :
13109 cat >>confdefs.h <<_ACEOF
13110#define HAVE_CLOCK_GETRES 1
13111_ACEOF
13112
13113else
13114
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13116$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13117if ${ac_cv_lib_rt_clock_getres+:} false; then :
13118 $as_echo_n "(cached) " >&6
13119else
13120 ac_check_lib_save_LIBS=$LIBS
13121LIBS="-lrt $LIBS"
13122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13123/* end confdefs.h. */
13124
13125/* Override any GCC internal prototype to avoid an error.
13126 Use char because int might match the return type of a GCC
13127 builtin and then its argument prototype would still apply. */
13128#ifdef __cplusplus
13129extern "C"
13130#endif
13131char clock_getres ();
13132int
13133main ()
13134{
13135return clock_getres ();
13136 ;
13137 return 0;
13138}
13139_ACEOF
13140if ac_fn_c_try_link "$LINENO"; then :
13141 ac_cv_lib_rt_clock_getres=yes
13142else
13143 ac_cv_lib_rt_clock_getres=no
13144fi
13145rm -f core conftest.err conftest.$ac_objext \
13146 conftest$ac_exeext conftest.$ac_ext
13147LIBS=$ac_check_lib_save_LIBS
13148fi
13149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13150$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13151if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13152
13153 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13154
13155
13156fi
13157
13158
13159fi
13160done
13161
13162
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013163for ac_func in clock_settime
13164do :
13165 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13166if test "x$ac_cv_func_clock_settime" = xyes; then :
13167 cat >>confdefs.h <<_ACEOF
13168#define HAVE_CLOCK_SETTIME 1
13169_ACEOF
13170
13171else
13172
13173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13174$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13175if ${ac_cv_lib_rt_clock_settime+:} false; then :
13176 $as_echo_n "(cached) " >&6
13177else
13178 ac_check_lib_save_LIBS=$LIBS
13179LIBS="-lrt $LIBS"
13180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13181/* end confdefs.h. */
13182
13183/* Override any GCC internal prototype to avoid an error.
13184 Use char because int might match the return type of a GCC
13185 builtin and then its argument prototype would still apply. */
13186#ifdef __cplusplus
13187extern "C"
13188#endif
13189char clock_settime ();
13190int
13191main ()
13192{
13193return clock_settime ();
13194 ;
13195 return 0;
13196}
13197_ACEOF
13198if ac_fn_c_try_link "$LINENO"; then :
13199 ac_cv_lib_rt_clock_settime=yes
13200else
13201 ac_cv_lib_rt_clock_settime=no
13202fi
13203rm -f core conftest.err conftest.$ac_objext \
13204 conftest$ac_exeext conftest.$ac_ext
13205LIBS=$ac_check_lib_save_LIBS
13206fi
13207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13208$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13209if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13210
13211 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13212
13213
13214fi
13215
13216
13217fi
13218done
13219
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13222$as_echo_n "checking for major... " >&6; }
13223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013224/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013225
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013226#if defined(MAJOR_IN_MKDEV)
13227#include <sys/mkdev.h>
13228#elif defined(MAJOR_IN_SYSMACROS)
13229#include <sys/sysmacros.h>
13230#else
13231#include <sys/types.h>
13232#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013233
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013234int
13235main ()
13236{
13237
13238 makedev(major(0),minor(0));
13239
13240 ;
13241 return 0;
13242}
13243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013245
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13250$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013251
13252else
Skip Montanaro6dead952003-09-25 14:50:04 +000013253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13255$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013256
13257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013258rm -f core conftest.err conftest.$ac_objext \
13259 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013260
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013261# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013262# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13264$as_echo_n "checking for getaddrinfo... " >&6; }
13265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013266/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013267
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013268#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013269#include <sys/socket.h>
13270#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013271#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013272
Martin v. Löwis11437992002-04-12 09:54:03 +000013273int
13274main ()
13275{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013276getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 ;
13278 return 0;
13279}
13280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013281if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013282 have_getaddrinfo=yes
13283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013286rm -f core conftest.err conftest.$ac_objext \
13287 conftest$ac_exeext conftest.$ac_ext
13288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13289$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013290if test $have_getaddrinfo = yes
13291then
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13293$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013294 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013298
13299if test "${enable_ipv6+set}" = set; then
13300 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13301else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013302 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013303fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013304else
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013306/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013307
Stefan Krah19c21392012-11-22 23:47:32 +010013308#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013309#include <sys/types.h>
13310#include <netdb.h>
13311#include <string.h>
13312#include <sys/socket.h>
13313#include <netinet/in.h>
13314
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013315int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013316{
13317 int passive, gaierr, inet4 = 0, inet6 = 0;
13318 struct addrinfo hints, *ai, *aitop;
13319 char straddr[INET6_ADDRSTRLEN], strport[16];
13320
13321 for (passive = 0; passive <= 1; passive++) {
13322 memset(&hints, 0, sizeof(hints));
13323 hints.ai_family = AF_UNSPEC;
13324 hints.ai_flags = passive ? AI_PASSIVE : 0;
13325 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013326 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013327 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13328 (void)gai_strerror(gaierr);
13329 goto bad;
13330 }
13331 for (ai = aitop; ai; ai = ai->ai_next) {
13332 if (ai->ai_addr == NULL ||
13333 ai->ai_addrlen == 0 ||
13334 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13335 straddr, sizeof(straddr), strport, sizeof(strport),
13336 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13337 goto bad;
13338 }
13339 switch (ai->ai_family) {
13340 case AF_INET:
13341 if (strcmp(strport, "54321") != 0) {
13342 goto bad;
13343 }
13344 if (passive) {
13345 if (strcmp(straddr, "0.0.0.0") != 0) {
13346 goto bad;
13347 }
13348 } else {
13349 if (strcmp(straddr, "127.0.0.1") != 0) {
13350 goto bad;
13351 }
13352 }
13353 inet4++;
13354 break;
13355 case AF_INET6:
13356 if (strcmp(strport, "54321") != 0) {
13357 goto bad;
13358 }
13359 if (passive) {
13360 if (strcmp(straddr, "::") != 0) {
13361 goto bad;
13362 }
13363 } else {
13364 if (strcmp(straddr, "::1") != 0) {
13365 goto bad;
13366 }
13367 }
13368 inet6++;
13369 break;
13370 case AF_UNSPEC:
13371 goto bad;
13372 break;
13373 default:
13374 /* another family support? */
13375 break;
13376 }
13377 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013378 freeaddrinfo(aitop);
13379 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013380 }
13381
13382 if (!(inet4 == 0 || inet4 == 2))
13383 goto bad;
13384 if (!(inet6 == 0 || inet6 == 2))
13385 goto bad;
13386
13387 if (aitop)
13388 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013389 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013390
13391 bad:
13392 if (aitop)
13393 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013394 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013395}
13396
Martin v. Löwis11437992002-04-12 09:54:03 +000013397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013398if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013399 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013400else
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13404 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013406
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013407fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013408
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13412$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13413
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013414if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013415then
13416 if test $ipv6 = yes
13417 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013418 echo 'Fatal: You must get working getaddrinfo() function.'
13419 echo ' or you can specify "--disable-ipv6"'.
13420 exit 1
13421 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013422else
Martin v. Löwis11437992002-04-12 09:54:03 +000013423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013425
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013426fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013427
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013428for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013429do :
13430 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013431if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013433#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013434_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013435
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013436fi
13437done
13438
Michael W. Hudson54241132001-12-07 15:38:26 +000013439
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013440# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13442$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013443if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013447/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013448#include <sys/types.h>
13449#include <sys/time.h>
13450#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013451
Martin v. Löwis11437992002-04-12 09:54:03 +000013452int
13453main ()
13454{
13455if ((struct tm *) 0)
13456return 0;
13457 ;
13458 return 0;
13459}
13460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013461if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013462 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013463else
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13469$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013470if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013473
13474fi
13475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13477$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013478if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480else
Matthias Kloseb9621712010-04-24 17:59:49 +000013481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013482/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483#include <sys/types.h>
13484#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013485
Martin v. Löwis11437992002-04-12 09:54:03 +000013486int
13487main ()
13488{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013489struct tm tm;
13490 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 ;
13493 return 0;
13494}
13495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013496if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013497 ac_cv_struct_tm=time.h
13498else
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13504$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013505if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013508
13509fi
13510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511ac_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 +000013512#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514"
Victor Stinnere0be4232011-10-25 13:06:09 +020013515if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
13517cat >>confdefs.h <<_ACEOF
13518#define HAVE_STRUCT_TM_TM_ZONE 1
13519_ACEOF
13520
13521
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013522fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013523
Martin v. Löwis11437992002-04-12 09:54:03 +000013524if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013527
13528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13530"
Victor Stinnere0be4232011-10-25 13:06:09 +020013531if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013533else
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013535fi
13536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013539_ACEOF
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13542$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013543if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545else
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013547/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013548#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549#if !HAVE_DECL_TZNAME
13550extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
Martin v. Löwis11437992002-04-12 09:54:03 +000013553int
13554main ()
13555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 ;
13558 return 0;
13559}
13560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013561if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562 ac_cv_var_tzname=yes
13563else
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013566rm -f core conftest.err conftest.$ac_objext \
13567 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13570$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013571 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013574
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575 fi
13576fi
13577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578ac_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 +020013579if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
13581cat >>confdefs.h <<_ACEOF
13582#define HAVE_STRUCT_STAT_ST_RDEV 1
13583_ACEOF
13584
13585
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013586fi
13587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588ac_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 +020013589if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013590
Martin v. Löwis11437992002-04-12 09:54:03 +000013591cat >>confdefs.h <<_ACEOF
13592#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13593_ACEOF
13594
13595
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013596fi
13597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598ac_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 +020013599if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013600
13601cat >>confdefs.h <<_ACEOF
13602#define HAVE_STRUCT_STAT_ST_FLAGS 1
13603_ACEOF
13604
13605
13606fi
13607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608ac_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 +020013609if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013610
13611cat >>confdefs.h <<_ACEOF
13612#define HAVE_STRUCT_STAT_ST_GEN 1
13613_ACEOF
13614
13615
13616fi
13617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618ac_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 +020013619if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013620
13621cat >>confdefs.h <<_ACEOF
13622#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13623_ACEOF
13624
13625
13626fi
13627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628ac_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 +020013629if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013630
Martin v. Löwis11437992002-04-12 09:54:03 +000013631cat >>confdefs.h <<_ACEOF
13632#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13633_ACEOF
13634
13635
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013636fi
13637
Stefan Krah267b6392016-04-26 01:09:18 +020013638ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13639 #include <sys/types.h>
13640 #include <pwd.h>
13641
13642"
13643if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13644
13645cat >>confdefs.h <<_ACEOF
13646#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13647_ACEOF
13648
13649
13650fi
13651ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13652 #include <sys/types.h>
13653 #include <pwd.h>
13654
13655"
13656if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13657
13658cat >>confdefs.h <<_ACEOF
13659#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13660_ACEOF
13661
13662
13663fi
13664
Zachary Ware6a6967e2016-10-01 00:47:27 -050013665# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13666ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13667"
13668if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13669
13670cat >>confdefs.h <<_ACEOF
13671#define HAVE_SIGINFO_T_SI_BAND 1
13672_ACEOF
13673
13674
13675fi
13676
Michael W. Hudson54241132001-12-07 15:38:26 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13679$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013680if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013682else
Matthias Kloseb159a552010-04-25 21:00:44 +000013683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013685/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013686#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013687int
13688main ()
13689{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013690return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 ;
13692 return 0;
13693}
13694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013695if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013696 ac_cv_header_time_altzone=yes
13697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702fi
13703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13705$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013706if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013709
13710fi
13711
Guido van Rossumda88dad1995-01-26 00:46:29 +000013712was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13714$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013716/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013717
13718#include <sys/types.h>
13719#include <sys/select.h>
13720#include <sys/time.h>
13721
Martin v. Löwis11437992002-04-12 09:54:03 +000013722int
13723main ()
13724{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013725;
Martin v. Löwis11437992002-04-12 09:54:03 +000013726 ;
13727 return 0;
13728}
13729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013730if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
13732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013734
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013735 was_it_defined=yes
13736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13740$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13743$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013744if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013746else
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013748/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013749#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013750int
13751main ()
13752{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013753struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 ;
13755 return 0;
13756}
13757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013758if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013759 ac_cv_struct_addrinfo=yes
13760else
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13764fi
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13767$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013768if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013769
Matthias Kloseb9621712010-04-24 17:59:49 +000013770$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013771
13772fi
13773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13775$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013778else
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013780/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013781
13782# include <sys/types.h>
13783# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013784int
13785main ()
13786{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013787struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 ;
13789 return 0;
13790}
13791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013792if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013793 ac_cv_struct_sockaddr_storage=yes
13794else
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13798fi
13799
Matthias Kloseb9621712010-04-24 17:59:49 +000013800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13801$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013802if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013803
Matthias Kloseb9621712010-04-24 17:59:49 +000013804$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013805
13806fi
13807
Christian Heimesdffa3942016-09-05 23:54:41 +020013808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13809$as_echo_n "checking for sockaddr_alg... " >&6; }
13810if ${ac_cv_struct_sockaddr_alg+:} false; then :
13811 $as_echo_n "(cached) " >&6
13812else
13813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13814/* end confdefs.h. */
13815
13816# include <sys/types.h>
13817# include <sys/socket.h>
13818# include <linux/if_alg.h>
13819int
13820main ()
13821{
13822struct sockaddr_alg s
13823 ;
13824 return 0;
13825}
13826_ACEOF
13827if ac_fn_c_try_compile "$LINENO"; then :
13828 ac_cv_struct_sockaddr_alg=yes
13829else
13830 ac_cv_struct_sockaddr_alg=no
13831fi
13832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13833fi
13834
13835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13836$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13837if test $ac_cv_struct_sockaddr_alg = yes; then
13838
13839$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13840
13841fi
13842
Guido van Rossum627b2d71993-12-24 10:39:16 +000013843# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013844
Matthias Kloseb9621712010-04-24 17:59:49 +000013845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13846$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013847if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013849else
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013852$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013853int
13854main ()
13855{
13856static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013857test_array [0] = 0;
13858return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013859
13860 ;
13861 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013862}
Martin v. Löwis11437992002-04-12 09:54:03 +000013863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013864if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013865 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013866else
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13872$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013873if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013875
13876fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13879$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013880if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013882else
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013884/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013885
Martin v. Löwis11437992002-04-12 09:54:03 +000013886int
13887main ()
13888{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013889
Martin v. Löwis11437992002-04-12 09:54:03 +000013890#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013891 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013892 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013893 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013894 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895 char const *const *pcpcc;
13896 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 /* NEC SVR4.0.2 mips cc rejects this. */
13898 struct point {int x, y;};
13899 static struct point const zero = {0,0};
13900 /* AIX XL C 1.02.0.0 rejects this.
13901 It does not let you subtract one const X* pointer from another in
13902 an arm of an if-expression whose if-part is not a constant
13903 expression */
13904 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 ++pcpcc;
13908 ppc = (char**) pcpcc;
13909 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013910 { /* SCO 3.2v4 cc rejects this sort of thing. */
13911 char tx;
13912 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013914
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 }
13918 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13919 int x[] = {25, 17};
13920 const int *foo = &x[0];
13921 ++foo;
13922 }
13923 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13924 typedef const int *iptr;
13925 iptr p = 0;
13926 ++p;
13927 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013928 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013930 struct s { int j; const int *ap[3]; } bx;
13931 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 }
13933 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13934 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013938#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 ;
13941 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013942}
Martin v. Löwis11437992002-04-12 09:54:03 +000013943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013944if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013945 ac_cv_c_const=yes
13946else
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13952$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013953if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013954
Matthias Kloseb9621712010-04-24 17:59:49 +000013955$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013956
13957fi
13958
Michael W. Hudson54241132001-12-07 15:38:26 +000013959
Guido van Rossumda88dad1995-01-26 00:46:29 +000013960works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13962$as_echo_n "checking for working signed char... " >&6; }
13963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013964/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013965
Martin v. Löwis11437992002-04-12 09:54:03 +000013966int
13967main ()
13968{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013969signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 ;
13971 return 0;
13972}
13973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013975 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013976else
Skip Montanaro6dead952003-09-25 14:50:04 +000013977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013979
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013980
Guido van Rossum7f43da71994-08-01 12:15:30 +000013981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13984$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013985
Guido van Rossumda88dad1995-01-26 00:46:29 +000013986have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13988$as_echo_n "checking for prototypes... " >&6; }
13989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013990/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013991int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013992int
13993main ()
13994{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013995return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 ;
13997 return 0;
13998}
13999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014000if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
Matthias Kloseb9621712010-04-24 17:59:49 +000014002$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
Matthias Kloseb159a552010-04-25 21:00:44 +000014004 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14008$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014009
Guido van Rossumda88dad1995-01-26 00:46:29 +000014010works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14012$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014014/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014015
14016#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014017int foo(int x, ...) {
14018 va_list va;
14019 va_start(va, x);
14020 va_arg(va, int);
14021 va_arg(va, char *);
14022 va_arg(va, double);
14023 return 0;
14024}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014025
Martin v. Löwis11437992002-04-12 09:54:03 +000014026int
14027main ()
14028{
Guido van Rossum90eea071996-08-30 20:58:57 +000014029return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 ;
14031 return 0;
14032}
14033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014035
14036
Matthias Kloseb9621712010-04-24 17:59:49 +000014037$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014038
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014039 works=yes
14040
Guido van Rossum627b2d71993-12-24 10:39:16 +000014041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14044$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014045
Martin v. Löwisd6320502004-08-12 13:45:08 +000014046# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14048$as_echo_n "checking for socketpair... " >&6; }
14049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014050/* end confdefs.h. */
14051
14052#include <sys/types.h>
14053#include <sys/socket.h>
14054
14055int
14056main ()
14057{
14058void *x=socketpair
14059 ;
14060 return 0;
14061}
14062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014063if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014064
Matthias Kloseb9621712010-04-24 17:59:49 +000014065$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014066
Matthias Kloseb159a552010-04-25 21:00:44 +000014067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014068$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014069else
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14071$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014072
14073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014075
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014076# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14078$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014080/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014081#include <sys/types.h>
14082#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014083int
14084main ()
14085{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014086struct sockaddr x;
14087x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014088 ;
14089 return 0;
14090}
14091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014092if ac_fn_c_try_compile "$LINENO"; then :
14093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14094$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014095
Matthias Kloseb9621712010-04-24 17:59:49 +000014096$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014097
14098else
Matthias Kloseb9621712010-04-24 17:59:49 +000014099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14100$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014101
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014104
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014105# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
14107
Matthias Kloseb9621712010-04-24 17:59:49 +000014108ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014109if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14114$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014115 OLD_CFLAGS=$CFLAGS
14116 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014118/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014119
14120# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014121
Martin v. Löwis11437992002-04-12 09:54:03 +000014122int
14123main ()
14124{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014125
14126 char *name;
14127 struct hostent *he, *res;
14128 char buffer[2048];
14129 int buflen = 2048;
14130 int h_errnop;
14131
14132 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
14134 ;
14135 return 0;
14136}
14137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014139
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014141
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014144
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14146$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014147
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014148else
Skip Montanaro6dead952003-09-25 14:50:04 +000014149
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14151$as_echo "no" >&6; }
14152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14153$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014155/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014156
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014157# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014158
Martin v. Löwis11437992002-04-12 09:54:03 +000014159int
14160main ()
14161{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014162
14163 char *name;
14164 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014165 char buffer[2048];
14166 int buflen = 2048;
14167 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014168
Matthias Kloseb159a552010-04-25 21:00:44 +000014169 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014170
14171 ;
14172 return 0;
14173}
14174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014175if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014178
Martin v. Löwis11437992002-04-12 09:54:03 +000014179
Matthias Kloseb159a552010-04-25 21:00:44 +000014180$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014181
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14183$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014185else
Skip Montanaro6dead952003-09-25 14:50:04 +000014186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14188$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14190$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14192/* end confdefs.h. */
14193
14194# include <netdb.h>
14195
14196int
14197main ()
14198{
14199
14200 char *name;
14201 struct hostent *he;
14202 struct hostent_data data;
14203
14204 (void) gethostbyname_r(name, he, &data);
14205
14206 ;
14207 return 0;
14208}
14209_ACEOF
14210if ac_fn_c_try_compile "$LINENO"; then :
14211
14212 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14213
14214
14215$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14216
14217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14218$as_echo "yes" >&6; }
14219
14220else
14221
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14223$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014227
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014230
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014233 CFLAGS=$OLD_CFLAGS
14234
14235else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 for ac_func in gethostbyname
14238do :
14239 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014240if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014242#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014243_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014244
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014245fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014246done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014247
Michael W. Hudson54241132001-12-07 15:38:26 +000014248
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014249fi
14250
Michael W. Hudson54241132001-12-07 15:38:26 +000014251
14252
14253
14254
14255
14256
Guido van Rossum627b2d71993-12-24 10:39:16 +000014257# checks for system services
14258# (none yet)
14259
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014260# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014261ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014262if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014263
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014264else
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14266$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014267if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014269else
Martin v. Löwis11437992002-04-12 09:54:03 +000014270 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014271LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014275/* Override any GCC internal prototype to avoid an error.
14276 Use char because int might match the return type of a GCC
14277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014278#ifdef __cplusplus
14279extern "C"
14280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014281char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014282int
14283main ()
14284{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 ;
14287 return 0;
14288}
14289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014291 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014295rm -f core conftest.err conftest.$ac_objext \
14296 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014297LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14300$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014301if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014302 cat >>confdefs.h <<_ACEOF
14303#define HAVE_LIBIEEE 1
14304_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014305
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014306 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014307
Guido van Rossum627b2d71993-12-24 10:39:16 +000014308fi
14309
Michael W. Hudson54241132001-12-07 15:38:26 +000014310
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014311fi
14312
Michael W. Hudson54241132001-12-07 15:38:26 +000014313
Guido van Rossum7f43da71994-08-01 12:15:30 +000014314# check for --with-libm=...
14315
Guido van Rossum563e7081996-09-10 18:20:48 +000014316case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014317Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014318*) LIBM=-lm
14319esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14321$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014324if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014326if test "$withval" = no
14327then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14329$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014330elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014331then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14333$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014334else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014335fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014336else
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14338$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339fi
14340
Guido van Rossum7f43da71994-08-01 12:15:30 +000014341
14342# check for --with-libc=...
14343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14345$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014348if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014350if test "$withval" = no
14351then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14353$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014354elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014355then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14357$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014358else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014359fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014360else
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14362$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363fi
14364
Guido van Rossum7f43da71994-08-01 12:15:30 +000014365
Stefan Krah1919b7e2012-03-21 18:25:23 +010014366# **************************************
14367# * Check for gcc x64 inline assembler *
14368# **************************************
14369
14370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14371$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14373/* end confdefs.h. */
14374
14375int
14376main ()
14377{
14378
14379 __asm__ __volatile__ ("movq %rcx, %rax");
14380
14381 ;
14382 return 0;
14383}
14384_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014385if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014386 have_gcc_asm_for_x64=yes
14387else
14388 have_gcc_asm_for_x64=no
14389fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014390rm -f core conftest.err conftest.$ac_objext \
14391 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14393$as_echo "$have_gcc_asm_for_x64" >&6; }
14394if test "$have_gcc_asm_for_x64" = yes
14395then
14396
14397$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14398
14399fi
14400
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014401# **************************************************
14402# * Check for various properties of floating point *
14403# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014404
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14406$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14407if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014409else
14410
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014411
14412ax_cv_c_float_words_bigendian=unknown
14413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014414/* end confdefs.h. */
14415
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014416
14417double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14418
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014419
14420_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014421if ac_fn_c_try_compile "$LINENO"; then :
14422
14423
Arnon Yaari5dd83602020-04-01 18:19:09 +030014424if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014425 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014426fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014427if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014428 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14429 ax_cv_c_float_words_bigendian=no
14430 else
14431 ax_cv_c_float_words_bigendian=unknown
14432 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014433fi
14434
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014435
14436fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014438fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14440$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014441
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014442case $ax_cv_c_float_words_bigendian in
14443 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014444
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014445$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14446 ;;
14447 no)
14448 ;;
14449 *)
14450 as_fn_error $? "
14451
14452Unknown float word ordering. You need to manually preset
14453ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14454
14455 " "$LINENO" 5 ;;
14456esac
14457
14458
14459if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014460then
14461
Matthias Kloseb9621712010-04-24 17:59:49 +000014462$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014463
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014464elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014465then
14466
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014467$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14468
14469else
14470 # Some ARM platforms use a mixed-endian representation for doubles.
14471 # While Python doesn't currently have full support for these platforms
14472 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14473 # conversions work.
14474 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14475 # or little, then it must be this?
14476
Matthias Kloseb9621712010-04-24 17:59:49 +000014477$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014478
14479fi
14480
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014481# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014482# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014483# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014484# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014485# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014486# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014487
14488# This inline assembler syntax may also work for suncc and icc,
14489# so we try it on all platforms.
14490
Matthias Kloseb9621712010-04-24 17:59:49 +000014491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14492$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014494/* end confdefs.h. */
14495
14496int
14497main ()
14498{
14499
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014500 unsigned short cw;
14501 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14502 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014503
14504 ;
14505 return 0;
14506}
14507_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014508if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014509 have_gcc_asm_for_x87=yes
14510else
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014512fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014513rm -f core conftest.err conftest.$ac_objext \
14514 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14516$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014517if test "$have_gcc_asm_for_x87" = yes
14518then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014519
Matthias Kloseb9621712010-04-24 17:59:49 +000014520$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014521
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014522fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014523
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14525$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527/* end confdefs.h. */
14528
14529int
14530main ()
14531{
14532
14533 unsigned int fpcr;
14534 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14535 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14536
14537 ;
14538 return 0;
14539}
14540_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014541if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014542 have_gcc_asm_for_mc68881=yes
14543else
14544 have_gcc_asm_for_mc68881=no
14545fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014546rm -f core conftest.err conftest.$ac_objext \
14547 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14549$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14550if test "$have_gcc_asm_for_mc68881" = yes
14551then
14552
14553$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14554
14555fi
14556
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014557# Detect whether system arithmetic is subject to x87-style double
14558# rounding issues. The result of this test has little meaning on non
14559# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14560# mode is round-to-nearest and double rounding issues are present, and
14561# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14563$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014564# $BASECFLAGS may affect the result
14565ac_save_cc="$CC"
14566CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014567if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014568 ac_cv_x87_double_rounding=no
14569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014571/* end confdefs.h. */
14572
14573#include <stdlib.h>
14574#include <math.h>
14575int main() {
14576 volatile double x, y, z;
14577 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14578 x = 0.99999999999999989; /* 1-2**-53 */
14579 y = 1./x;
14580 if (y != 1.)
14581 exit(0);
14582 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14583 x = 1e16;
14584 y = 2.99999;
14585 z = x + y;
14586 if (z != 1e16+4.)
14587 exit(0);
14588 /* both tests show evidence of double rounding */
14589 exit(1);
14590}
14591
14592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014594 ac_cv_x87_double_rounding=no
14595else
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14599 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014600fi
14601
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014602CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14604$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014605if test "$ac_cv_x87_double_rounding" = yes
14606then
14607
Matthias Kloseb9621712010-04-24 17:59:49 +000014608$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014609
14610fi
14611
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014612# ************************************
14613# * Check for mathematical functions *
14614# ************************************
14615
14616LIBS_SAVE=$LIBS
14617LIBS="$LIBS $LIBM"
14618
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014619for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14620do :
14621 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14622ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014623if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014624 cat >>confdefs.h <<_ACEOF
14625#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14626_ACEOF
14627
14628fi
14629done
14630
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014631for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014632do :
14633 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14634ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014635if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014636 cat >>confdefs.h <<_ACEOF
14637#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14638_ACEOF
14639
14640fi
14641done
14642
14643ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14644"
Victor Stinnere0be4232011-10-25 13:06:09 +020014645if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014646 ac_have_decl=1
14647else
14648 ac_have_decl=0
14649fi
14650
14651cat >>confdefs.h <<_ACEOF
14652#define HAVE_DECL_ISINF $ac_have_decl
14653_ACEOF
14654ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14655"
Victor Stinnere0be4232011-10-25 13:06:09 +020014656if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014657 ac_have_decl=1
14658else
14659 ac_have_decl=0
14660fi
14661
14662cat >>confdefs.h <<_ACEOF
14663#define HAVE_DECL_ISNAN $ac_have_decl
14664_ACEOF
14665ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14666"
Victor Stinnere0be4232011-10-25 13:06:09 +020014667if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014668 ac_have_decl=1
14669else
14670 ac_have_decl=0
14671fi
14672
14673cat >>confdefs.h <<_ACEOF
14674#define HAVE_DECL_ISFINITE $ac_have_decl
14675_ACEOF
14676
14677
Mark Dickinsona614f042009-11-28 12:48:43 +000014678# For multiprocessing module, check that sem_open
14679# actually works. For FreeBSD versions <= 7.2,
14680# the kernel module that provides POSIX semaphores
14681# isn't loaded by default, so an attempt to call
14682# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14684$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014685if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014687else
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014689 ac_cv_posix_semaphores_enabled=yes
14690else
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014692/* end confdefs.h. */
14693
14694#include <unistd.h>
14695#include <fcntl.h>
14696#include <stdio.h>
14697#include <semaphore.h>
14698#include <sys/stat.h>
14699
14700int main(void) {
14701 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14702 if (a == SEM_FAILED) {
14703 perror("sem_open");
14704 return 1;
14705 }
14706 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014707 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014708 return 0;
14709}
14710
14711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014712if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014713 ac_cv_posix_semaphores_enabled=yes
14714else
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014719fi
14720
14721
Mark Dickinsona614f042009-11-28 12:48:43 +000014722fi
14723
Matthias Kloseb9621712010-04-24 17:59:49 +000014724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14725$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014726if test $ac_cv_posix_semaphores_enabled = no
14727then
14728
Matthias Kloseb9621712010-04-24 17:59:49 +000014729$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014730
14731fi
14732
Mark Dickinson10683072009-04-18 21:18:19 +000014733# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14735$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014736if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014738else
Matthias Kloseb9621712010-04-24 17:59:49 +000014739 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014740 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014741else
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014743/* end confdefs.h. */
14744
14745#include <unistd.h>
14746#include <fcntl.h>
14747#include <stdio.h>
14748#include <semaphore.h>
14749#include <sys/stat.h>
14750
14751int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014752 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014753 int count;
14754 int res;
14755 if(a==SEM_FAILED){
14756 perror("sem_open");
14757 return 1;
14758
14759 }
14760 res = sem_getvalue(a, &count);
14761 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014762 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014763 return res==-1 ? 1 : 0;
14764}
14765
Mark Dickinson10683072009-04-18 21:18:19 +000014766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014767if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014768 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014769else
Matthias Kloseb9621712010-04-24 17:59:49 +000014770 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014774fi
14775
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014776
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014777fi
14778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14780$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014781if test $ac_cv_broken_sem_getvalue = yes
14782then
14783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014785
14786fi
14787
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014788ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14789"
14790if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14791 ac_have_decl=1
14792else
14793 ac_have_decl=0
14794fi
14795
14796cat >>confdefs.h <<_ACEOF
14797#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14798_ACEOF
14799ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14800"
14801if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14802 ac_have_decl=1
14803else
14804 ac_have_decl=0
14805fi
14806
14807cat >>confdefs.h <<_ACEOF
14808#define HAVE_DECL_RTLD_NOW $ac_have_decl
14809_ACEOF
14810ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14811"
14812if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14813 ac_have_decl=1
14814else
14815 ac_have_decl=0
14816fi
14817
14818cat >>confdefs.h <<_ACEOF
14819#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14820_ACEOF
14821ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14822"
14823if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14824 ac_have_decl=1
14825else
14826 ac_have_decl=0
14827fi
14828
14829cat >>confdefs.h <<_ACEOF
14830#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14831_ACEOF
14832ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14833"
14834if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14835 ac_have_decl=1
14836else
14837 ac_have_decl=0
14838fi
14839
14840cat >>confdefs.h <<_ACEOF
14841#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14842_ACEOF
14843ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14844"
14845if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14846 ac_have_decl=1
14847else
14848 ac_have_decl=0
14849fi
14850
14851cat >>confdefs.h <<_ACEOF
14852#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14853_ACEOF
14854ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14855"
14856if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14857 ac_have_decl=1
14858else
14859 ac_have_decl=0
14860fi
14861
14862cat >>confdefs.h <<_ACEOF
14863#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14864_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014865ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14866"
14867if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14868 ac_have_decl=1
14869else
14870 ac_have_decl=0
14871fi
14872
14873cat >>confdefs.h <<_ACEOF
14874#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14875_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014876
14877
Mark Dickinsonbd792642009-03-18 20:06:12 +000014878# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14880$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014881# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014882if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014883 enableval=$enable_big_digits; case $enable_big_digits in
14884yes)
14885 enable_big_digits=30 ;;
14886no)
14887 enable_big_digits=15 ;;
1488815|30)
14889 ;;
14890*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014891 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 +000014892esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14894$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014895
14896cat >>confdefs.h <<_ACEOF
14897#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14898_ACEOF
14899
14900
14901else
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14903$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014904fi
14905
14906
Guido van Rossumef2255b2000-03-10 22:30:29 +000014907# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014908ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014909if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014910
14911
Matthias Kloseb9621712010-04-24 17:59:49 +000014912$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014913
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014914 wchar_h="yes"
14915
Guido van Rossumef2255b2000-03-10 22:30:29 +000014916else
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014918
14919fi
14920
Michael W. Hudson54241132001-12-07 15:38:26 +000014921
Martin v. Löwis11437992002-04-12 09:54:03 +000014922
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014923# determine wchar_t size
14924if test "$wchar_h" = yes
14925then
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14929# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14931$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014932if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014934else
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14936"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014937
Martin v. Löwis11437992002-04-12 09:54:03 +000014938else
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 if test "$ac_cv_type_wchar_t" = yes; then
14940 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14941$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014942as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014943See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944 else
14945 ac_cv_sizeof_wchar_t=0
14946 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014948
Martin v. Löwis11437992002-04-12 09:54:03 +000014949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14951$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952
14953
14954
Martin v. Löwis11437992002-04-12 09:54:03 +000014955cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014956#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014957_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014958
Michael W. Hudson54241132001-12-07 15:38:26 +000014959
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014960fi
14961
Matthias Kloseb9621712010-04-24 17:59:49 +000014962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14963$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014964have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014966/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014967
14968#include <tcl.h>
14969#if TCL_UTF_MAX != 6
14970# error "NOT UCS4_TCL"
14971#endif
14972int
14973main ()
14974{
14975
14976 ;
14977 return 0;
14978}
14979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014980if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014981
14982
Matthias Kloseb9621712010-04-24 17:59:49 +000014983$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014984
14985 have_ucs4_tcl=yes
14986
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14990$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014991
Skip Montanaro6dead952003-09-25 14:50:04 +000014992# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014993if test "$wchar_h" = yes
14994then
14995 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14997$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014998 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015000else
15001
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015003 ac_cv_wchar_t_signed=yes
15004else
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015006/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015007
15008 #include <wchar.h>
15009 int main()
15010 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015011 /* Success: exit code 0 */
15012 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015013 }
15014
15015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015016if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015017 ac_cv_wchar_t_signed=yes
15018else
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15022 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015023fi
15024
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015025fi
15026
Matthias Kloseb9621712010-04-24 17:59:49 +000015027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15028$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029fi
15030
Michael Osipov3738fad2018-08-24 18:17:19 +020015031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15032$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015033# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015034if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015035 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015036then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015037
Matthias Kloseb9621712010-04-24 17:59:49 +000015038$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015039
Michael Osipov3738fad2018-08-24 18:17:19 +020015040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15041$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015042else
Michael Osipov3738fad2018-08-24 18:17:19 +020015043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15044$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015045fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015046
15047# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15049$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015050if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015052else
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 ac_cv_c_bigendian=unknown
15054 # See if we're dealing with a universal compiler.
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056/* end confdefs.h. */
15057#ifndef __APPLE_CC__
15058 not a universal capable compiler
15059 #endif
15060 typedef int dummy;
15061
Skip Montanaro6dead952003-09-25 14:50:04 +000015062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015063if ac_fn_c_try_compile "$LINENO"; then :
15064
15065 # Check for potential -arch flags. It is not universal unless
15066 # there are at least two -arch flags with different values.
15067 ac_arch=
15068 ac_prev=
15069 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15070 if test -n "$ac_prev"; then
15071 case $ac_word in
15072 i?86 | x86_64 | ppc | ppc64)
15073 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15074 ac_arch=$ac_word
15075 else
15076 ac_cv_c_bigendian=universal
15077 break
15078 fi
15079 ;;
15080 esac
15081 ac_prev=
15082 elif test "x$ac_word" = "x-arch"; then
15083 ac_prev=arch
15084 fi
15085 done
15086fi
15087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15088 if test $ac_cv_c_bigendian = unknown; then
15089 # See if sys/param.h defines the BYTE_ORDER macro.
15090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015091/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015092#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015093 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015094
Martin v. Löwis11437992002-04-12 09:54:03 +000015095int
15096main ()
15097{
Matthias Kloseb9621712010-04-24 17:59:49 +000015098#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15099 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15100 && LITTLE_ENDIAN)
15101 bogus endian macros
15102 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015103
15104 ;
15105 return 0;
15106}
15107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015108if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015109 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015111/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015112#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015114
Martin v. Löwis11437992002-04-12 09:54:03 +000015115int
15116main ()
15117{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015118#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 not big endian
15120 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015121
15122 ;
15123 return 0;
15124}
15125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015126if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127 ac_cv_c_bigendian=yes
15128else
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015132fi
15133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15134 fi
15135 if test $ac_cv_c_bigendian = unknown; then
15136 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015138/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015139#include <limits.h>
15140
Martin v. Löwis11437992002-04-12 09:54:03 +000015141int
15142main ()
15143{
Matthias Kloseb9621712010-04-24 17:59:49 +000015144#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15145 bogus endian macros
15146 #endif
15147
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ;
15149 return 0;
15150}
15151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015152if ac_fn_c_try_compile "$LINENO"; then :
15153 # It does; now see whether it defined to _BIG_ENDIAN or not.
15154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15155/* end confdefs.h. */
15156#include <limits.h>
15157
15158int
15159main ()
15160{
15161#ifndef _BIG_ENDIAN
15162 not big endian
15163 #endif
15164
15165 ;
15166 return 0;
15167}
15168_ACEOF
15169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015171else
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15175fi
15176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15177 fi
15178 if test $ac_cv_c_bigendian = unknown; then
15179 # Compile a test program.
15180 if test "$cross_compiling" = yes; then :
15181 # Try to guess by grepping values from an object file.
15182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15183/* end confdefs.h. */
15184short int ascii_mm[] =
15185 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15186 short int ascii_ii[] =
15187 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15188 int use_ascii (int i) {
15189 return ascii_mm[i] + ascii_ii[i];
15190 }
15191 short int ebcdic_ii[] =
15192 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15193 short int ebcdic_mm[] =
15194 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15195 int use_ebcdic (int i) {
15196 return ebcdic_mm[i] + ebcdic_ii[i];
15197 }
15198 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199
Matthias Kloseb9621712010-04-24 17:59:49 +000015200int
15201main ()
15202{
15203return use_ascii (foo) == use_ebcdic (foo);
15204 ;
15205 return 0;
15206}
15207_ACEOF
15208if ac_fn_c_try_compile "$LINENO"; then :
15209 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15210 ac_cv_c_bigendian=yes
15211 fi
15212 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15213 if test "$ac_cv_c_bigendian" = unknown; then
15214 ac_cv_c_bigendian=no
15215 else
15216 # finding both strings is unlikely to happen, but who knows?
15217 ac_cv_c_bigendian=unknown
15218 fi
15219 fi
15220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015222else
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015224/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015226int
15227main ()
15228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 /* Are we little or big endian? From Harbison&Steele. */
15231 union
15232 {
15233 long int l;
15234 char c[sizeof (long int)];
15235 } u;
15236 u.l = 1;
15237 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238
15239 ;
15240 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015241}
Martin v. Löwis11437992002-04-12 09:54:03 +000015242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015243if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015244 ac_cv_c_bigendian=no
15245else
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15249 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015251
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15255$as_echo "$ac_cv_c_bigendian" >&6; }
15256 case $ac_cv_c_bigendian in #(
15257 yes)
15258 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15259;; #(
15260 no)
15261 ;; #(
15262 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015263
Matthias Kloseb9621712010-04-24 17:59:49 +000015264$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015265
Matthias Kloseb9621712010-04-24 17:59:49 +000015266 ;; #(
15267 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015268 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015269 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015271
Michael W. Hudson54241132001-12-07 15:38:26 +000015272
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015273# ABI version string for Python extension modules. This appears between the
15274# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15275# from the following attributes which affect the ABI of this Python build (in
15276# this order):
15277#
15278# * The Python implementation (always 'cpython-' for us)
15279# * The major and minor version numbers
15280# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015281#
15282# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015283# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15284# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015285#
15286# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15287# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015288
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15290$as_echo_n "checking ABIFLAGS... " >&6; }
15291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15292$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15294$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015295SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15297$as_echo "$SOABI" >&6; }
15298
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015299# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15300if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015301 # Similar to SOABI but remove "d" flag from ABIFLAGS
15302
15303 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15304
15305cat >>confdefs.h <<_ACEOF
15306#define ALT_SOABI "${ALT_SOABI}"
15307_ACEOF
15308
15309fi
15310
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015311
15312case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015313 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015314 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15315 *)
15316 EXT_SUFFIX=${SHLIB_SUFFIX};;
15317esac
15318
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15320$as_echo_n "checking LDVERSION... " >&6; }
15321LDVERSION='$(VERSION)$(ABIFLAGS)'
15322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15323$as_echo "$LDVERSION" >&6; }
15324
E. M. Brayc994c8f2019-05-24 17:33:47 +020015325# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015326
E. M. Brayb1fc4172019-05-24 18:39:39 +020015327if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015328 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015329else
15330 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015331fi
15332
doko@python.org87421192013-01-26 11:39:31 +010015333
Miss Islington (bot)6cb24a02020-06-09 06:54:54 -070015334
15335BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15336
15337
15338# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015339# /usr/$LIDIRNAME/python$VERSION
15340
15341PLATLIBDIR="lib"
15342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15343$as_echo_n "checking for --with-platlibdir... " >&6; }
15344
15345# Check whether --with-platlibdir was given.
15346if test "${with_platlibdir+set}" = set; then :
15347 withval=$with_platlibdir;
15348# ignore 3 options:
15349# --with-platlibdir
15350# --with-platlibdir=
15351# --without-platlibdir
15352if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15353then
15354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15355$as_echo "yes" >&6; }
15356 PLATLIBDIR="$withval"
Miss Islington (bot)6cb24a02020-06-09 06:54:54 -070015357 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015358else
Victor Stinner8510f432020-03-10 09:53:09 +010015359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15360$as_echo "no" >&6; }
15361fi
15362else
15363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15364$as_echo "no" >&6; }
15365fi
15366
15367
15368
15369
15370if test x$PLATFORM_TRIPLET = x; then
15371 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15372else
15373 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015374fi
doko@python.org87421192013-01-26 11:39:31 +010015375
15376
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015377# Check whether right shifting a negative integer extends the sign bit
15378# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15380$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015381if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015383else
Martin v. Löwis11437992002-04-12 09:54:03 +000015384
Matthias Kloseb9621712010-04-24 17:59:49 +000015385if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015386 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015387else
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015389/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015390
15391int main()
15392{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015393 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015394}
15395
Martin v. Löwis11437992002-04-12 09:54:03 +000015396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015397if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015398 ac_cv_rshift_extends_sign=yes
15399else
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15403 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015404fi
15405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015406fi
15407
Matthias Kloseb9621712010-04-24 17:59:49 +000015408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15409$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015410if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015411then
Martin v. Löwis11437992002-04-12 09:54:03 +000015412
Matthias Kloseb9621712010-04-24 17:59:49 +000015413$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015414
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015415fi
15416
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015417# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15419$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015420if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015421 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015422else
Martin v. Löwis11437992002-04-12 09:54:03 +000015423
Matthias Kloseb9621712010-04-24 17:59:49 +000015424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015425/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015426#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015427int
15428main ()
15429{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015430
15431 FILE *f = fopen("/dev/null", "r");
15432 flockfile(f);
15433 getc_unlocked(f);
15434 funlockfile(f);
15435
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 ;
15437 return 0;
15438}
15439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015440if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015441 ac_cv_have_getc_unlocked=yes
15442else
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 ac_cv_have_getc_unlocked=no
15444fi
15445rm -f core conftest.err conftest.$ac_objext \
15446 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015448
Matthias Kloseb9621712010-04-24 17:59:49 +000015449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15450$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015451if test "$ac_cv_have_getc_unlocked" = yes
15452then
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
Matthias Kloseb9621712010-04-24 17:59:49 +000015454$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015455
15456fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015457
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015458# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015459# save the value of LIBS so we don't actually link Python with readline
15460LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015461
Gregory P. Smith18820942008-09-07 06:24:49 +000015462# On some systems we need to link readline to a termcap compatible
15463# library. NOTE: Keep the precedence of listed libraries synchronised
15464# with setup.py.
15465py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15467$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015468for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015469 if test -z "$py_libtermcap"; then
15470 READLINE_LIBS="-lreadline"
15471 else
15472 READLINE_LIBS="-lreadline -l$py_libtermcap"
15473 fi
15474 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015476/* end confdefs.h. */
15477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015478/* Override any GCC internal prototype to avoid an error.
15479 Use char because int might match the return type of a GCC
15480 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015481#ifdef __cplusplus
15482extern "C"
15483#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015484char readline ();
15485int
15486main ()
15487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015488return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015489 ;
15490 return 0;
15491}
15492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015493if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015494 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015496rm -f core conftest.err conftest.$ac_objext \
15497 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015498 if test $py_cv_lib_readline = yes; then
15499 break
15500 fi
15501done
15502# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15503#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015504if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15506$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015507else
Matthias Kloseb9621712010-04-24 17:59:49 +000015508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15509$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015512
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015513fi
15514
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015515# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015517/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015518#include <readline/readline.h>
15519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015520if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015521 have_readline=yes
15522else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015523 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015524
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015525fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015526rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015527if test $have_readline = yes
15528then
Matthias Kloseb9621712010-04-24 17:59:49 +000015529 cat 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
15533_ACEOF
15534if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015536
Matthias Kloseb9621712010-04-24 17:59:49 +000015537$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015538
15539fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015540rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015541
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015543/* end confdefs.h. */
15544#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_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015551
15552fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015553rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015554
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015555fi
15556
Martin v. Löwis0daad592001-09-30 21:09:59 +000015557# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15559$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015560if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015561 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015562else
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015564LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015568/* Override any GCC internal prototype to avoid an error.
15569 Use char because int might match the return type of a GCC
15570 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015571#ifdef __cplusplus
15572extern "C"
15573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015574char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015575int
15576main ()
15577{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015578return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 ;
15580 return 0;
15581}
15582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015583if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015585else
Matthias Kloseb9621712010-04-24 17:59:49 +000015586 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015588rm -f core conftest.err conftest.$ac_objext \
15589 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015590LIBS=$ac_check_lib_save_LIBS
15591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15593$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015594if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015595
Matthias Kloseb9621712010-04-24 17:59:49 +000015596$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015597
Martin v. Löwis0daad592001-09-30 21:09:59 +000015598fi
15599
Michael W. Hudson54241132001-12-07 15:38:26 +000015600
Thomas Wouters89d996e2007-09-08 17:39:28 +000015601# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15603$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015604if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015606else
15607 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015608LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015610/* end confdefs.h. */
15611
15612/* Override any GCC internal prototype to avoid an error.
15613 Use char because int might match the return type of a GCC
15614 builtin and then its argument prototype would still apply. */
15615#ifdef __cplusplus
15616extern "C"
15617#endif
15618char rl_completion_display_matches_hook ();
15619int
15620main ()
15621{
15622return rl_completion_display_matches_hook ();
15623 ;
15624 return 0;
15625}
15626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015627if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015628 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15629else
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015632rm -f core conftest.err conftest.$ac_objext \
15633 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015634LIBS=$ac_check_lib_save_LIBS
15635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15637$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015638if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015639
Matthias Kloseb9621712010-04-24 17:59:49 +000015640$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015641
15642fi
15643
15644
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015645# also in 4.0, but not in editline
15646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15647$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15648if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15649 $as_echo_n "(cached) " >&6
15650else
15651 ac_check_lib_save_LIBS=$LIBS
15652LIBS="-lreadline $READLINE_LIBS $LIBS"
15653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15654/* end confdefs.h. */
15655
15656/* Override any GCC internal prototype to avoid an error.
15657 Use char because int might match the return type of a GCC
15658 builtin and then its argument prototype would still apply. */
15659#ifdef __cplusplus
15660extern "C"
15661#endif
15662char rl_resize_terminal ();
15663int
15664main ()
15665{
15666return rl_resize_terminal ();
15667 ;
15668 return 0;
15669}
15670_ACEOF
15671if ac_fn_c_try_link "$LINENO"; then :
15672 ac_cv_lib_readline_rl_resize_terminal=yes
15673else
15674 ac_cv_lib_readline_rl_resize_terminal=no
15675fi
15676rm -f core conftest.err conftest.$ac_objext \
15677 conftest$ac_exeext conftest.$ac_ext
15678LIBS=$ac_check_lib_save_LIBS
15679fi
15680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15681$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15682if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15683
15684$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15685
15686fi
15687
15688
Martin v. Löwis0daad592001-09-30 21:09:59 +000015689# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15691$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015692if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015694else
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015696LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015700/* Override any GCC internal prototype to avoid an error.
15701 Use char because int might match the return type of a GCC
15702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015703#ifdef __cplusplus
15704extern "C"
15705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015706char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015707int
15708main ()
15709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 ;
15712 return 0;
15713}
15714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015715if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015716 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015717else
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015720rm -f core conftest.err conftest.$ac_objext \
15721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015722LIBS=$ac_check_lib_save_LIBS
15723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15725$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015726if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015727
Matthias Kloseb9621712010-04-24 17:59:49 +000015728$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015729
Guido van Rossum353ae582001-07-10 16:45:32 +000015730fi
15731
Jack Jansendd19cf82001-12-06 22:36:17 +000015732
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015733# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015735/* end confdefs.h. */
15736#include <readline/readline.h>
15737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015738if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015739 have_readline=yes
15740else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015741 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015742
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015743fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015744rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015745if test $have_readline = yes
15746then
Matthias Kloseb9621712010-04-24 17:59:49 +000015747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015748/* end confdefs.h. */
15749#include <readline/readline.h>
15750
15751_ACEOF
15752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015754
Matthias Kloseb9621712010-04-24 17:59:49 +000015755$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015756
15757fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015758rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015759
15760fi
15761
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15763$as_echo_n "checking for append_history in -lreadline... " >&6; }
15764if ${ac_cv_lib_readline_append_history+:} false; then :
15765 $as_echo_n "(cached) " >&6
15766else
15767 ac_check_lib_save_LIBS=$LIBS
15768LIBS="-lreadline $READLINE_LIBS $LIBS"
15769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15770/* end confdefs.h. */
15771
15772/* Override any GCC internal prototype to avoid an error.
15773 Use char because int might match the return type of a GCC
15774 builtin and then its argument prototype would still apply. */
15775#ifdef __cplusplus
15776extern "C"
15777#endif
15778char append_history ();
15779int
15780main ()
15781{
15782return append_history ();
15783 ;
15784 return 0;
15785}
15786_ACEOF
15787if ac_fn_c_try_link "$LINENO"; then :
15788 ac_cv_lib_readline_append_history=yes
15789else
15790 ac_cv_lib_readline_append_history=no
15791fi
15792rm -f core conftest.err conftest.$ac_objext \
15793 conftest$ac_exeext conftest.$ac_ext
15794LIBS=$ac_check_lib_save_LIBS
15795fi
15796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15797$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15798if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15799
15800$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15801
15802fi
15803
15804
Martin v. Löwis82bca632006-02-10 20:49:30 +000015805# End of readline checks: restore LIBS
15806LIBS=$LIBS_no_readline
15807
Matthias Kloseb9621712010-04-24 17:59:49 +000015808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15809$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015810if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015812else
Martin v. Löwis11437992002-04-12 09:54:03 +000015813
Matthias Kloseb9621712010-04-24 17:59:49 +000015814if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015815 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015816else
Matthias Kloseb9621712010-04-24 17:59:49 +000015817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015818/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015819
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015820#include <stdlib.h>
15821#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015822int main()
15823{
15824 int val1 = nice(1);
15825 if (val1 != -1 && val1 == nice(2))
15826 exit(0);
15827 exit(1);
15828}
15829
Martin v. Löwis11437992002-04-12 09:54:03 +000015830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015831if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015832 ac_cv_broken_nice=yes
15833else
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015838fi
15839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840fi
15841
Matthias Kloseb9621712010-04-24 17:59:49 +000015842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15843$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015844if test "$ac_cv_broken_nice" = yes
15845then
Martin v. Löwis11437992002-04-12 09:54:03 +000015846
Matthias Kloseb9621712010-04-24 17:59:49 +000015847$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015848
15849fi
15850
Matthias Kloseb9621712010-04-24 17:59:49 +000015851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15852$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015853if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015855else
Matthias Kloseb9621712010-04-24 17:59:49 +000015856 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015857 ac_cv_broken_poll=no
15858else
Matthias Kloseb9621712010-04-24 17:59:49 +000015859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015860/* end confdefs.h. */
15861
15862#include <poll.h>
15863
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015864int main()
15865{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015866 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015867 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015868
15869 close (42);
15870
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015871 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015872 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015873 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015874 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015875 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015876 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015877 return 1;
15878}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015879
15880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015881if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015882 ac_cv_broken_poll=yes
15883else
Matthias Kloseb9621712010-04-24 17:59:49 +000015884 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15887 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015890fi
15891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15893$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015894if test "$ac_cv_broken_poll" = yes
15895then
15896
Matthias Kloseb9621712010-04-24 17:59:49 +000015897$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015898
15899fi
15900
Martin v. Löwis1d459062005-03-14 21:23:33 +000015901# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15903$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015904if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015905 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015906else
15907
Matthias Kloseb9621712010-04-24 17:59:49 +000015908if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015909 ac_cv_working_tzset=no
15910else
Matthias Kloseb9621712010-04-24 17:59:49 +000015911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015912/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015913
15914#include <stdlib.h>
15915#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015916#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015917
15918#if HAVE_TZNAME
15919extern char *tzname[];
15920#endif
15921
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015922int main()
15923{
Brett Cannon18367812003-09-19 00:59:16 +000015924 /* Note that we need to ensure that not only does tzset(3)
15925 do 'something' with localtime, but it works as documented
15926 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015927 This includes making sure that tzname is set properly if
15928 tm->tm_zone does not exist since it is the alternative way
15929 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015930
15931 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015932 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015933 */
15934
Martin v. Löwis1d459062005-03-14 21:23:33 +000015935 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015936 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15937
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015938 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015939 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015940 if (localtime(&groundhogday)->tm_hour != 0)
15941 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015942#if HAVE_TZNAME
15943 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15944 if (strcmp(tzname[0], "UTC") ||
15945 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15946 exit(1);
15947#endif
Brett Cannon18367812003-09-19 00:59:16 +000015948
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015949 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015950 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015951 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015952 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015953#if HAVE_TZNAME
15954 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15955 exit(1);
15956#endif
Brett Cannon18367812003-09-19 00:59:16 +000015957
15958 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15959 tzset();
15960 if (localtime(&groundhogday)->tm_hour != 11)
15961 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015962#if HAVE_TZNAME
15963 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15964 exit(1);
15965#endif
15966
15967#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015968 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15969 exit(1);
15970 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15971 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015972#endif
Brett Cannon18367812003-09-19 00:59:16 +000015973
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015974 exit(0);
15975}
15976
15977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015978if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015979 ac_cv_working_tzset=yes
15980else
Matthias Kloseb9621712010-04-24 17:59:49 +000015981 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015985fi
15986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987fi
15988
Matthias Kloseb9621712010-04-24 17:59:49 +000015989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15990$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015991if test "$ac_cv_working_tzset" = yes
15992then
15993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015995
15996fi
15997
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015998# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16000$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016001if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016003else
Matthias Kloseb9621712010-04-24 17:59:49 +000016004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016005/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016006#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016007int
16008main ()
16009{
16010
16011struct stat st;
16012st.st_mtim.tv_nsec = 1;
16013
16014 ;
16015 return 0;
16016}
16017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016019 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016020else
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16024fi
16025
Matthias Kloseb9621712010-04-24 17:59:49 +000016026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16027$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016028if test "$ac_cv_stat_tv_nsec" = yes
16029then
16030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016032
16033fi
16034
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016035# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16037$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016038if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016039 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016040else
Matthias Kloseb9621712010-04-24 17:59:49 +000016041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016042/* end confdefs.h. */
16043#include <sys/stat.h>
16044int
16045main ()
16046{
16047
16048struct stat st;
16049st.st_mtimespec.tv_nsec = 1;
16050
16051 ;
16052 return 0;
16053}
16054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016055if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016056 ac_cv_stat_tv_nsec2=yes
16057else
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16061fi
16062
Matthias Kloseb9621712010-04-24 17:59:49 +000016063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16064$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016065if test "$ac_cv_stat_tv_nsec2" = yes
16066then
16067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016069
16070fi
16071
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016072# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016073ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016074if test "$cross_compiling" = no; then
16075 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16076fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016077
16078for ac_header in curses.h ncurses.h
16079do :
16080 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16081ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16082if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16083 cat >>confdefs.h <<_ACEOF
16084#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16085_ACEOF
16086
16087fi
16088
16089done
16090
16091
16092# On Solaris, term.h requires curses.h
16093for ac_header in term.h
16094do :
16095 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16096#ifdef HAVE_CURSES_H
16097#include <curses.h>
16098#endif
16099
16100"
16101if test "x$ac_cv_header_term_h" = xyes; then :
16102 cat >>confdefs.h <<_ACEOF
16103#define HAVE_TERM_H 1
16104_ACEOF
16105
16106fi
16107
16108done
16109
16110
Jack Jansen666b1e72001-10-31 12:11:48 +000016111# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16113$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016114if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016116else
Matthias Kloseb9621712010-04-24 17:59:49 +000016117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016118/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016119#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016120int
16121main ()
16122{
Jack Jansen666b1e72001-10-31 12:11:48 +000016123
16124 int rtn;
16125 rtn = mvwdelch(0,0,0);
16126
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 ;
16128 return 0;
16129}
16130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016131if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016132 ac_cv_mvwdelch_is_expression=yes
16133else
Matthias Kloseb9621712010-04-24 17:59:49 +000016134 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16137fi
16138
Matthias Kloseb9621712010-04-24 17:59:49 +000016139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16140$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016141
16142if test "$ac_cv_mvwdelch_is_expression" = yes
16143then
Martin v. Löwis11437992002-04-12 09:54:03 +000016144
Matthias Kloseb9621712010-04-24 17:59:49 +000016145$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016146
16147fi
16148
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016149# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16150# structs since version 5.7. If the macro is defined as zero before including
16151# [n]curses.h, ncurses will expose fields of the structs regardless of the
16152# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16154$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016155if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016156 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016157else
Matthias Kloseb9621712010-04-24 17:59:49 +000016158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016159/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016160
16161 #define NCURSES_OPAQUE 0
16162 #include <curses.h>
16163
Martin v. Löwis11437992002-04-12 09:54:03 +000016164int
16165main ()
16166{
Jack Jansen666b1e72001-10-31 12:11:48 +000016167
16168 WINDOW *w;
16169 w->_flags = 0;
16170
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 ;
16172 return 0;
16173}
16174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016175if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016176 ac_cv_window_has_flags=yes
16177else
Matthias Kloseb9621712010-04-24 17:59:49 +000016178 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16181fi
16182
Matthias Kloseb9621712010-04-24 17:59:49 +000016183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16184$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016185
Jack Jansen666b1e72001-10-31 12:11:48 +000016186
16187if test "$ac_cv_window_has_flags" = yes
16188then
Martin v. Löwis11437992002-04-12 09:54:03 +000016189
Matthias Kloseb9621712010-04-24 17:59:49 +000016190$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016191
16192fi
16193
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16195$as_echo_n "checking for is_pad... " >&6; }
16196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16197/* end confdefs.h. */
16198#include <curses.h>
16199int
16200main ()
16201{
16202
16203#ifndef is_pad
16204void *x=is_pad
16205#endif
16206
16207 ;
16208 return 0;
16209}
16210_ACEOF
16211if ac_fn_c_try_compile "$LINENO"; then :
16212
16213$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16214
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16216$as_echo "yes" >&6; }
16217else
16218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16219$as_echo "no" >&6; }
16220
16221fi
16222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16223
Matthias Kloseb9621712010-04-24 17:59:49 +000016224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16225$as_echo_n "checking for is_term_resized... " >&6; }
16226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016227/* end confdefs.h. */
16228#include <curses.h>
16229int
16230main ()
16231{
16232void *x=is_term_resized
16233 ;
16234 return 0;
16235}
16236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016238
Matthias Kloseb9621712010-04-24 17:59:49 +000016239$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016240
Matthias Kloseb159a552010-04-25 21:00:44 +000016241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016242$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016243else
Matthias Kloseb9621712010-04-24 17:59:49 +000016244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16245$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016246
16247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16249
Matthias Kloseb9621712010-04-24 17:59:49 +000016250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16251$as_echo_n "checking for resize_term... " >&6; }
16252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016253/* end confdefs.h. */
16254#include <curses.h>
16255int
16256main ()
16257{
16258void *x=resize_term
16259 ;
16260 return 0;
16261}
16262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016263if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016264
Matthias Kloseb9621712010-04-24 17:59:49 +000016265$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016266
Matthias Kloseb159a552010-04-25 21:00:44 +000016267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016268$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016269else
Matthias Kloseb9621712010-04-24 17:59:49 +000016270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16271$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016272
16273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16275
Matthias Kloseb9621712010-04-24 17:59:49 +000016276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16277$as_echo_n "checking for resizeterm... " >&6; }
16278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016279/* end confdefs.h. */
16280#include <curses.h>
16281int
16282main ()
16283{
16284void *x=resizeterm
16285 ;
16286 return 0;
16287}
16288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016289if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016290
Matthias Kloseb9621712010-04-24 17:59:49 +000016291$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016292
Matthias Kloseb159a552010-04-25 21:00:44 +000016293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016294$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016295else
Matthias Kloseb9621712010-04-24 17:59:49 +000016296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16297$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016298
16299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016301
16302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16303$as_echo_n "checking for immedok... " >&6; }
16304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16305/* end confdefs.h. */
16306#include <curses.h>
16307int
16308main ()
16309{
16310
16311#ifndef immedok
16312void *x=immedok
16313#endif
16314
16315 ;
16316 return 0;
16317}
16318_ACEOF
16319if ac_fn_c_try_compile "$LINENO"; then :
16320
16321$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16322
16323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16324$as_echo "yes" >&6; }
16325else
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16327$as_echo "no" >&6; }
16328
16329fi
16330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16331
16332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16333$as_echo_n "checking for syncok... " >&6; }
16334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16335/* end confdefs.h. */
16336#include <curses.h>
16337int
16338main ()
16339{
16340
16341#ifndef syncok
16342void *x=syncok
16343#endif
16344
16345 ;
16346 return 0;
16347}
16348_ACEOF
16349if ac_fn_c_try_compile "$LINENO"; then :
16350
16351$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16352
16353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16354$as_echo "yes" >&6; }
16355else
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16357$as_echo "no" >&6; }
16358
16359fi
16360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16361
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16363$as_echo_n "checking for wchgat... " >&6; }
16364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16365/* end confdefs.h. */
16366#include <curses.h>
16367int
16368main ()
16369{
16370
16371#ifndef wchgat
16372void *x=wchgat
16373#endif
16374
16375 ;
16376 return 0;
16377}
16378_ACEOF
16379if ac_fn_c_try_compile "$LINENO"; then :
16380
16381$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16382
16383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16384$as_echo "yes" >&6; }
16385else
16386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16387$as_echo "no" >&6; }
16388
16389fi
16390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16391
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16393$as_echo_n "checking for filter... " >&6; }
16394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395/* end confdefs.h. */
16396#include <curses.h>
16397int
16398main ()
16399{
16400
16401#ifndef filter
16402void *x=filter
16403#endif
16404
16405 ;
16406 return 0;
16407}
16408_ACEOF
16409if ac_fn_c_try_compile "$LINENO"; then :
16410
16411$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16412
16413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16414$as_echo "yes" >&6; }
16415else
16416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16417$as_echo "no" >&6; }
16418
16419fi
16420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16421
16422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16423$as_echo_n "checking for has_key... " >&6; }
16424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16425/* end confdefs.h. */
16426#include <curses.h>
16427int
16428main ()
16429{
16430
16431#ifndef has_key
16432void *x=has_key
16433#endif
16434
16435 ;
16436 return 0;
16437}
16438_ACEOF
16439if ac_fn_c_try_compile "$LINENO"; then :
16440
16441$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16442
16443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16444$as_echo "yes" >&6; }
16445else
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16447$as_echo "no" >&6; }
16448
16449fi
16450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16451
16452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16453$as_echo_n "checking for typeahead... " >&6; }
16454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16455/* end confdefs.h. */
16456#include <curses.h>
16457int
16458main ()
16459{
16460
16461#ifndef typeahead
16462void *x=typeahead
16463#endif
16464
16465 ;
16466 return 0;
16467}
16468_ACEOF
16469if ac_fn_c_try_compile "$LINENO"; then :
16470
16471$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16472
16473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16474$as_echo "yes" >&6; }
16475else
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16477$as_echo "no" >&6; }
16478
16479fi
16480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16481
16482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16483$as_echo_n "checking for use_env... " >&6; }
16484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16485/* end confdefs.h. */
16486#include <curses.h>
16487int
16488main ()
16489{
16490
16491#ifndef use_env
16492void *x=use_env
16493#endif
16494
16495 ;
16496 return 0;
16497}
16498_ACEOF
16499if ac_fn_c_try_compile "$LINENO"; then :
16500
16501$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16502
16503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16504$as_echo "yes" >&6; }
16505else
16506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16507$as_echo "no" >&6; }
16508
16509fi
16510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016511# last curses configure check
16512CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16515$as_echo "$as_me: checking for device files" >&6;}
16516
16517if test "x$cross_compiling" = xyes; then
16518 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16520$as_echo_n "checking for /dev/ptmx... " >&6; }
16521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16522$as_echo "not set" >&6; }
16523 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16524 fi
16525 if test "${ac_cv_file__dev_ptc+set}" != set; then
16526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16527$as_echo_n "checking for /dev/ptc... " >&6; }
16528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16529$as_echo "not set" >&6; }
16530 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16531 fi
16532fi
16533
Matthias Kloseb9621712010-04-24 17:59:49 +000016534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16535$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016536if ${ac_cv_file__dev_ptmx+:} false; then :
16537 $as_echo_n "(cached) " >&6
16538else
16539 test "$cross_compiling" = yes &&
16540 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16541if test -r "/dev/ptmx"; then
16542 ac_cv_file__dev_ptmx=yes
16543else
16544 ac_cv_file__dev_ptmx=no
16545fi
16546fi
16547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16548$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16549if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016550
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016551fi
16552
16553if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016554
Matthias Kloseb9621712010-04-24 17:59:49 +000016555$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016556
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16559$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016560if ${ac_cv_file__dev_ptc+:} false; then :
16561 $as_echo_n "(cached) " >&6
16562else
16563 test "$cross_compiling" = yes &&
16564 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16565if test -r "/dev/ptc"; then
16566 ac_cv_file__dev_ptc=yes
16567else
16568 ac_cv_file__dev_ptc=no
16569fi
16570fi
16571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16572$as_echo "$ac_cv_file__dev_ptc" >&6; }
16573if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016574
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016575fi
16576
16577if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016578
Matthias Kloseb9621712010-04-24 17:59:49 +000016579$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016580
Neal Norwitz865400f2003-03-21 01:42:58 +000016581fi
16582
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016583if test $ac_sys_system = Darwin
16584then
16585 LIBS="$LIBS -framework CoreFoundation"
16586fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016587
Matthias Kloseb9621712010-04-24 17:59:49 +000016588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16589$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016590if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016591 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016592else
Matthias Kloseb9621712010-04-24 17:59:49 +000016593 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016594 ac_cv_have_size_t_format="cross -- assuming yes"
16595
Thomas Wouters477c8d52006-05-27 19:21:47 +000016596else
Matthias Kloseb9621712010-04-24 17:59:49 +000016597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016598/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016599
Thomas Wouters477c8d52006-05-27 19:21:47 +000016600#include <stdio.h>
16601#include <stddef.h>
16602#include <string.h>
16603
Christian Heimes2c181612007-12-17 20:04:13 +000016604#ifdef HAVE_SYS_TYPES_H
16605#include <sys/types.h>
16606#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016607
16608#ifdef HAVE_SSIZE_T
16609typedef ssize_t Py_ssize_t;
16610#elif SIZEOF_VOID_P == SIZEOF_LONG
16611typedef long Py_ssize_t;
16612#else
16613typedef int Py_ssize_t;
16614#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016615
Christian Heimes2c181612007-12-17 20:04:13 +000016616int main()
16617{
16618 char buffer[256];
16619
Thomas Wouters477c8d52006-05-27 19:21:47 +000016620 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16621 return 1;
16622
Thomas Wouters89f507f2006-12-13 04:49:30 +000016623 if (strcmp(buffer, "123"))
16624 return 1;
16625
16626 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16627 return 1;
16628
16629 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016630 return 1;
16631
16632 return 0;
16633}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016634
Thomas Wouters477c8d52006-05-27 19:21:47 +000016635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016636if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016637 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016638else
Matthias Kloseb9621712010-04-24 17:59:49 +000016639 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16642 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016643fi
16644
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16647$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016648if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016649
Matthias Kloseb9621712010-04-24 17:59:49 +000016650$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016651
16652fi
16653
Matthias Kloseb9621712010-04-24 17:59:49 +000016654ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016655#ifdef HAVE_SYS_TYPES_H
16656#include <sys/types.h>
16657#endif
16658#ifdef HAVE_SYS_SOCKET_H
16659#include <sys/socket.h>
16660#endif
16661
Matthias Kloseb9621712010-04-24 17:59:49 +000016662"
Victor Stinnere0be4232011-10-25 13:06:09 +020016663if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016664
Martin v. Löwis11437992002-04-12 09:54:03 +000016665else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016666
Matthias Kloseb9621712010-04-24 17:59:49 +000016667$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016668
16669fi
16670
Michael W. Hudson54241132001-12-07 15:38:26 +000016671
Matthias Kloseb9621712010-04-24 17:59:49 +000016672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16673$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016674if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016676else
Matthias Kloseb9621712010-04-24 17:59:49 +000016677 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016678 ac_cv_broken_mbstowcs=no
16679else
Matthias Kloseb9621712010-04-24 17:59:49 +000016680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016681/* end confdefs.h. */
16682
Stefan Krah19c21392012-11-22 23:47:32 +010016683#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016684#include<stdlib.h>
16685int main() {
16686 size_t len = -1;
16687 const char *str = "text";
16688 len = mbstowcs(NULL, str, 0);
16689 return (len != 4);
16690}
16691
16692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016693if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016694 ac_cv_broken_mbstowcs=no
16695else
Matthias Kloseb9621712010-04-24 17:59:49 +000016696 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16699 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016700fi
16701
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016702fi
16703
Matthias Kloseb9621712010-04-24 17:59:49 +000016704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16705$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016706if test "$ac_cv_broken_mbstowcs" = yes
16707then
16708
Matthias Kloseb9621712010-04-24 17:59:49 +000016709$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016710
16711fi
16712
Antoine Pitroub52ec782009-01-25 16:34:23 +000016713# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16715$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016716
16717# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016718if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016719 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016720if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016721then
16722
Matthias Kloseb9621712010-04-24 17:59:49 +000016723$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016724
Matthias Kloseb9621712010-04-24 17:59:49 +000016725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16726$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016727fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016728if test "$withval" = no
16729then
16730
16731$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16732
Matthias Kloseb9621712010-04-24 17:59:49 +000016733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16734$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016735fi
16736
Antoine Pitrou042b1282010-08-13 21:15:58 +000016737else
16738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16739$as_echo "no value specified" >&6; }
16740fi
16741
Antoine Pitroub52ec782009-01-25 16:34:23 +000016742
Matthias Kloseb17289e2012-03-15 19:51:34 +010016743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16744$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16745if ${ac_cv_computed_gotos+:} false; then :
16746 $as_echo_n "(cached) " >&6
16747else
16748 if test "$cross_compiling" = yes; then :
16749 if test "${with_computed_gotos+set}" = set; then
16750 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16751 else
16752 ac_cv_computed_gotos=no
16753 fi
16754else
16755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16756/* end confdefs.h. */
16757
16758int main(int argc, char **argv)
16759{
16760 static void *targets[1] = { &&LABEL1 };
16761 goto LABEL2;
16762LABEL1:
16763 return 0;
16764LABEL2:
16765 goto *targets[0];
16766 return 1;
16767}
16768
16769_ACEOF
16770if ac_fn_c_try_run "$LINENO"; then :
16771 ac_cv_computed_gotos=yes
16772else
16773 ac_cv_computed_gotos=no
16774fi
16775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16776 conftest.$ac_objext conftest.beam conftest.$ac_ext
16777fi
16778
16779fi
16780
16781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16782$as_echo "$ac_cv_computed_gotos" >&6; }
16783case "$ac_cv_computed_gotos" in yes*)
16784
16785$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16786
16787esac
16788
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016789case $ac_sys_system in
16790AIX*)
16791
16792$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16793 ;;
16794esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016795
Michael W. Hudson54241132001-12-07 15:38:26 +000016796
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016797
16798
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016799for h in `(cd $srcdir;echo Python/thread_*.h)`
16800do
16801 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16802done
16803
Michael W. Hudson54241132001-12-07 15:38:26 +000016804
Pablo Galindoa25f3c42020-04-23 01:38:11 +010016805SRCDIRS="Parser Parser/pegen Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16807$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016808for dir in $SRCDIRS; do
16809 if test ! -d $dir; then
16810 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016811 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016812done
Matthias Kloseb9621712010-04-24 17:59:49 +000016813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16814$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016815
Stefan Krah1919b7e2012-03-21 18:25:23 +010016816# Availability of -O2:
16817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16818$as_echo_n "checking for -O2... " >&6; }
16819saved_cflags="$CFLAGS"
16820CFLAGS="-O2"
16821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16822/* end confdefs.h. */
16823
16824int
16825main ()
16826{
16827
16828
16829 ;
16830 return 0;
16831}
16832_ACEOF
16833if ac_fn_c_try_compile "$LINENO"; then :
16834 have_O2=yes
16835else
16836 have_O2=no
16837fi
16838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16840$as_echo "$have_O2" >&6; }
16841CFLAGS="$saved_cflags"
16842
16843# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16844# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16846$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16847saved_cflags="$CFLAGS"
16848CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16849if test "$have_O2" = no; then
16850 CFLAGS=""
16851fi
16852if test "$cross_compiling" = yes; then :
16853 have_glibc_memmove_bug=undefined
16854else
16855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16856/* end confdefs.h. */
16857
16858#include <stdio.h>
16859#include <stdlib.h>
16860#include <string.h>
16861void foo(void *p, void *q) { memmove(p, q, 19); }
16862int main() {
16863 char a[32] = "123456789000000000";
16864 foo(&a[9], a);
16865 if (strcmp(a, "123456789123456789000000000") != 0)
16866 return 1;
16867 foo(a, &a[9]);
16868 if (strcmp(a, "123456789000000000") != 0)
16869 return 1;
16870 return 0;
16871}
16872
16873_ACEOF
16874if ac_fn_c_try_run "$LINENO"; then :
16875 have_glibc_memmove_bug=no
16876else
16877 have_glibc_memmove_bug=yes
16878fi
16879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16880 conftest.$ac_objext conftest.beam conftest.$ac_ext
16881fi
16882
16883CFLAGS="$saved_cflags"
16884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16885$as_echo "$have_glibc_memmove_bug" >&6; }
16886if test "$have_glibc_memmove_bug" = yes; then
16887
16888$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16889
16890fi
16891
16892if test "$have_gcc_asm_for_x87" = yes; then
16893 # Some versions of gcc miscompile inline asm:
16894 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16895 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16896 case $CC in
16897 *gcc*)
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16899$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16900 saved_cflags="$CFLAGS"
16901 CFLAGS="-O2"
16902 if test "$cross_compiling" = yes; then :
16903 have_ipa_pure_const_bug=undefined
16904else
16905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16906/* end confdefs.h. */
16907
16908 __attribute__((noinline)) int
16909 foo(int *p) {
16910 int r;
16911 asm ( "movl \$6, (%1)\n\t"
16912 "xorl %0, %0\n\t"
16913 : "=r" (r) : "r" (p) : "memory"
16914 );
16915 return r;
16916 }
16917 int main() {
16918 int p = 8;
16919 if ((foo(&p) ? : p) != 6)
16920 return 1;
16921 return 0;
16922 }
16923
16924_ACEOF
16925if ac_fn_c_try_run "$LINENO"; then :
16926 have_ipa_pure_const_bug=no
16927else
16928 have_ipa_pure_const_bug=yes
16929fi
16930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16931 conftest.$ac_objext conftest.beam conftest.$ac_ext
16932fi
16933
16934 CFLAGS="$saved_cflags"
16935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16936$as_echo "$have_ipa_pure_const_bug" >&6; }
16937 if test "$have_ipa_pure_const_bug" = yes; then
16938
16939$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16940
16941 fi
16942 ;;
16943 esac
16944fi
16945
Victor Stinner4f5366e2015-01-09 02:13:19 +010016946# Check for stdatomic.h
16947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16948$as_echo_n "checking for stdatomic.h... " >&6; }
16949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16950/* end confdefs.h. */
16951
16952
16953 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016954 atomic_int int_var;
16955 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016956 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016957 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16958 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16959 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016960 return 0;
16961 }
16962
16963
16964_ACEOF
16965if ac_fn_c_try_link "$LINENO"; then :
16966 have_stdatomic_h=yes
16967else
16968 have_stdatomic_h=no
16969fi
16970rm -f core conftest.err conftest.$ac_objext \
16971 conftest$ac_exeext conftest.$ac_ext
16972
16973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16974$as_echo "$have_stdatomic_h" >&6; }
16975
16976if test "$have_stdatomic_h" = yes; then
16977
16978$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16979
16980fi
16981
16982# Check for GCC >= 4.7 __atomic builtins
16983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16984$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16986/* end confdefs.h. */
16987
16988
16989 volatile int val = 1;
16990 int main() {
16991 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16992 return 0;
16993 }
16994
16995
16996_ACEOF
16997if ac_fn_c_try_link "$LINENO"; then :
16998 have_builtin_atomic=yes
16999else
17000 have_builtin_atomic=no
17001fi
17002rm -f core conftest.err conftest.$ac_objext \
17003 conftest$ac_exeext conftest.$ac_ext
17004
17005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17006$as_echo "$have_builtin_atomic" >&6; }
17007
17008if test "$have_builtin_atomic" = yes; then
17009
17010$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17011
17012fi
17013
Ned Deily322f5ba2013-11-21 23:01:59 -080017014# ensurepip option
17015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17016$as_echo_n "checking for ensurepip... " >&6; }
17017
17018# Check whether --with-ensurepip was given.
17019if test "${with_ensurepip+set}" = set; then :
17020 withval=$with_ensurepip;
17021else
17022 with_ensurepip=upgrade
17023fi
17024
17025case $with_ensurepip in #(
17026 yes|upgrade) :
17027 ENSUREPIP=upgrade ;; #(
17028 install) :
17029 ENSUREPIP=install ;; #(
17030 no) :
17031 ENSUREPIP=no ;; #(
17032 *) :
17033 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17034esac
17035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17036$as_echo "$ENSUREPIP" >&6; }
17037
17038
Victor Stinner35a97c02015-03-08 02:59:09 +010017039# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17041$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17043/* end confdefs.h. */
17044
17045
17046 #include <dirent.h>
17047
17048 int main() {
17049 struct dirent entry;
17050 return entry.d_type == DT_UNKNOWN;
17051 }
17052
17053
17054_ACEOF
17055if ac_fn_c_try_link "$LINENO"; then :
17056 have_dirent_d_type=yes
17057else
17058 have_dirent_d_type=no
17059fi
17060rm -f core conftest.err conftest.$ac_objext \
17061 conftest$ac_exeext conftest.$ac_ext
17062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17063$as_echo "$have_dirent_d_type" >&6; }
17064
17065if test "$have_dirent_d_type" = yes; then
17066
17067$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17068
17069fi
17070
Victor Stinner9eb57c52015-03-19 22:21:49 +010017071# check if the Linux getrandom() syscall is available
17072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17073$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17075/* end confdefs.h. */
17076
17077
Victor Stinner1b80b242016-04-12 22:34:58 +020017078 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017079 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017080 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017081
17082 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017083 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017084 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017085 const int flags = GRND_NONBLOCK;
17086 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017087 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017088 return 0;
17089 }
17090
17091
17092_ACEOF
17093if ac_fn_c_try_link "$LINENO"; then :
17094 have_getrandom_syscall=yes
17095else
17096 have_getrandom_syscall=no
17097fi
17098rm -f core conftest.err conftest.$ac_objext \
17099 conftest$ac_exeext conftest.$ac_ext
17100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17101$as_echo "$have_getrandom_syscall" >&6; }
17102
17103if test "$have_getrandom_syscall" = yes; then
17104
17105$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17106
17107fi
17108
Victor Stinner3abf44e2015-09-18 15:38:37 +020017109# check if the getrandom() function is available
17110# the test was written for the Solaris function of <sys/random.h>
17111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17112$as_echo_n "checking for the getrandom() function... " >&6; }
17113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17114/* end confdefs.h. */
17115
17116
17117 #include <sys/random.h>
17118
17119 int main() {
17120 char buffer[1];
17121 const size_t buflen = sizeof(buffer);
17122 const int flags = 0;
17123 /* ignore the result, Python checks for ENOSYS at runtime */
17124 (void)getrandom(buffer, buflen, flags);
17125 return 0;
17126 }
17127
17128
17129_ACEOF
17130if ac_fn_c_try_link "$LINENO"; then :
17131 have_getrandom=yes
17132else
17133 have_getrandom=no
17134fi
17135rm -f core conftest.err conftest.$ac_objext \
17136 conftest$ac_exeext conftest.$ac_ext
17137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17138$as_echo "$have_getrandom" >&6; }
17139
17140if test "$have_getrandom" = yes; then
17141
17142$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17143
17144fi
17145
Neil Schemenauer5741c452019-02-08 10:48:46 -080017146# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17147# shm_* may only be available if linking against librt
17148save_LIBS="$LIBS"
17149save_includes_default="$ac_includes_default"
17150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17151$as_echo_n "checking for library containing shm_open... " >&6; }
17152if ${ac_cv_search_shm_open+:} false; then :
17153 $as_echo_n "(cached) " >&6
17154else
17155 ac_func_search_save_LIBS=$LIBS
17156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17157/* end confdefs.h. */
17158
17159/* Override any GCC internal prototype to avoid an error.
17160 Use char because int might match the return type of a GCC
17161 builtin and then its argument prototype would still apply. */
17162#ifdef __cplusplus
17163extern "C"
17164#endif
17165char shm_open ();
17166int
17167main ()
17168{
17169return shm_open ();
17170 ;
17171 return 0;
17172}
17173_ACEOF
17174for ac_lib in '' rt; do
17175 if test -z "$ac_lib"; then
17176 ac_res="none required"
17177 else
17178 ac_res=-l$ac_lib
17179 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17180 fi
17181 if ac_fn_c_try_link "$LINENO"; then :
17182 ac_cv_search_shm_open=$ac_res
17183fi
17184rm -f core conftest.err conftest.$ac_objext \
17185 conftest$ac_exeext
17186 if ${ac_cv_search_shm_open+:} false; then :
17187 break
17188fi
17189done
17190if ${ac_cv_search_shm_open+:} false; then :
17191
17192else
17193 ac_cv_search_shm_open=no
17194fi
17195rm conftest.$ac_ext
17196LIBS=$ac_func_search_save_LIBS
17197fi
17198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17199$as_echo "$ac_cv_search_shm_open" >&6; }
17200ac_res=$ac_cv_search_shm_open
17201if test "$ac_res" != no; then :
17202 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17203
17204fi
17205
17206if test "$ac_cv_search_shm_open" = "-lrt"; then
17207
17208$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17209
17210fi
17211for ac_header in sys/mman.h
17212do :
17213 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17214if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17215 cat >>confdefs.h <<_ACEOF
17216#define HAVE_SYS_MMAN_H 1
17217_ACEOF
17218
17219fi
17220
17221done
17222
17223# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17224ac_includes_default="\
17225${ac_includes_default}
17226#ifndef __cplusplus
17227# ifdef HAVE_SYS_MMAN_H
17228# include <sys/mman.h>
17229# endif
17230#endif
17231"
17232for ac_func in shm_open shm_unlink
17233do :
17234 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17235ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17236if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17237 cat >>confdefs.h <<_ACEOF
17238#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17239_ACEOF
17240
17241fi
17242done
17243
17244# we don't want to link with librt always, restore LIBS
17245LIBS="$save_LIBS"
17246ac_includes_default="$save_includes_default"
17247
Christian Heimesff5be6e2018-01-20 13:19:21 +010017248# Check for usable OpenSSL
17249
17250 found=false
17251
17252# Check whether --with-openssl was given.
17253if test "${with_openssl+set}" = set; then :
17254 withval=$with_openssl;
17255 case "$withval" in
17256 "" | y | ye | yes | n | no)
17257 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17258 ;;
17259 *) ssldirs="$withval"
17260 ;;
17261 esac
17262
17263else
17264
17265 # if pkg-config is installed and openssl has installed a .pc file,
17266 # then use that information and don't search ssldirs
17267 if test -n "$ac_tool_prefix"; then
17268 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17269set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17271$as_echo_n "checking for $ac_word... " >&6; }
17272if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17273 $as_echo_n "(cached) " >&6
17274else
17275 if test -n "$PKG_CONFIG"; then
17276 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17277else
17278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17279for as_dir in $PATH
17280do
17281 IFS=$as_save_IFS
17282 test -z "$as_dir" && as_dir=.
17283 for ac_exec_ext in '' $ac_executable_extensions; do
17284 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17285 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17287 break 2
17288 fi
17289done
17290 done
17291IFS=$as_save_IFS
17292
17293fi
17294fi
17295PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17296if test -n "$PKG_CONFIG"; then
17297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17298$as_echo "$PKG_CONFIG" >&6; }
17299else
17300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17301$as_echo "no" >&6; }
17302fi
17303
17304
17305fi
17306if test -z "$ac_cv_prog_PKG_CONFIG"; then
17307 ac_ct_PKG_CONFIG=$PKG_CONFIG
17308 # Extract the first word of "pkg-config", so it can be a program name with args.
17309set dummy pkg-config; ac_word=$2
17310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17311$as_echo_n "checking for $ac_word... " >&6; }
17312if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17313 $as_echo_n "(cached) " >&6
17314else
17315 if test -n "$ac_ct_PKG_CONFIG"; then
17316 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17317else
17318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17319for as_dir in $PATH
17320do
17321 IFS=$as_save_IFS
17322 test -z "$as_dir" && as_dir=.
17323 for ac_exec_ext in '' $ac_executable_extensions; do
17324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17325 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17327 break 2
17328 fi
17329done
17330 done
17331IFS=$as_save_IFS
17332
17333fi
17334fi
17335ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17336if test -n "$ac_ct_PKG_CONFIG"; then
17337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17338$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17339else
17340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17341$as_echo "no" >&6; }
17342fi
17343
17344 if test "x$ac_ct_PKG_CONFIG" = x; then
17345 PKG_CONFIG=""
17346 else
17347 case $cross_compiling:$ac_tool_warned in
17348yes:)
17349{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17350$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17351ac_tool_warned=yes ;;
17352esac
17353 PKG_CONFIG=$ac_ct_PKG_CONFIG
17354 fi
17355else
17356 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17357fi
17358
17359 if test x"$PKG_CONFIG" != x""; then
17360 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17361 if test $? = 0; then
17362 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17363 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17364 found=true
17365 fi
17366 fi
17367
17368 # no such luck; use some default ssldirs
17369 if ! $found; then
17370 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17371 fi
17372
17373
17374fi
17375
17376
17377
17378 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17379 # an 'openssl' subdirectory
17380
17381 if ! $found; then
17382 OPENSSL_INCLUDES=
17383 for ssldir in $ssldirs; do
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17385$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17386 if test -f "$ssldir/include/openssl/ssl.h"; then
17387 OPENSSL_INCLUDES="-I$ssldir/include"
17388 OPENSSL_LDFLAGS="-L$ssldir/lib"
17389 OPENSSL_LIBS="-lssl -lcrypto"
17390 found=true
17391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17392$as_echo "yes" >&6; }
17393 break
17394 else
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17396$as_echo "no" >&6; }
17397 fi
17398 done
17399
17400 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17401 # it will just work!
17402 fi
17403
17404 # try the preprocessor and linker with our new flags,
17405 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17406
17407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17408$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17409 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17410 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17411
17412 save_LIBS="$LIBS"
17413 save_LDFLAGS="$LDFLAGS"
17414 save_CPPFLAGS="$CPPFLAGS"
17415 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17416 LIBS="$OPENSSL_LIBS $LIBS"
17417 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17419/* end confdefs.h. */
17420#include <openssl/ssl.h>
17421int
17422main ()
17423{
17424SSL_new(NULL)
17425 ;
17426 return 0;
17427}
17428_ACEOF
17429if ac_fn_c_try_link "$LINENO"; then :
17430
17431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17432$as_echo "yes" >&6; }
17433 have_openssl=yes
17434
17435else
17436
17437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17438$as_echo "no" >&6; }
17439 have_openssl=no
17440
17441fi
17442rm -f core conftest.err conftest.$ac_objext \
17443 conftest$ac_exeext conftest.$ac_ext
17444 CPPFLAGS="$save_CPPFLAGS"
17445 LDFLAGS="$save_LDFLAGS"
17446 LIBS="$save_LIBS"
17447
17448
17449
17450
17451
17452
17453if test "$have_openssl" = yes; then
17454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17455$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17456
17457 save_LIBS="$LIBS"
17458 save_LDFLAGS="$LDFLAGS"
17459 save_CPPFLAGS="$CPPFLAGS"
17460 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17461 LIBS="$OPENSSL_LIBS $LIBS"
17462 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17463
17464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17465/* end confdefs.h. */
17466
17467 #include <openssl/x509_vfy.h>
17468
17469int
17470main ()
17471{
17472
17473 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17474 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17475 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17476 X509_VERIFY_PARAM_set_hostflags(p, 0);
17477
17478 ;
17479 return 0;
17480}
17481
17482_ACEOF
17483if ac_fn_c_try_link "$LINENO"; then :
17484
17485 ac_cv_has_x509_verify_param_set1_host=yes
17486
17487else
17488
17489 ac_cv_has_x509_verify_param_set1_host=no
17490
17491fi
17492rm -f core conftest.err conftest.$ac_objext \
17493 conftest$ac_exeext conftest.$ac_ext
17494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17495$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17496 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17497
17498$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17499
17500 fi
17501
17502 CPPFLAGS="$save_CPPFLAGS"
17503 LDFLAGS="$save_LDFLAGS"
17504 LIBS="$save_LIBS"
17505fi
17506
Christian Heimes892d66e2018-01-29 14:10:18 +010017507# ssl module default cipher suite string
17508
17509
17510
17511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17512$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17513
17514# Check whether --with-ssl-default-suites was given.
17515if test "${with_ssl_default_suites+set}" = set; then :
17516 withval=$with_ssl_default_suites;
17517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17518$as_echo "$withval" >&6; }
17519case "$withval" in
17520 python)
17521 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17522
17523 ;;
17524 openssl)
17525 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17526
17527 ;;
17528 *)
17529 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17530
17531 cat >>confdefs.h <<_ACEOF
17532#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17533_ACEOF
17534
17535 ;;
17536esac
17537
17538else
17539
17540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17541$as_echo "python" >&6; }
17542$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17543
17544
17545fi
17546
17547
Christian Heimes9b60e552020-05-15 23:54:53 +020017548# builtin hash modules
17549default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17550
17551$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17552
17553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17554$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17555
17556# Check whether --with-builtin-hashlib-hashes was given.
17557if test "${with_builtin_hashlib_hashes+set}" = set; then :
17558 withval=$with_builtin_hashlib_hashes;
17559case "$withval" in
17560 yes)
17561 withval=$default_hashlib_hashes
17562 ;;
17563 no)
17564 withval=""
17565 ;;
17566esac
17567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17568$as_echo "$withval" >&6; }
17569cat >>confdefs.h <<_ACEOF
17570#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17571_ACEOF
17572
17573
17574else
17575
17576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17577$as_echo "$default_hashlib_hashes" >&6; };
17578cat >>confdefs.h <<_ACEOF
17579#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17580_ACEOF
17581
17582
17583fi
17584
17585
Guido van Rossum627b2d71993-12-24 10:39:16 +000017586# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017587ac_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 +000017588
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017589ac_config_files="$ac_config_files Modules/ld_so_aix"
17590
Martin v. Löwis11437992002-04-12 09:54:03 +000017591cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017592# This file is a shell script that caches the results of configure
17593# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017594# scripts and configure runs, see configure's option --config-cache.
17595# It is not useful on other systems. If it contains results you don't
17596# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017597#
Martin v. Löwis11437992002-04-12 09:54:03 +000017598# config.status only pays attention to the cache file if you give it
17599# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017600#
Skip Montanaro6dead952003-09-25 14:50:04 +000017601# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017602# loading this file, other *unset* `ac_cv_foo' will be assigned the
17603# following values.
17604
17605_ACEOF
17606
Guido van Rossumf78abae1997-01-21 22:02:36 +000017607# The following way of writing the cache mishandles newlines in values,
17608# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017610# Ultrix sh set writes to stderr and can't be redirected directly,
17611# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017612(
17613 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17614 eval ac_val=\$$ac_var
17615 case $ac_val in #(
17616 *${as_nl}*)
17617 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017618 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17619$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620 esac
17621 case $ac_var in #(
17622 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017623 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17624 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625 esac ;;
17626 esac
17627 done
17628
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017630 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17631 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017632 # `set' does not quote correctly, so add quotes: double-quote
17633 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017635 "s/'/'\\\\''/g;
17636 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017637 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 *)
17639 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642 esac |
17643 sort
17644) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017645 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017647 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017649 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17650 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017651 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17652 :end' >>confcache
17653if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17654 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017655 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017656 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17657$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017658 if test ! -f "$cache_file" || test -h "$cache_file"; then
17659 cat confcache >"$cache_file"
17660 else
17661 case $cache_file in #(
17662 */* | ?:*)
17663 mv -f confcache "$cache_file"$$ &&
17664 mv -f "$cache_file"$$ "$cache_file" ;; #(
17665 *)
17666 mv -f confcache "$cache_file" ;;
17667 esac
17668 fi
17669 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017670 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017671 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17672$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017673 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017674fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017675rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017676
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017677test "x$prefix" = xNONE && prefix=$ac_default_prefix
17678# Let make expand exec_prefix.
17679test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017680
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017681DEFS=-DHAVE_CONFIG_H
17682
Skip Montanaro6dead952003-09-25 14:50:04 +000017683ac_libobjs=
17684ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017685U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017686for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17687 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017689 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17691 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017692 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17693 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017694done
17695LIBOBJS=$ac_libobjs
17696
17697LTLIBOBJS=$ac_ltlibobjs
17698
17699
Martin v. Löwis11437992002-04-12 09:54:03 +000017700
Matthias Kloseb9621712010-04-24 17:59:49 +000017701
Victor Stinnere0be4232011-10-25 13:06:09 +020017702: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017703ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017704ac_clean_files_save=$ac_clean_files
17705ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017706{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17707$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17708as_write_fail=0
17709cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017710#! $SHELL
17711# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017712# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017713# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017714# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017715
Martin v. Löwis11437992002-04-12 09:54:03 +000017716debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017717ac_cs_recheck=false
17718ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017719
Matthias Kloseb9621712010-04-24 17:59:49 +000017720SHELL=\${CONFIG_SHELL-$SHELL}
17721export SHELL
17722_ASEOF
17723cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17724## -------------------- ##
17725## M4sh Initialization. ##
17726## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728# Be more Bourne compatible
17729DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017730if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 emulate sh
17732 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017733 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017734 # is contrary to our usage. Disable this feature.
17735 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017737else
Matthias Kloseb9621712010-04-24 17:59:49 +000017738 case `(set -o) 2>/dev/null` in #(
17739 *posix*) :
17740 set -o posix ;; #(
17741 *) :
17742 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017743esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017744fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017745
17746
Matthias Kloseb9621712010-04-24 17:59:49 +000017747as_nl='
17748'
17749export as_nl
17750# Printing a long string crashes Solaris 7 /usr/bin/printf.
17751as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17752as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17753as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17754# Prefer a ksh shell builtin over an external printf program on Solaris,
17755# but without wasting forks for bash or zsh.
17756if test -z "$BASH_VERSION$ZSH_VERSION" \
17757 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17758 as_echo='print -r --'
17759 as_echo_n='print -rn --'
17760elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17761 as_echo='printf %s\n'
17762 as_echo_n='printf %s'
17763else
17764 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17765 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17766 as_echo_n='/usr/ucb/echo -n'
17767 else
17768 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17769 as_echo_n_body='eval
17770 arg=$1;
17771 case $arg in #(
17772 *"$as_nl"*)
17773 expr "X$arg" : "X\\(.*\\)$as_nl";
17774 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17775 esac;
17776 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17777 '
17778 export as_echo_n_body
17779 as_echo_n='sh -c $as_echo_n_body as_echo'
17780 fi
17781 export as_echo_body
17782 as_echo='sh -c $as_echo_body as_echo'
17783fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017784
17785# The user is always right.
17786if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017787 PATH_SEPARATOR=:
17788 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17789 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17790 PATH_SEPARATOR=';'
17791 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794
17795# IFS
17796# We need space, tab and new line, in precisely that order. Quoting is
17797# there to prevent editors from complaining about space-tab.
17798# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17799# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800IFS=" "" $as_nl"
17801
17802# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017803as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017804case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805 *[\\/]* ) as_myself=$0 ;;
17806 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017807for as_dir in $PATH
17808do
17809 IFS=$as_save_IFS
17810 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017811 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17812 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815 ;;
17816esac
17817# We did not find ourselves, most probably we were run as `sh COMMAND'
17818# in which case we are not to be found in the path.
17819if test "x$as_myself" = x; then
17820 as_myself=$0
17821fi
17822if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017823 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17824 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825fi
17826
Matthias Kloseb9621712010-04-24 17:59:49 +000017827# Unset variables that we do not need and which cause bugs (e.g. in
17828# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17829# suppresses any "Segmentation fault" message there. '((' could
17830# trigger a bug in pdksh 5.2.14.
17831for as_var in BASH_ENV ENV MAIL MAILPATH
17832do eval test x\${$as_var+set} = xset \
17833 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834done
17835PS1='$ '
17836PS2='> '
17837PS4='+ '
17838
17839# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017840LC_ALL=C
17841export LC_ALL
17842LANGUAGE=C
17843export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844
Matthias Kloseb9621712010-04-24 17:59:49 +000017845# CDPATH.
17846(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17847
17848
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017849# as_fn_error STATUS ERROR [LINENO LOG_FD]
17850# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017851# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17852# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017853# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017854as_fn_error ()
17855{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017856 as_status=$1; test $as_status -eq 0 && as_status=1
17857 if test "$4"; then
17858 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17859 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017860 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017861 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017862 as_fn_exit $as_status
17863} # as_fn_error
17864
17865
17866# as_fn_set_status STATUS
17867# -----------------------
17868# Set $? to STATUS, without forking.
17869as_fn_set_status ()
17870{
17871 return $1
17872} # as_fn_set_status
17873
17874# as_fn_exit STATUS
17875# -----------------
17876# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17877as_fn_exit ()
17878{
17879 set +e
17880 as_fn_set_status $1
17881 exit $1
17882} # as_fn_exit
17883
17884# as_fn_unset VAR
17885# ---------------
17886# Portably unset VAR.
17887as_fn_unset ()
17888{
17889 { eval $1=; unset $1;}
17890}
17891as_unset=as_fn_unset
17892# as_fn_append VAR VALUE
17893# ----------------------
17894# Append the text in VALUE to the end of the definition contained in VAR. Take
17895# advantage of any shell optimizations that allow amortized linear growth over
17896# repeated appends, instead of the typical quadratic growth present in naive
17897# implementations.
17898if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17899 eval 'as_fn_append ()
17900 {
17901 eval $1+=\$2
17902 }'
17903else
17904 as_fn_append ()
17905 {
17906 eval $1=\$$1\$2
17907 }
17908fi # as_fn_append
17909
17910# as_fn_arith ARG...
17911# ------------------
17912# Perform arithmetic evaluation on the ARGs, and store the result in the
17913# global $as_val. Take advantage of shells that can avoid forks. The arguments
17914# must be portable across $(()) and expr.
17915if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17916 eval 'as_fn_arith ()
17917 {
17918 as_val=$(( $* ))
17919 }'
17920else
17921 as_fn_arith ()
17922 {
17923 as_val=`expr "$@" || test $? -eq 1`
17924 }
17925fi # as_fn_arith
17926
17927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017928if expr a : '\(a\)' >/dev/null 2>&1 &&
17929 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17930 as_expr=expr
17931else
17932 as_expr=false
17933fi
17934
17935if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17936 as_basename=basename
17937else
17938 as_basename=false
17939fi
17940
Matthias Kloseb9621712010-04-24 17:59:49 +000017941if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17942 as_dirname=dirname
17943else
17944 as_dirname=false
17945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017947as_me=`$as_basename -- "$0" ||
17948$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17949 X"$0" : 'X\(//\)$' \| \
17950 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017951$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952 sed '/^.*\/\([^/][^/]*\)\/*$/{
17953 s//\1/
17954 q
17955 }
17956 /^X\/\(\/\/\)$/{
17957 s//\1/
17958 q
17959 }
17960 /^X\/\(\/\).*/{
17961 s//\1/
17962 q
17963 }
17964 s/.*/./; q'`
17965
Matthias Kloseb9621712010-04-24 17:59:49 +000017966# Avoid depending upon Character Ranges.
17967as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17968as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17969as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17970as_cr_digits='0123456789'
17971as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972
17973ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017974case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017976 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017977 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017978 xy) ECHO_C='\c';;
17979 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17980 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981 esac;;
17982*)
17983 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017984esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017985
Martin v. Löwis11437992002-04-12 09:54:03 +000017986rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017987if test -d conf$$.dir; then
17988 rm -f conf$$.dir/conf$$.file
17989else
17990 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017991 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017993if (echo >conf$$.file) 2>/dev/null; then
17994 if ln -s conf$$.file conf$$ 2>/dev/null; then
17995 as_ln_s='ln -s'
17996 # ... but there are two gotchas:
17997 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17998 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017999 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018000 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018001 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018002 elif ln conf$$.file conf$$ 2>/dev/null; then
18003 as_ln_s=ln
18004 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018005 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018006 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018007else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018008 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18011rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018012
Matthias Kloseb9621712010-04-24 17:59:49 +000018013
18014# as_fn_mkdir_p
18015# -------------
18016# Create "$as_dir" as a directory, including parents if necessary.
18017as_fn_mkdir_p ()
18018{
18019
18020 case $as_dir in #(
18021 -*) as_dir=./$as_dir;;
18022 esac
18023 test -d "$as_dir" || eval $as_mkdir_p || {
18024 as_dirs=
18025 while :; do
18026 case $as_dir in #(
18027 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18028 *) as_qdir=$as_dir;;
18029 esac
18030 as_dirs="'$as_qdir' $as_dirs"
18031 as_dir=`$as_dirname -- "$as_dir" ||
18032$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18033 X"$as_dir" : 'X\(//\)[^/]' \| \
18034 X"$as_dir" : 'X\(//\)$' \| \
18035 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18036$as_echo X"$as_dir" |
18037 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18038 s//\1/
18039 q
18040 }
18041 /^X\(\/\/\)[^/].*/{
18042 s//\1/
18043 q
18044 }
18045 /^X\(\/\/\)$/{
18046 s//\1/
18047 q
18048 }
18049 /^X\(\/\).*/{
18050 s//\1/
18051 q
18052 }
18053 s/.*/./; q'`
18054 test -d "$as_dir" && break
18055 done
18056 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018057 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018058
18059
18060} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018061if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018062 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018063else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018064 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018065 as_mkdir_p=false
18066fi
18067
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018068
18069# as_fn_executable_p FILE
18070# -----------------------
18071# Test if FILE is an executable regular file.
18072as_fn_executable_p ()
18073{
18074 test -f "$1" && test -x "$1"
18075} # as_fn_executable_p
18076as_test_x='test -x'
18077as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018078
18079# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018080as_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 +000018081
18082# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018083as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018084
18085
Martin v. Löwis11437992002-04-12 09:54:03 +000018086exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018087## ----------------------------------- ##
18088## Main body of $CONFIG_STATUS script. ##
18089## ----------------------------------- ##
18090_ASEOF
18091test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018092
Matthias Kloseb9621712010-04-24 17:59:49 +000018093cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18094# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018095# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096# values after options handling.
18097ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018098This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018099generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018100
18101 CONFIG_FILES = $CONFIG_FILES
18102 CONFIG_HEADERS = $CONFIG_HEADERS
18103 CONFIG_LINKS = $CONFIG_LINKS
18104 CONFIG_COMMANDS = $CONFIG_COMMANDS
18105 $ $0 $@
18106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107on `(hostname || uname -n) 2>/dev/null | sed 1q`
18108"
18109
Martin v. Löwis11437992002-04-12 09:54:03 +000018110_ACEOF
18111
Matthias Kloseb9621712010-04-24 17:59:49 +000018112case $ac_config_files in *"
18113"*) set x $ac_config_files; shift; ac_config_files=$*;;
18114esac
18115
18116case $ac_config_headers in *"
18117"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18118esac
18119
18120
18121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018122# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018123config_files="$ac_config_files"
18124config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018127
Matthias Kloseb9621712010-04-24 17:59:49 +000018128cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018129ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018130\`$as_me' instantiates files and other configuration actions
18131from templates according to the current configuration. Unless the files
18132and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018133
Matthias Kloseb9621712010-04-24 17:59:49 +000018134Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018135
18136 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018137 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018138 --config print configuration, then exit
18139 -q, --quiet, --silent
18140 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018141 -d, --debug don't remove temporary files
18142 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018143 --file=FILE[:TEMPLATE]
18144 instantiate the configuration file FILE
18145 --header=FILE[:TEMPLATE]
18146 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018147
18148Configuration files:
18149$config_files
18150
18151Configuration headers:
18152$config_headers
18153
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018154Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018157cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18158ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018159ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018160python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018161configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018162 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018163
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018164Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018165This config.status script is free software; the Free Software Foundation
18166gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018167
18168ac_pwd='$ac_pwd'
18169srcdir='$srcdir'
18170INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018171MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018172test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018173_ACEOF
18174
Matthias Kloseb9621712010-04-24 17:59:49 +000018175cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18176# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018177ac_need_defaults=:
18178while test $# != 0
18179do
18180 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018181 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18183 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018184 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018185 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018186 --*=)
18187 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18188 ac_optarg=
18189 ac_shift=:
18190 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018191 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018192 ac_option=$1
18193 ac_optarg=$2
18194 ac_shift=shift
18195 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018196 esac
18197
Skip Montanaro6dead952003-09-25 14:50:04 +000018198 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018199 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018200 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18201 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018202 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018203 $as_echo "$ac_cs_version"; exit ;;
18204 --config | --confi | --conf | --con | --co | --c )
18205 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018207 debug=: ;;
18208 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018209 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018210 case $ac_optarg in
18211 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018212 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018213 esac
18214 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018215 ac_need_defaults=false;;
18216 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018217 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018218 case $ac_optarg in
18219 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18220 esac
18221 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018222 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018223 --he | --h)
18224 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018225 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018226Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018227 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018228 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018229 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18230 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18231 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018232
18233 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018234 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018235Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018236
Matthias Kloseb9621712010-04-24 17:59:49 +000018237 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018238 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018239
18240 esac
18241 shift
18242done
18243
Skip Montanaro6dead952003-09-25 14:50:04 +000018244ac_configure_extra_args=
18245
18246if $ac_cs_silent; then
18247 exec 6>/dev/null
18248 ac_configure_extra_args="$ac_configure_extra_args --silent"
18249fi
18250
18251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018252cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018253if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018254 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018255 shift
18256 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18257 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018258 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018259 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018260fi
18261
Martin v. Löwis11437992002-04-12 09:54:03 +000018262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018263cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018264exec 5>>config.log
18265{
18266 echo
18267 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18268## Running $as_me. ##
18269_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018270 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018271} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018274cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018275_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018276
Matthias Kloseb9621712010-04-24 17:59:49 +000018277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018278
18279# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018280for ac_config_target in $ac_config_targets
18281do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018282 case $ac_config_target in
18283 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18284 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18285 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018286 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18287 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018289 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018290 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018291 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018292 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018293
Victor Stinnere0be4232011-10-25 13:06:09 +020018294 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018295 esac
18296done
18297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018298
Martin v. Löwis11437992002-04-12 09:54:03 +000018299# If the user did not use the arguments to specify the items to instantiate,
18300# then the envvar interface is used. Set only those that are not.
18301# We use the long form for the default assignment because of an extremely
18302# bizarre bug on SunOS 4.1.3.
18303if $ac_need_defaults; then
18304 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18305 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18306fi
18307
Skip Montanaro6dead952003-09-25 14:50:04 +000018308# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018310# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311# Hook for its removal unless debugging.
18312# Note that there is a small window in which the directory will not be cleaned:
18313# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018314$debug ||
18315{
Victor Stinnere0be4232011-10-25 13:06:09 +020018316 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018318 : "${ac_tmp:=$tmp}"
18319 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018320' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018321 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018322}
Martin v. Löwis11437992002-04-12 09:54:03 +000018323# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018324
Martin v. Löwis11437992002-04-12 09:54:03 +000018325{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018326 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018327 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018328} ||
18329{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018330 tmp=./conf$$-$RANDOM
18331 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018332} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018333ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018334
Matthias Kloseb9621712010-04-24 17:59:49 +000018335# Set up the scripts for CONFIG_FILES section.
18336# No need to generate them if there are no CONFIG_FILES.
18337# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018338if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018339
Matthias Kloseb9621712010-04-24 17:59:49 +000018340
18341ac_cr=`echo X | tr X '\015'`
18342# On cygwin, bash can eat \r inside `` if the user requested igncr.
18343# But we know of no other shell where ac_cr would be empty at this
18344# point, so we can use a bashism as a fallback.
18345if test "x$ac_cr" = x; then
18346 eval ac_cr=\$\'\\r\'
18347fi
18348ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18349if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018350 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018351else
18352 ac_cs_awk_cr=$ac_cr
18353fi
18354
Victor Stinnere0be4232011-10-25 13:06:09 +020018355echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018356_ACEOF
18357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018358
Matthias Kloseb9621712010-04-24 17:59:49 +000018359{
18360 echo "cat >conf$$subs.awk <<_ACEOF" &&
18361 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18362 echo "_ACEOF"
18363} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018364 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18365ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018366ac_delim='%!_!# '
18367for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018368 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018369 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018370
Matthias Kloseb9621712010-04-24 17:59:49 +000018371 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18372 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018373 break
18374 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018375 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018376 else
18377 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018378 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379done
Matthias Kloseb9621712010-04-24 17:59:49 +000018380rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018381
Matthias Kloseb9621712010-04-24 17:59:49 +000018382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018383cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018385sed -n '
18386h
18387s/^/S["/; s/!.*/"]=/
18388p
18389g
18390s/^[^!]*!//
18391:repl
18392t repl
18393s/'"$ac_delim"'$//
18394t delim
18395:nl
18396h
18397s/\(.\{148\}\)..*/\1/
18398t more1
18399s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18400p
18401n
18402b repl
18403:more1
18404s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18405p
18406g
18407s/.\{148\}//
18408t nl
18409:delim
18410h
18411s/\(.\{148\}\)..*/\1/
18412t more2
18413s/["\\]/\\&/g; s/^/"/; s/$/"/
18414p
18415b
18416:more2
18417s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18418p
18419g
18420s/.\{148\}//
18421t delim
18422' <conf$$subs.awk | sed '
18423/^[^""]/{
18424 N
18425 s/\n//
18426}
18427' >>$CONFIG_STATUS || ac_write_fail=1
18428rm -f conf$$subs.awk
18429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18430_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018431cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018432 for (key in S) S_is_set[key] = 1
18433 FS = ""
18434
18435}
18436{
18437 line = $ 0
18438 nfields = split(line, field, "@")
18439 substed = 0
18440 len = length(field[1])
18441 for (i = 2; i < nfields; i++) {
18442 key = field[i]
18443 keylen = length(key)
18444 if (S_is_set[key]) {
18445 value = S[key]
18446 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18447 len += length(value) + length(field[++i])
18448 substed = 1
18449 } else
18450 len += 1 + keylen
18451 }
18452
18453 print line
18454}
18455
18456_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018458cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18459if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18460 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18461else
18462 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018463fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018464 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018465_ACEOF
18466
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018467# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18468# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469# trailing colons and then remove the whole line if VPATH becomes empty
18470# (actually we leave an empty line to preserve line numbers).
18471if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018472 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18473h
18474s///
18475s/^/:/
18476s/[ ]*$/:/
18477s/:\$(srcdir):/:/g
18478s/:\${srcdir}:/:/g
18479s/:@srcdir@:/:/g
18480s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018482x
18483s/\(=[ ]*\).*/\1/
18484G
18485s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486s/^[^=]*=[ ]*$//
18487}'
18488fi
18489
Matthias Kloseb9621712010-04-24 17:59:49 +000018490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018491fi # test -n "$CONFIG_FILES"
18492
Matthias Kloseb9621712010-04-24 17:59:49 +000018493# Set up the scripts for CONFIG_HEADERS section.
18494# No need to generate them if there are no CONFIG_HEADERS.
18495# This happens for instance with `./config.status Makefile'.
18496if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018497cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018498BEGIN {
18499_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500
Matthias Kloseb9621712010-04-24 17:59:49 +000018501# Transform confdefs.h into an awk script `defines.awk', embedded as
18502# here-document in config.status, that substitutes the proper values into
18503# config.h.in to produce config.h.
18504
18505# Create a delimiter string that does not exist in confdefs.h, to ease
18506# handling of long lines.
18507ac_delim='%!_!# '
18508for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018509 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18510 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018511 break
18512 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018513 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018514 else
18515 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18516 fi
18517done
18518
18519# For the awk script, D is an array of macro values keyed by name,
18520# likewise P contains macro parameters if any. Preserve backslash
18521# newline sequences.
18522
18523ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18524sed -n '
18525s/.\{148\}/&'"$ac_delim"'/g
18526t rset
18527:rset
18528s/^[ ]*#[ ]*define[ ][ ]*/ /
18529t def
18530d
18531:def
18532s/\\$//
18533t bsnl
18534s/["\\]/\\&/g
18535s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18536D["\1"]=" \3"/p
18537s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18538d
18539:bsnl
18540s/["\\]/\\&/g
18541s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18542D["\1"]=" \3\\\\\\n"\\/p
18543t cont
18544s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18545t cont
18546d
18547:cont
18548n
18549s/.\{148\}/&'"$ac_delim"'/g
18550t clear
18551:clear
18552s/\\$//
18553t bsnlc
18554s/["\\]/\\&/g; s/^/"/; s/$/"/p
18555d
18556:bsnlc
18557s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18558b cont
18559' <confdefs.h | sed '
18560s/'"$ac_delim"'/"\\\
18561"/g' >>$CONFIG_STATUS || ac_write_fail=1
18562
18563cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18564 for (key in D) D_is_set[key] = 1
18565 FS = ""
18566}
18567/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18568 line = \$ 0
18569 split(line, arg, " ")
18570 if (arg[1] == "#") {
18571 defundef = arg[2]
18572 mac1 = arg[3]
18573 } else {
18574 defundef = substr(arg[1], 2)
18575 mac1 = arg[2]
18576 }
18577 split(mac1, mac2, "(") #)
18578 macro = mac2[1]
18579 prefix = substr(line, 1, index(line, defundef) - 1)
18580 if (D_is_set[macro]) {
18581 # Preserve the white space surrounding the "#".
18582 print prefix "define", macro P[macro] D[macro]
18583 next
18584 } else {
18585 # Replace #undef with comments. This is necessary, for example,
18586 # in the case of _POSIX_SOURCE, which is predefined and required
18587 # on some systems where configure will not decide to define it.
18588 if (defundef == "undef") {
18589 print "/*", prefix defundef, macro, "*/"
18590 next
18591 }
18592 }
18593}
18594{ print }
18595_ACAWK
18596_ACEOF
18597cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018598 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018599fi # test -n "$CONFIG_HEADERS"
18600
18601
18602eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18603shift
18604for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018605do
18606 case $ac_tag in
18607 :[FHLC]) ac_mode=$ac_tag; continue;;
18608 esac
18609 case $ac_mode$ac_tag in
18610 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018611 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018612 :[FH]-) ac_tag=-:-;;
18613 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18614 esac
18615 ac_save_IFS=$IFS
18616 IFS=:
18617 set x $ac_tag
18618 IFS=$ac_save_IFS
18619 shift
18620 ac_file=$1
18621 shift
18622
18623 case $ac_mode in
18624 :L) ac_source=$1;;
18625 :[FH])
18626 ac_file_inputs=
18627 for ac_f
18628 do
18629 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018630 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631 *) # Look for the file first in the build tree, then in the source tree
18632 # (if the path is not absolute). The absolute path cannot be DOS-style,
18633 # because $ac_f cannot contain `:'.
18634 test -f "$ac_f" ||
18635 case $ac_f in
18636 [\\/$]*) false;;
18637 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18638 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018639 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018640 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018641 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18642 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018643 done
18644
18645 # Let's still pretend it is `configure' which instantiates (i.e., don't
18646 # use $as_me), people would be surprised to read:
18647 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018648 configure_input='Generated from '`
18649 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18650 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018651 if test x"$ac_file" != x-; then
18652 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018653 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18654$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018655 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018656 # Neutralize special characters interpreted by sed in replacement strings.
18657 case $configure_input in #(
18658 *\&* | *\|* | *\\* )
18659 ac_sed_conf_input=`$as_echo "$configure_input" |
18660 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18661 *) ac_sed_conf_input=$configure_input;;
18662 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018663
18664 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018665 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18666 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018667 esac
18668 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018669 esac
18670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018671 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018672$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018673 X"$ac_file" : 'X\(//\)[^/]' \| \
18674 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018675 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018676$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018677 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18678 s//\1/
18679 q
18680 }
18681 /^X\(\/\/\)[^/].*/{
18682 s//\1/
18683 q
18684 }
18685 /^X\(\/\/\)$/{
18686 s//\1/
18687 q
18688 }
18689 /^X\(\/\).*/{
18690 s//\1/
18691 q
18692 }
18693 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018694 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018695 ac_builddir=.
18696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018697case "$ac_dir" in
18698.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18699*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018700 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018701 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018702 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018703 case $ac_top_builddir_sub in
18704 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18705 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18706 esac ;;
18707esac
18708ac_abs_top_builddir=$ac_pwd
18709ac_abs_builddir=$ac_pwd$ac_dir_suffix
18710# for backward compatibility:
18711ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018712
18713case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018714 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018715 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018716 ac_top_srcdir=$ac_top_builddir_sub
18717 ac_abs_top_srcdir=$ac_pwd ;;
18718 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018719 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018720 ac_top_srcdir=$srcdir
18721 ac_abs_top_srcdir=$srcdir ;;
18722 *) # Relative name.
18723 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18724 ac_top_srcdir=$ac_top_build_prefix$srcdir
18725 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018726esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018727ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018728
Martin v. Löwis11437992002-04-12 09:54:03 +000018729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018730 case $ac_mode in
18731 :F)
18732 #
18733 # CONFIG_FILE
18734 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018735
18736 case $INSTALL in
18737 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018738 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018739 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018740 ac_MKDIR_P=$MKDIR_P
18741 case $MKDIR_P in
18742 [\\/$]* | ?:[\\/]* ) ;;
18743 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18744 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018745_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018746
Matthias Kloseb9621712010-04-24 17:59:49 +000018747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018748# If the template does not know about datarootdir, expand it.
18749# FIXME: This hack should be removed a few years after 2.60.
18750ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018751ac_sed_dataroot='
18752/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018753 p
18754 q
18755}
18756/@datadir@/p
18757/@docdir@/p
18758/@infodir@/p
18759/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018760/@mandir@/p'
18761case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018762*datarootdir*) ac_datarootdir_seen=yes;;
18763*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18765$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018767cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018768 ac_datarootdir_hack='
18769 s&@datadir@&$datadir&g
18770 s&@docdir@&$docdir&g
18771 s&@infodir@&$infodir&g
18772 s&@localedir@&$localedir&g
18773 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018774 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018775esac
18776_ACEOF
18777
18778# Neutralize VPATH when `$srcdir' = `.'.
18779# Shell code in configure.ac might set extrasub.
18780# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018781cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18782ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018783$extrasub
18784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018785cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018786:t
18787/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018788s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018789s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018790s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018791s&@srcdir@&$ac_srcdir&;t t
18792s&@abs_srcdir@&$ac_abs_srcdir&;t t
18793s&@top_srcdir@&$ac_top_srcdir&;t t
18794s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18795s&@builddir@&$ac_builddir&;t t
18796s&@abs_builddir@&$ac_abs_builddir&;t t
18797s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18798s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018799s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018800$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018801"
Victor Stinnere0be4232011-10-25 13:06:09 +020018802eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18803 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018805test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018806 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18807 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18808 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018810which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018811$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018812which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018813
Victor Stinnere0be4232011-10-25 13:06:09 +020018814 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018815 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018816 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18817 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018818 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018819 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018820 ;;
18821 :H)
18822 #
18823 # CONFIG_HEADER
18824 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018825 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018826 {
18827 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018828 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18829 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018830 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018831 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018832 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18833$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018834 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018835 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018836 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018837 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018838 fi
18839 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018840 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018841 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018842 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018843 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018844 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018846
18847 esac
18848
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018849
18850 case $ac_file$ac_mode in
18851 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18852
18853 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018854done # for ac_tag
18855
Guido van Rossum627b2d71993-12-24 10:39:16 +000018856
Matthias Kloseb9621712010-04-24 17:59:49 +000018857as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018858_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018859ac_clean_files=$ac_clean_files_save
18860
Matthias Kloseb9621712010-04-24 17:59:49 +000018861test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018862 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018863
Martin v. Löwis11437992002-04-12 09:54:03 +000018864
18865# configure is writing to config.log, and then calls config.status.
18866# config.status does its own redirection, appending to config.log.
18867# Unfortunately, on DOS this fails, as config.log is still kept open
18868# by configure, so config.status won't be able to write to it; its
18869# output is simply discarded. So we exec the FD to /dev/null,
18870# effectively closing config.log, so it can be properly (re)opened and
18871# appended to by config.status. When coming back to configure, we
18872# need to make the FD available again.
18873if test "$no_create" != yes; then
18874 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018875 ac_config_status_args=
18876 test "$silent" = yes &&
18877 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018878 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018879 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018880 exec 5>>config.log
18881 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18882 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018883 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018884fi
18885if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18886 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18887$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018888fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018889
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018890
Christian Heimes75ed8902013-11-20 01:11:18 +010018891echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018892if test ! -f Modules/Setup.local
18893then
18894 echo "# Edit this file for local setup changes" >Modules/Setup.local
18895fi
18896
Christian Heimes75ed8902013-11-20 01:11:18 +010018897echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018898$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018899 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018900 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018901mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018902
18903if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18904 echo "" >&6
18905 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018906 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 +000018907 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018908 echo "" >&6
18909 echo "" >&6
18910fi
18911