blob: 56d66d0235289e92778703e95e719c9e2ecc7e7a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100634PLATLIBDIR
xdegaye254b3092019-04-29 09:27:40 +0200635LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700636EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200637ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000638SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000639LIBC
640LIBM
641HAVE_GETHOSTBYNAME
642HAVE_GETHOSTBYNAME_R
643HAVE_GETHOSTBYNAME_R_3_ARG
644HAVE_GETHOSTBYNAME_R_5_ARG
645HAVE_GETHOSTBYNAME_R_6_ARG
646LIBOBJS
647TRUE
648MACHDEP_OBJS
649DYNLOADFILE
650DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700651DTRACE_OBJS
652DTRACE_HEADERS
653DFLAGS
654DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700655TCLTK_LIBS
656TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000657LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800658PKG_CONFIG_LIBDIR
659PKG_CONFIG_PATH
660PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400661TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000662SHLIBS
663CFLAGSFORSHARED
664LINKFORSHARED
665CCSHARED
666BLDSHARED
667LDCXXSHARED
668LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700669SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000670LIBTOOL_CRUFT
671OTHER_LIBTOOL_OPT
672UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100673LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700674CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000675BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200676CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000677OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700679LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_ERR
681LLVM_PROF_FILE
682LLVM_PROF_MERGER
683PGO_PROF_USE_FLAG
684PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200685LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200686LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700687PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700688DEF_MAKE_RULE
689DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000690ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000691LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100692MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000693INSTALL_DATA
694INSTALL_SCRIPT
695INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200696ac_ct_READELF
697READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000698ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200699ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701GNULD
702LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000703LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000704RUNSHARED
705INSTSONAME
706LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000707PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000708BLDLIBRARY
709DLLLIBRARY
710LDLIBRARY
711LIBRARY
712BUILDEXEEXT
713EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200714NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200715MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716PLATFORM_TRIPLET
717MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200718ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000719MAINCC
720CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700721SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200722GREP
723CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000724OBJEXT
725EXEEXT
726ac_ct_CC
727CPPFLAGS
728LDFLAGS
729CFLAGS
730CC
731EXPORT_MACOSX_DEPLOYMENT_TARGET
732CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000734MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000735FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800737FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000738FRAMEWORKALTINSTALLLAST
739FRAMEWORKALTINSTALLFIRST
740FRAMEWORKINSTALLLAST
741FRAMEWORKINSTALLFIRST
742PYTHONFRAMEWORKINSTALLDIR
743PYTHONFRAMEWORKPREFIX
744PYTHONFRAMEWORKDIR
745PYTHONFRAMEWORKIDENTIFIER
746PYTHONFRAMEWORK
747LIPO_32BIT_FLAGS
748ARCH_RUN_32BIT
749UNIVERSALSDK
750CONFIG_ARGS
751SOVERSION
752VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200754PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500763HAS_GIT
764GITBRANCH
765GITTAG
766GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_cxx_main
814with_suffix
815enable_shared
816enable_profiling
817with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200818with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200819with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400823with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800825with_memory_sanitizer
826with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_libs
828with_system_expat
829with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100830with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100831with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000832enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700833with_tcltk_includes
834with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000836enable_ipv6
837with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000839with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700841with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_libm
843with_libc
844enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100845with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000846with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800847with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100848with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100849with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200850with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200851with_experimental_isolated_subinterpreters
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
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001588 --with-experimental-isolated-subinterpreters
1589 better isolate subinterpreters, experimental build
1590 mode (default is no)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591
1592Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001593 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 CC C compiler command
1595 CFLAGS C compiler flags
1596 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1597 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001599 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001602 PROFILE_TASK
1603 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001604 PKG_CONFIG path to pkg-config utility
1605 PKG_CONFIG_PATH
1606 directories to add to pkg-config's search path
1607 PKG_CONFIG_LIBDIR
1608 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001609
1610Use these variables to override the choices made by `configure' or to help
1611it to find libraries and programs with nonstandard names/locations.
1612
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001613Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001614_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001616fi
1617
1618if test "$ac_init_help" = "recursive"; then
1619 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001621 test -d "$ac_dir" ||
1622 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1623 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 ac_builddir=.
1625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626case "$ac_dir" in
1627.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1628*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001629 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001631 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632 case $ac_top_builddir_sub in
1633 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1634 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1635 esac ;;
1636esac
1637ac_abs_top_builddir=$ac_pwd
1638ac_abs_builddir=$ac_pwd$ac_dir_suffix
1639# for backward compatibility:
1640ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001641
1642case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001645 ac_top_srcdir=$ac_top_builddir_sub
1646 ac_abs_top_srcdir=$ac_pwd ;;
1647 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 ac_top_srcdir=$srcdir
1650 ac_abs_top_srcdir=$srcdir ;;
1651 *) # Relative name.
1652 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1653 ac_top_srcdir=$ac_top_build_prefix$srcdir
1654 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001655esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001658 cd "$ac_dir" || { ac_status=$?; continue; }
1659 # Check for guested configure.
1660 if test -f "$ac_srcdir/configure.gnu"; then
1661 echo &&
1662 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1663 elif test -f "$ac_srcdir/configure"; then
1664 echo &&
1665 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001666 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001668 fi || ac_status=$?
1669 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001670 done
1671fi
1672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001673test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001674if $ac_init_version; then
1675 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001676python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001677generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001678
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001679Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001680This configure script is free software; the Free Software Foundation
1681gives unlimited permission to copy, distribute and modify it.
1682_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001683 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001685
1686## ------------------------ ##
1687## Autoconf initialization. ##
1688## ------------------------ ##
1689
1690# ac_fn_c_try_compile LINENO
1691# --------------------------
1692# Try to compile conftest.$ac_ext, and return whether this succeeded.
1693ac_fn_c_try_compile ()
1694{
1695 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1696 rm -f conftest.$ac_objext
1697 if { { ac_try="$ac_compile"
1698case "(($ac_try" in
1699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1700 *) ac_try_echo=$ac_try;;
1701esac
1702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1703$as_echo "$ac_try_echo"; } >&5
1704 (eval "$ac_compile") 2>conftest.err
1705 ac_status=$?
1706 if test -s conftest.err; then
1707 grep -v '^ *+' conftest.err >conftest.er1
1708 cat conftest.er1 >&5
1709 mv -f conftest.er1 conftest.err
1710 fi
1711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1712 test $ac_status = 0; } && {
1713 test -z "$ac_c_werror_flag" ||
1714 test ! -s conftest.err
1715 } && test -s conftest.$ac_objext; then :
1716 ac_retval=0
1717else
1718 $as_echo "$as_me: failed program was:" >&5
1719sed 's/^/| /' conftest.$ac_ext >&5
1720
1721 ac_retval=1
1722fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001723 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001724 as_fn_set_status $ac_retval
1725
1726} # ac_fn_c_try_compile
1727
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001728# ac_fn_c_try_cpp LINENO
1729# ----------------------
1730# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1731ac_fn_c_try_cpp ()
1732{
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 if { { ac_try="$ac_cpp conftest.$ac_ext"
1735case "(($ac_try" in
1736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1737 *) ac_try_echo=$ac_try;;
1738esac
1739eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1740$as_echo "$ac_try_echo"; } >&5
1741 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1742 ac_status=$?
1743 if test -s conftest.err; then
1744 grep -v '^ *+' conftest.err >conftest.er1
1745 cat conftest.er1 >&5
1746 mv -f conftest.er1 conftest.err
1747 fi
1748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1749 test $ac_status = 0; } > conftest.i && {
1750 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1751 test ! -s conftest.err
1752 }; then :
1753 ac_retval=0
1754else
1755 $as_echo "$as_me: failed program was:" >&5
1756sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759fi
1760 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1761 as_fn_set_status $ac_retval
1762
1763} # ac_fn_c_try_cpp
1764
Matthias Kloseb9621712010-04-24 17:59:49 +00001765# ac_fn_c_try_link LINENO
1766# -----------------------
1767# Try to link conftest.$ac_ext, and return whether this succeeded.
1768ac_fn_c_try_link ()
1769{
1770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1771 rm -f conftest.$ac_objext conftest$ac_exeext
1772 if { { ac_try="$ac_link"
1773case "(($ac_try" in
1774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775 *) ac_try_echo=$ac_try;;
1776esac
1777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778$as_echo "$ac_try_echo"; } >&5
1779 (eval "$ac_link") 2>conftest.err
1780 ac_status=$?
1781 if test -s conftest.err; then
1782 grep -v '^ *+' conftest.err >conftest.er1
1783 cat conftest.er1 >&5
1784 mv -f conftest.er1 conftest.err
1785 fi
1786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1787 test $ac_status = 0; } && {
1788 test -z "$ac_c_werror_flag" ||
1789 test ! -s conftest.err
1790 } && test -s conftest$ac_exeext && {
1791 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001792 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001793 }; then :
1794 ac_retval=0
1795else
1796 $as_echo "$as_me: failed program was:" >&5
1797sed 's/^/| /' conftest.$ac_ext >&5
1798
1799 ac_retval=1
1800fi
1801 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1802 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1803 # interfere with the next link command; also delete a directory that is
1804 # left behind by Apple's compiler. We do this before executing the actions.
1805 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001806 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 as_fn_set_status $ac_retval
1808
1809} # ac_fn_c_try_link
1810
Matthias Kloseb9621712010-04-24 17:59:49 +00001811# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1812# -------------------------------------------------------
1813# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1814# the include files in INCLUDES and setting the cache variable VAR
1815# accordingly.
1816ac_fn_c_check_header_mongrel ()
1817{
1818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001819 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1821$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001822if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001823 $as_echo_n "(cached) " >&6
1824fi
1825eval ac_res=\$$3
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1827$as_echo "$ac_res" >&6; }
1828else
1829 # Is the header compilable?
1830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1831$as_echo_n "checking $2 usability... " >&6; }
1832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1833/* end confdefs.h. */
1834$4
1835#include <$2>
1836_ACEOF
1837if ac_fn_c_try_compile "$LINENO"; then :
1838 ac_header_compiler=yes
1839else
1840 ac_header_compiler=no
1841fi
1842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1844$as_echo "$ac_header_compiler" >&6; }
1845
1846# Is the header present?
1847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1848$as_echo_n "checking $2 presence... " >&6; }
1849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1850/* end confdefs.h. */
1851#include <$2>
1852_ACEOF
1853if ac_fn_c_try_cpp "$LINENO"; then :
1854 ac_header_preproc=yes
1855else
1856 ac_header_preproc=no
1857fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001858rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1860$as_echo "$ac_header_preproc" >&6; }
1861
1862# So? What about this header?
1863case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1864 yes:no: )
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1866$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1868$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1869 ;;
1870 no:yes:* )
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1872$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1874$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1876$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1878$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1880$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001881( $as_echo "## --------------------------------------- ##
1882## Report this to https://bugs.python.org/ ##
1883## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001884 ) | sed "s/^/$as_me: WARNING: /" >&2
1885 ;;
1886esac
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001889if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 $as_echo_n "(cached) " >&6
1891else
1892 eval "$3=\$ac_header_compiler"
1893fi
1894eval ac_res=\$$3
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1896$as_echo "$ac_res" >&6; }
1897fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001899
1900} # ac_fn_c_check_header_mongrel
1901
1902# ac_fn_c_try_run LINENO
1903# ----------------------
1904# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1905# that executables *can* be run.
1906ac_fn_c_try_run ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 if { { ac_try="$ac_link"
1910case "(($ac_try" in
1911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1912 *) ac_try_echo=$ac_try;;
1913esac
1914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1915$as_echo "$ac_try_echo"; } >&5
1916 (eval "$ac_link") 2>&5
1917 ac_status=$?
1918 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1919 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1920 { { case "(($ac_try" in
1921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922 *) ac_try_echo=$ac_try;;
1923esac
1924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925$as_echo "$ac_try_echo"; } >&5
1926 (eval "$ac_try") 2>&5
1927 ac_status=$?
1928 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1929 test $ac_status = 0; }; }; then :
1930 ac_retval=0
1931else
1932 $as_echo "$as_me: program exited with status $ac_status" >&5
1933 $as_echo "$as_me: failed program was:" >&5
1934sed 's/^/| /' conftest.$ac_ext >&5
1935
1936 ac_retval=$ac_status
1937fi
1938 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001939 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001940 as_fn_set_status $ac_retval
1941
1942} # ac_fn_c_try_run
1943
1944# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1945# -------------------------------------------------------
1946# Tests whether HEADER exists and can be compiled using the include files in
1947# INCLUDES, setting the cache variable VAR accordingly.
1948ac_fn_c_check_header_compile ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1952$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001953if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001954 $as_echo_n "(cached) " >&6
1955else
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$4
1959#include <$2>
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962 eval "$3=yes"
1963else
1964 eval "$3=no"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968eval ac_res=\$$3
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1970$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001971 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001972
1973} # ac_fn_c_check_header_compile
1974
Matthias Kloseb9621712010-04-24 17:59:49 +00001975# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1976# -------------------------------------------
1977# Tests whether TYPE exists after having included INCLUDES, setting cache
1978# variable VAR accordingly.
1979ac_fn_c_check_type ()
1980{
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1983$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001984if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001985 $as_echo_n "(cached) " >&6
1986else
1987 eval "$3=no"
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h. */
1990$4
1991int
1992main ()
1993{
1994if (sizeof ($2))
1995 return 0;
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$4
2004int
2005main ()
2006{
2007if (sizeof (($2)))
2008 return 0;
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013if ac_fn_c_try_compile "$LINENO"; then :
2014
2015else
2016 eval "$3=yes"
2017fi
2018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2019fi
2020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2021fi
2022eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002026
2027} # ac_fn_c_check_type
2028
Matthias Kloseb9621712010-04-24 17:59:49 +00002029# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2030# --------------------------------------------
2031# Tries to find the compile-time value of EXPR in a program that includes
2032# INCLUDES, setting VAR accordingly. Returns whether the value could be
2033# computed
2034ac_fn_c_compute_int ()
2035{
2036 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037 if test "$cross_compiling" = yes; then
2038 # Depending upon the size, compute the lo and hi bounds.
2039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002046test_array [0] = 0;
2047return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_lo=0 ac_mid=0
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002063test_array [0] = 0;
2064return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002065
2066 ;
2067 return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"; then :
2071 ac_hi=$ac_mid; break
2072else
2073 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2074 if test $ac_lo -le $ac_mid; then
2075 ac_lo= ac_hi=
2076 break
2077 fi
2078 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 done
2082else
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=-1 ac_mid=-1
2099 while :; do
2100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h. */
2102$4
2103int
2104main ()
2105{
2106static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002107test_array [0] = 0;
2108return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114if ac_fn_c_try_compile "$LINENO"; then :
2115 ac_lo=$ac_mid; break
2116else
2117 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2118 if test $ac_mid -le $ac_hi; then
2119 ac_lo= ac_hi=
2120 break
2121 fi
2122 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125 done
2126else
2127 ac_lo= ac_hi=
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132# Binary search between lo and hi bounds.
2133while test "x$ac_lo" != "x$ac_hi"; do
2134 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002142test_array [0] = 0;
2143return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_hi=$ac_mid
2151else
2152 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155done
2156case $ac_lo in #((
2157?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2158'') ac_retval=1 ;;
2159esac
2160 else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164static long int longval () { return $2; }
2165static unsigned long int ulongval () { return $2; }
2166#include <stdio.h>
2167#include <stdlib.h>
2168int
2169main ()
2170{
2171
2172 FILE *f = fopen ("conftest.val", "w");
2173 if (! f)
2174 return 1;
2175 if (($2) < 0)
2176 {
2177 long int i = longval ();
2178 if (i != ($2))
2179 return 1;
2180 fprintf (f, "%ld", i);
2181 }
2182 else
2183 {
2184 unsigned long int i = ulongval ();
2185 if (i != ($2))
2186 return 1;
2187 fprintf (f, "%lu", i);
2188 }
2189 /* Do not output a trailing newline, as this causes \r\n confusion
2190 on some platforms. */
2191 return ferror (f) || fclose (f) != 0;
2192
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_run "$LINENO"; then :
2198 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2199else
2200 ac_retval=1
2201fi
2202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2203 conftest.$ac_objext conftest.beam conftest.$ac_ext
2204rm -f conftest.val
2205
2206 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002207 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002208 as_fn_set_status $ac_retval
2209
2210} # ac_fn_c_compute_int
2211
2212# ac_fn_c_check_func LINENO FUNC VAR
2213# ----------------------------------
2214# Tests whether FUNC exists, setting the cache variable VAR accordingly
2215ac_fn_c_check_func ()
2216{
2217 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2219$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002220if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002221 $as_echo_n "(cached) " >&6
2222else
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2226 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2227#define $2 innocuous_$2
2228
2229/* System header to define __stub macros and hopefully few prototypes,
2230 which can conflict with char $2 (); below.
2231 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2232 <limits.h> exists even on freestanding compilers. */
2233
2234#ifdef __STDC__
2235# include <limits.h>
2236#else
2237# include <assert.h>
2238#endif
2239
2240#undef $2
2241
2242/* Override any GCC internal prototype to avoid an error.
2243 Use char because int might match the return type of a GCC
2244 builtin and then its argument prototype would still apply. */
2245#ifdef __cplusplus
2246extern "C"
2247#endif
2248char $2 ();
2249/* The GNU C library defines this for functions which it implements
2250 to always fail with ENOSYS. Some functions are actually named
2251 something starting with __ and the normal name is an alias. */
2252#if defined __stub_$2 || defined __stub___$2
2253choke me
2254#endif
2255
2256int
2257main ()
2258{
2259return $2 ();
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_link "$LINENO"; then :
2265 eval "$3=yes"
2266else
2267 eval "$3=no"
2268fi
2269rm -f core conftest.err conftest.$ac_objext \
2270 conftest$ac_exeext conftest.$ac_ext
2271fi
2272eval ac_res=\$$3
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2274$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002275 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002276
2277} # ac_fn_c_check_func
2278
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002279# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2280# ---------------------------------------------
2281# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2282# accordingly.
2283ac_fn_c_check_decl ()
2284{
2285 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286 as_decl_name=`echo $2|sed 's/ *(.*//'`
2287 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2289$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2290if eval \${$3+:} false; then :
2291 $as_echo_n "(cached) " >&6
2292else
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h. */
2295$4
2296int
2297main ()
2298{
2299#ifndef $as_decl_name
2300#ifdef __cplusplus
2301 (void) $as_decl_use;
2302#else
2303 (void) $as_decl_name;
2304#endif
2305#endif
2306
2307 ;
2308 return 0;
2309}
2310_ACEOF
2311if ac_fn_c_try_compile "$LINENO"; then :
2312 eval "$3=yes"
2313else
2314 eval "$3=no"
2315fi
2316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2317fi
2318eval ac_res=\$$3
2319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2320$as_echo "$ac_res" >&6; }
2321 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2322
2323} # ac_fn_c_check_decl
2324
Matthias Kloseb9621712010-04-24 17:59:49 +00002325# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2326# ----------------------------------------------------
2327# Tries to find if the field MEMBER exists in type AGGR, after including
2328# INCLUDES, setting cache variable VAR accordingly.
2329ac_fn_c_check_member ()
2330{
2331 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2333$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002334if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002335 $as_echo_n "(cached) " >&6
2336else
2337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h. */
2339$5
2340int
2341main ()
2342{
2343static $2 ac_aggr;
2344if (ac_aggr.$3)
2345return 0;
2346 ;
2347 return 0;
2348}
2349_ACEOF
2350if ac_fn_c_try_compile "$LINENO"; then :
2351 eval "$4=yes"
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$5
2356int
2357main ()
2358{
2359static $2 ac_aggr;
2360if (sizeof ac_aggr.$3)
2361return 0;
2362 ;
2363 return 0;
2364}
2365_ACEOF
2366if ac_fn_c_try_compile "$LINENO"; then :
2367 eval "$4=yes"
2368else
2369 eval "$4=no"
2370fi
2371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2372fi
2373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374fi
2375eval ac_res=\$$4
2376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2377$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002378 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002379
2380} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002382This file contains any messages produced by compilers while
2383running configure, to aid debugging if configure makes a mistake.
2384
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002385It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002386generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002387
2388 $ $0 $@
2389
2390_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002392{
2393cat <<_ASUNAME
2394## --------- ##
2395## Platform. ##
2396## --------- ##
2397
2398hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2399uname -m = `(uname -m) 2>/dev/null || echo unknown`
2400uname -r = `(uname -r) 2>/dev/null || echo unknown`
2401uname -s = `(uname -s) 2>/dev/null || echo unknown`
2402uname -v = `(uname -v) 2>/dev/null || echo unknown`
2403
2404/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2405/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2406
2407/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2408/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2409/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002411/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2412/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2413/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2414
2415_ASUNAME
2416
2417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2418for as_dir in $PATH
2419do
2420 IFS=$as_save_IFS
2421 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 $as_echo "PATH: $as_dir"
2423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002425
2426} >&5
2427
2428cat >&5 <<_ACEOF
2429
2430
2431## ----------- ##
2432## Core tests. ##
2433## ----------- ##
2434
2435_ACEOF
2436
2437
2438# Keep a trace of the command line.
2439# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002440# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002441# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002442# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002443ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002444ac_configure_args0=
2445ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002446ac_must_keep_next=false
2447for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002448do
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 for ac_arg
2450 do
2451 case $ac_arg in
2452 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2453 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2454 | -silent | --silent | --silen | --sile | --sil)
2455 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 esac
2459 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002463 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002464 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002465 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002466 case $ac_arg in
2467 *=* | --config-cache | -C | -disable-* | --disable-* \
2468 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2469 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2470 | -with-* | --with-* | -without-* | --without-* | --x)
2471 case "$ac_configure_args0 " in
2472 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2473 esac
2474 ;;
2475 -* ) ac_must_keep_next=true ;;
2476 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 ;;
2480 esac
2481 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002482done
Matthias Kloseb9621712010-04-24 17:59:49 +00002483{ ac_configure_args0=; unset ac_configure_args0;}
2484{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002485
2486# When interrupted or exit'd, cleanup temporary files, and complete
2487# config.log. We remove comments because anyway the quotes in there
2488# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489# WARNING: Use '\'' to represent an apostrophe within the trap.
2490# 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 +00002491trap 'exit_status=$?
2492 # Save into config.log some information that might help in debugging.
2493 {
2494 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002495
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002496 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002497## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002498## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
2500 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501(
2502 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2503 eval ac_val=\$$ac_var
2504 case $ac_val in #(
2505 *${as_nl}*)
2506 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2508$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
2510 case $ac_var in #(
2511 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2513 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac ;;
2515 esac
2516 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2519 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 "s/'\''/'\''\\\\'\'''\''/g;
2522 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2523 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002524 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002526 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 esac |
2528 sort
2529)
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002531
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002533## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002535 echo
2536 for ac_var in $ac_subst_vars
2537 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 eval ac_val=\$$ac_var
2539 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 done | sort
2544 echo
2545
2546 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002547 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002550 echo
2551 for ac_var in $ac_subst_files
2552 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 eval ac_val=\$$ac_var
2554 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 done | sort
2559 echo
2560 fi
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002564## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 echo
2569 fi
2570 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 $as_echo "$as_me: caught signal $ac_signal"
2572 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 rm -f core *.core core.conftest.* &&
2575 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002578for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002580done
2581ac_signal=0
2582
2583# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002585
Matthias Kloseb9621712010-04-24 17:59:49 +00002586$as_echo "/* confdefs.h */" > confdefs.h
2587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588# Predefined preprocessor variables.
2589
2590cat >>confdefs.h <<_ACEOF
2591#define PACKAGE_NAME "$PACKAGE_NAME"
2592_ACEOF
2593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594cat >>confdefs.h <<_ACEOF
2595#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2596_ACEOF
2597
Martin v. Löwis11437992002-04-12 09:54:03 +00002598cat >>confdefs.h <<_ACEOF
2599#define PACKAGE_VERSION "$PACKAGE_VERSION"
2600_ACEOF
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602cat >>confdefs.h <<_ACEOF
2603#define PACKAGE_STRING "$PACKAGE_STRING"
2604_ACEOF
2605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2608_ACEOF
2609
Matthias Kloseb9621712010-04-24 17:59:49 +00002610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_URL "$PACKAGE_URL"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
2615# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002616# Prefer an explicitly selected file to automatically selected ones.
2617ac_site_file1=NONE
2618ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002620 # We do not want a PATH search for config.site.
2621 case $CONFIG_SITE in #((
2622 -*) ac_site_file1=./$CONFIG_SITE;;
2623 */*) ac_site_file1=$CONFIG_SITE;;
2624 *) ac_site_file1=./$CONFIG_SITE;;
2625 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 ac_site_file1=$prefix/share/config.site
2628 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629else
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 ac_site_file1=$ac_default_prefix/share/config.site
2631 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002633for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634do
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 test "x$ac_site_file" = xNONE && continue
2636 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2638$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002640 . "$ac_site_file" \
2641 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2643as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002644See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002645 fi
2646done
2647
2648if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 # Some versions of bash will fail to source /dev/null (special files
2650 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2651 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2653$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2656 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 esac
2658 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002659else
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2661$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 >$cache_file
2663fi
2664
2665# Check that the precious variables saved in the cache have kept the same
2666# value.
2667ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2670 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2672 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 case $ac_old_set,$ac_new_set in
2674 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2676$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 +00002677 ac_cache_corrupted=: ;;
2678 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2680$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 ac_cache_corrupted=: ;;
2682 ,);;
2683 *)
2684 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 # differences in whitespace do not lead to failure.
2686 ac_old_val_w=`echo x $ac_old_val`
2687 ac_new_val_w=`echo x $ac_new_val`
2688 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2690$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2691 ac_cache_corrupted=:
2692 else
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2694$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2695 eval $ac_var=\$ac_old_val
2696 fi
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2698$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2700$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 fi;;
2702 esac
2703 # Pass precious variables to config.status.
2704 if test "$ac_new_set" = set; then
2705 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002706 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 *) ac_arg=$ac_var=$ac_new_val ;;
2708 esac
2709 case " $ac_configure_args " in
2710 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002711 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 esac
2713 fi
2714done
2715if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2719$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002720 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002722## -------------------- ##
2723## Main body of script. ##
2724## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725
Guido van Rossum7f43da71994-08-01 12:15:30 +00002726ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002727ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002728ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2729ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2730ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002731
Guido van Rossum627b2d71993-12-24 10:39:16 +00002732
Michael W. Hudson54241132001-12-07 15:38:26 +00002733
Trent Nelson4d4ec652012-10-16 08:51:24 -04002734
Christian Heimesff5be6e2018-01-20 13:19:21 +01002735
2736
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002737if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002738 # If we're building out-of-tree, we need to make sure the following
2739 # resources get picked up before their $srcdir counterparts.
2740 # Objects/ -> typeslots.inc
2741 # Include/ -> Python-ast.h, graminit.h
2742 # Python/ -> importlib.h
2743 # (A side effect of this is that these resources will automatically be
2744 # regenerated when building out-of-tree, regardless of whether or not
2745 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2746 # off.)
2747 BASECPPFLAGS="-IObjects -IInclude -IPython"
2748else
2749 BASECPPFLAGS=""
2750fi
2751
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752
2753
2754
2755
Victor Stinner9ed34a82017-05-02 22:35:58 +02002756if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758# Extract the first word of "git", so it can be a program name with args.
2759set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2761$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763 $as_echo_n "(cached) " >&6
2764else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002765 if test -n "$HAS_GIT"; then
2766 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767else
2768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2769for as_dir in $PATH
2770do
2771 IFS=$as_save_IFS
2772 test -z "$as_dir" && as_dir=.
2773 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002775 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2777 break 2
2778 fi
2779done
2780 done
2781IFS=$as_save_IFS
2782
Ned Deily5c4b0d02017-03-04 00:19:55 -05002783 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002784fi
2785fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002786HAS_GIT=$ac_cv_prog_HAS_GIT
2787if test -n "$HAS_GIT"; then
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2789$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002790else
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2792$as_echo "no" >&6; }
2793fi
2794
2795
2796else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002797HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002798fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002799if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002800then
Xiang Zhang4c855572018-08-20 22:36:19 +08002801 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2802 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2803 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002805 GITVERSION=""
2806 GITTAG=""
2807 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002808fi
2809
2810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002811ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002812
2813
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002814ac_aux_dir=
2815for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2816 if test -f "$ac_dir/install-sh"; then
2817 ac_aux_dir=$ac_dir
2818 ac_install_sh="$ac_aux_dir/install-sh -c"
2819 break
2820 elif test -f "$ac_dir/install.sh"; then
2821 ac_aux_dir=$ac_dir
2822 ac_install_sh="$ac_aux_dir/install.sh -c"
2823 break
2824 elif test -f "$ac_dir/shtool"; then
2825 ac_aux_dir=$ac_dir
2826 ac_install_sh="$ac_aux_dir/shtool install -c"
2827 break
2828 fi
2829done
2830if test -z "$ac_aux_dir"; then
2831 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2832fi
2833
2834# These three variables are undocumented and unsupported,
2835# and are intended to be withdrawn in a future Autoconf release.
2836# They can cause serious problems if a builder's source tree is in a directory
2837# whose full name contains unusual characters.
2838ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2839ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2840ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2841
2842
2843# Make sure we can run config.sub.
2844$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2845 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2846
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2848$as_echo_n "checking build system type... " >&6; }
2849if ${ac_cv_build+:} false; then :
2850 $as_echo_n "(cached) " >&6
2851else
2852 ac_build_alias=$build_alias
2853test "x$ac_build_alias" = x &&
2854 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2855test "x$ac_build_alias" = x &&
2856 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2857ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2858 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2859
2860fi
2861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2862$as_echo "$ac_cv_build" >&6; }
2863case $ac_cv_build in
2864*-*-*) ;;
2865*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2866esac
2867build=$ac_cv_build
2868ac_save_IFS=$IFS; IFS='-'
2869set x $ac_cv_build
2870shift
2871build_cpu=$1
2872build_vendor=$2
2873shift; shift
2874# Remember, the first character of IFS is used to create $*,
2875# except with old shells:
2876build_os=$*
2877IFS=$ac_save_IFS
2878case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2879
2880
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2882$as_echo_n "checking host system type... " >&6; }
2883if ${ac_cv_host+:} false; then :
2884 $as_echo_n "(cached) " >&6
2885else
2886 if test "x$host_alias" = x; then
2887 ac_cv_host=$ac_cv_build
2888else
2889 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2890 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2891fi
2892
2893fi
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2895$as_echo "$ac_cv_host" >&6; }
2896case $ac_cv_host in
2897*-*-*) ;;
2898*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2899esac
2900host=$ac_cv_host
2901ac_save_IFS=$IFS; IFS='-'
2902set x $ac_cv_host
2903shift
2904host_cpu=$1
2905host_vendor=$2
2906shift; shift
2907# Remember, the first character of IFS is used to create $*,
2908# except with old shells:
2909host_os=$*
2910IFS=$ac_save_IFS
2911case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2912
2913
2914
doko@python.orga10e4a92013-01-25 18:45:12 +01002915
2916
Ned Deilyfcbc2462014-08-22 13:32:49 -07002917# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2918rm -f pybuilddir.txt
2919
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920for ac_prog in python$PACKAGE_VERSION python3 python
2921do
2922 # Extract the first word of "$ac_prog", so it can be a program name with args.
2923set dummy $ac_prog; ac_word=$2
2924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2925$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002926if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002927 $as_echo_n "(cached) " >&6
2928else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002929 if test -n "$PYTHON_FOR_REGEN"; then
2930 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002931else
2932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2933for as_dir in $PATH
2934do
2935 IFS=$as_save_IFS
2936 test -z "$as_dir" && as_dir=.
2937 for ac_exec_ext in '' $ac_executable_extensions; do
2938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002939 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2941 break 2
2942 fi
2943done
2944 done
2945IFS=$as_save_IFS
2946
2947fi
2948fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002949PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2950if test -n "$PYTHON_FOR_REGEN"; then
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2952$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002953else
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2955$as_echo "no" >&6; }
2956fi
2957
2958
Victor Stinnera5c62a82017-05-03 18:21:48 +02002959 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002960done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002961test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002962
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002963
2964
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002965if test "$cross_compiling" = yes; then
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2967$as_echo_n "checking for python interpreter for cross build... " >&6; }
2968 if test -z "$PYTHON_FOR_BUILD"; then
2969 for interp in python$PACKAGE_VERSION python3 python; do
2970 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002971 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 +02002972 break
2973 fi
2974 interp=
2975 done
2976 if test x$interp = x; then
2977 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2978 fi
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2980$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002981 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 +02002982 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002983elif test "$cross_compiling" = maybe; then
2984 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002985else
2986 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2987fi
2988
2989
Martin v. Löwis11437992002-04-12 09:54:03 +00002990
Benjamin Petersond23f8222009-04-05 19:13:16 +00002991if test "$prefix" != "/"; then
2992 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2993fi
2994
2995
Martin v. Löwis11437992002-04-12 09:54:03 +00002996
2997
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002998# We don't use PACKAGE_ variables, and they cause conflicts
2999# with other autoconf-based packages that include Python.h
3000grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3001rm confdefs.h
3002mv confdefs.h.new confdefs.h
3003
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003004
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003005VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003006
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003007# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003008
3009SOVERSION=1.0
3010
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003011# The later defininition of _XOPEN_SOURCE disables certain features
3012# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3013
Matthias Kloseb9621712010-04-24 17:59:49 +00003014$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003015
3016
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003017# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3018# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3019# them.
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003022
3023
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003024# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3025# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3026# them.
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003029
3030
Martin v. Löwisd6320502004-08-12 13:45:08 +00003031# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003032# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3033# them.
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003036
3037
3038
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003039define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003040
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003041# Arguments passed to configure.
3042
3043CONFIG_ARGS="$ac_configure_args"
3044
Matthias Kloseb9621712010-04-24 17:59:49 +00003045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3046$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003048if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050 case $enableval in
3051 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003052 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003053 # information
3054 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003055 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3058 if test ! -d "${enableval}"
3059 then
3060 enableval=/
3061 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063 ;;
3064 esac
3065 case $enableval in
3066 no)
3067 UNIVERSALSDK=
3068 enable_universalsdk=
3069 ;;
3070 *)
3071 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072 if test ! -d "${UNIVERSALSDK}"
3073 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003074 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003076 ;;
3077 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003078
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003079
Thomas Wouters477c8d52006-05-27 19:21:47 +00003080else
3081
3082 UNIVERSALSDK=
3083 enable_universalsdk=
3084
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003085fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003086
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003087if test -n "${UNIVERSALSDK}"
3088then
Matthias Kloseb9621712010-04-24 17:59:49 +00003089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3090$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091else
Matthias Kloseb9621712010-04-24 17:59:49 +00003092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003094fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003096
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003097
Ned Deily87adb6e2013-10-18 21:09:56 -07003098ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003099
Ned Deilycbfb9a52012-06-23 16:02:19 -07003100# For backward compatibility reasons we prefer to select '32-bit' if available,
3101# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003103if test "`uname -s`" = "Darwin"
3104then
3105 if test -n "${UNIVERSALSDK}"
3106 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003107 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003108 then
3109 UNIVERSAL_ARCHS="intel"
3110 fi
3111 fi
3112fi
3113
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003114
Matthias Kloseb9621712010-04-24 17:59:49 +00003115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3116$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117
3118# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003119if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003121 UNIVERSAL_ARCHS="$withval"
3122
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003123fi
3124
Ned Deily87adb6e2013-10-18 21:09:56 -07003125if test -n "${UNIVERSALSDK}"
3126then
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3128$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3129else
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3131$as_echo "no" >&6; }
3132fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003134
3135# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003136if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003137 withval=$with_framework_name;
3138 PYTHONFRAMEWORK=${withval}
3139 PYTHONFRAMEWORKDIR=${withval}.framework
3140 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3141
3142else
3143
3144 PYTHONFRAMEWORK=Python
3145 PYTHONFRAMEWORKDIR=Python.framework
3146 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3147
3148fi
3149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003150# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003151if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003153 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003154 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003155 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003156 esac
3157 case $enableval in
3158 no)
3159 PYTHONFRAMEWORK=
3160 PYTHONFRAMEWORKDIR=no-framework
3161 PYTHONFRAMEWORKPREFIX=
3162 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003163 FRAMEWORKINSTALLFIRST=
3164 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003165 FRAMEWORKALTINSTALLFIRST=
3166 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003167 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003168 if test "x${prefix}" = "xNONE"; then
3169 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3170 else
3171 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3172 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003173 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003174 ;;
3175 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003176 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003177 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003179 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003180 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3181 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003182 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003183 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003184
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003185 if test "x${prefix}" = "xNONE" ; then
3186 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003187
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003188 else
3189 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3190 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003191
3192 case "${enableval}" in
3193 /System*)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 if test "${prefix}" = "NONE" ; then
3196 # See below
3197 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3198 fi
3199 ;;
3200
3201 /Library*)
3202 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3203 ;;
3204
3205 */Library/Frameworks)
3206 MDIR="`dirname "${enableval}"`"
3207 MDIR="`dirname "${MDIR}"`"
3208 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3209
3210 if test "${prefix}" = "NONE"; then
3211 # User hasn't specified the
3212 # --prefix option, but wants to install
3213 # the framework in a non-default location,
3214 # ensure that the compatibility links get
3215 # installed relative to that prefix as well
3216 # instead of in /usr/local.
3217 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3218 fi
3219 ;;
3220
3221 *)
3222 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3223 ;;
3224 esac
3225
Jack Jansen127e56e2001-09-11 14:41:54 +00003226 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003229 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003234 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3235
3236 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003239
Guido van Rossum563e7081996-09-10 18:20:48 +00003240else
Martin v. Löwis11437992002-04-12 09:54:03 +00003241
Jack Jansene578a632001-08-15 01:27:14 +00003242 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003243 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003244 PYTHONFRAMEWORKPREFIX=
3245 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246 FRAMEWORKINSTALLFIRST=
3247 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248 FRAMEWORKALTINSTALLFIRST=
3249 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003250 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003251 if test "x${prefix}" = "xNONE" ; then
3252 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3253 else
3254 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3255 fi
Jack Jansene578a632001-08-15 01:27:14 +00003256 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259fi
3260
Thomas Wouters477c8d52006-05-27 19:21:47 +00003261
3262
Michael W. Hudson54241132001-12-07 15:38:26 +00003263
3264
3265
3266
Jack Jansene578a632001-08-15 01:27:14 +00003267
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003268
3269
3270
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003271
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003272
Ned Deilyb8f944f2013-11-21 22:42:25 -08003273
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003274
3275cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003276#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003277_ACEOF
3278
3279
Jack Jansene578a632001-08-15 01:27:14 +00003280##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003281## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003282## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003283##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284# Set name for machine-dependent library files
3285
Matthias Kloseb9621712010-04-24 17:59:49 +00003286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3287$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288if test -z "$MACHDEP"
3289then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 # avoid using uname for cross builds
3291 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003292 # ac_sys_system and ac_sys_release are used for setting
3293 # a lot of different things including 'define_xopen_source'
3294 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003296 *-*-linux-android*)
3297 ac_sys_system=Linux-android
3298 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003299 *-*-linux*)
3300 ac_sys_system=Linux
3301 ;;
3302 *-*-cygwin*)
3303 ac_sys_system=Cygwin
3304 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003305 *-*-vxworks*)
3306 ac_sys_system=VxWorks
3307 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003308 *)
3309 # for now, limit cross builds to known configurations
3310 MACHDEP="unknown"
3311 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3312 esac
3313 ac_sys_release=
3314 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003315 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003316 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003317 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003318 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003319 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003320 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003321 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003322 fi
3323 ac_md_system=`echo $ac_sys_system |
3324 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3325 ac_md_release=`echo $ac_sys_release |
3326 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3327 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003328
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003329 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003330 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003331 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003332 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003333 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003334 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003335 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003336fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3338$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003339
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003340
3341if test "$cross_compiling" = yes; then
3342 case "$host" in
3343 *-*-linux*)
3344 case "$host_cpu" in
3345 arm*)
3346 _host_cpu=arm
3347 ;;
3348 *)
3349 _host_cpu=$host_cpu
3350 esac
3351 ;;
3352 *-*-cygwin*)
3353 _host_cpu=
3354 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003355 *-*-vxworks*)
3356 _host_cpu=$host_cpu
3357 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003358 *)
3359 # for now, limit cross builds to known configurations
3360 MACHDEP="unknown"
3361 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3362 esac
3363 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3364fi
3365
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003366# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3367# disable features if it is defined, without any means to access these
3368# features as extensions. For these systems, we skip the definition of
3369# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3370# some feature, make sure there is no alternative way to access this
3371# feature. Also, when using wildcards, make sure you have verified the
3372# need for not defining _XOPEN_SOURCE on all systems matching the
3373# wildcard, and that the wildcard does not include future systems
3374# (which may remove their limitations).
3375case $ac_sys_system/$ac_sys_release in
3376 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3377 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003378 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003379 # In addition, Stefan Krah confirms that issue #1244610 exists through
3380 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003381 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003382 define_xopen_source=no
3383 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3384 # also defined. This can be overridden by defining _BSD_SOURCE
3385 # As this has a different meaning on Linux, only define it on OpenBSD
3386
Matthias Kloseb9621712010-04-24 17:59:49 +00003387$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003388
3389 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003390 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003391 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3392 # also defined. This can be overridden by defining _BSD_SOURCE
3393 # As this has a different meaning on Linux, only define it on OpenBSD
3394
Matthias Kloseb9621712010-04-24 17:59:49 +00003395$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003396
3397 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003398 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3399 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3400 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003401 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 +00003402 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003403 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3404 # request to enable features supported by the standard as a request
3405 # to disable features not supported by the standard. The best way
3406 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3407 # entirely and define __EXTENSIONS__ instead.
3408 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003409 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003410 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3411 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003412 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003413 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003414 define_xopen_source=no;;
3415 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003416 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003417 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003418 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003419 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3420 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3421 # identifies itself as Darwin/7.*
3422 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3423 # disables platform specific features beyond repair.
3424 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3425 # has no effect, don't bother defining them
3426 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003427 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003428 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003429 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003430 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3431 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3432 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003433 AIX/4)
3434 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003435 AIX/5)
3436 if test `uname -r` -eq 1; then
3437 define_xopen_source=no
3438 fi
3439 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003440 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3441 # defining NI_NUMERICHOST.
3442 QNX/6.3.2)
3443 define_xopen_source=no
3444 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003445 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3446 # in network headers still using system V types.
3447 VxWorks/*)
3448 define_xopen_source=no
3449 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003450
Ian Nortona9edf442020-02-14 03:09:11 +00003451 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3452 # chroot() and other functions
3453 hp*|HP*)
3454 define_xopen_source=no
3455 ;;
3456
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003457esac
3458
3459if test $define_xopen_source = yes
3460then
Victor Stinner14d098d2011-09-07 22:29:43 +02003461 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003462
Victor Stinner14d098d2011-09-07 22:29:43 +02003463$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003464
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
3466 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3467 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3468 # several APIs are not declared. Since this is also needed in some
3469 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003470
Matthias Kloseb9621712010-04-24 17:59:49 +00003471$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003472
3473
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003474
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003475$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003476
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003477fi
3478
Christian Heimes647cd872013-12-07 23:39:33 +01003479# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3480case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003481 hp*|HP*)
3482 define_stdc_a1=yes;;
3483 *)
3484 define_stdc_a1=no;;
3485esac
3486
3487if test $define_stdc_a1 = yes
3488then
Christian Heimes647cd872013-12-07 23:39:33 +01003489
3490$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3491
Christian Heimesb02bcae2013-12-08 15:21:08 +01003492fi
Christian Heimes647cd872013-12-07 23:39:33 +01003493
Jack Jansen6b08a402004-06-03 12:41:45 +00003494# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3495# it may influence the way we can build extensions, so distutils
3496# needs to check it
3497
Thomas Wouters477c8d52006-05-27 19:21:47 +00003498
Jack Jansen6b08a402004-06-03 12:41:45 +00003499CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003500EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003501
Guido van Rossum627b2d71993-12-24 10:39:16 +00003502# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003503
3504# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3505# for debug/optimization stuff. BASECFLAGS is for flags that are required
3506# just to get things to compile and link. Users are free to override OPT
3507# when running configure or make. The build should not break if they do.
3508# BASECFLAGS should generally not be messed with, however.
3509
Guido van Rossum8b131c51995-03-09 14:10:13 +00003510# If the user switches compilers, we can't believe the cache
3511if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3512then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003513 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003514(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003515fi
3516
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003517# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3518# when the compiler supports them, but we don't always want -O2, and
3519# we set -g later.
3520if test -z "$CFLAGS"; then
3521 CFLAGS=
3522fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003523
3524if test "$ac_sys_system" = "Darwin"
3525then
3526 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003527 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003528 # information
3529 if test -z "${CC}"
3530 then
3531 found_gcc=
3532 found_clang=
3533 as_save_IFS=$IFS; IFS=:
3534 for as_dir in $PATH
3535 do
3536 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003537 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003538 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003539 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540 fi
3541 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003542 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003544 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003545 fi
3546 fi
3547 done
3548 IFS=$as_save_IFS
3549
3550 if test -n "$found_gcc" -a -n "$found_clang"
3551 then
3552 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3553 then
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3555$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3556 CC="$found_clang"
3557 CXX="$found_clang++"
3558 fi
3559
3560
3561 elif test -z "$found_gcc" -a -n "$found_clang"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3564$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3565 CC="$found_clang"
3566 CXX="$found_clang++"
3567
3568 elif test -z "$found_gcc" -a -z "$found_clang"
3569 then
3570 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3571 if test -n "${found_clang}"
3572 then
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3574$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3575 CC="${found_clang}"
3576 CXX="`/usr/bin/xcrun -find clang++`"
3577
3578 # else: use default behaviour
3579 fi
3580 fi
3581 fi
3582fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003583ac_ext=c
3584ac_cpp='$CPP $CPPFLAGS'
3585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3587ac_compiler_gnu=$ac_cv_c_compiler_gnu
3588if test -n "$ac_tool_prefix"; then
3589 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3590set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003593if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003595else
3596 if test -n "$CC"; then
3597 ac_cv_prog_CC="$CC" # Let the user override the test.
3598else
Martin v. Löwis11437992002-04-12 09:54:03 +00003599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600for as_dir in $PATH
3601do
3602 IFS=$as_save_IFS
3603 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $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 +00003608 break 2
3609 fi
3610done
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
Jack Jansendd19cf82001-12-06 22:36:17 +00003614fi
3615fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003616CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003617if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3619$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003620else
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3622$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627if test -z "$ac_cv_prog_CC"; then
3628 ac_ct_CC=$CC
3629 # Extract the first word of "gcc", so it can be a program name with args.
3630set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3632$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003633if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003635else
3636 if test -n "$ac_ct_CC"; then
3637 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3638else
3639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3640for as_dir in $PATH
3641do
3642 IFS=$as_save_IFS
3643 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 $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 +00003648 break 2
3649 fi
3650done
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003653
3654fi
3655fi
3656ac_ct_CC=$ac_cv_prog_ac_ct_CC
3657if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3659$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003660else
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3662$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663fi
3664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665 if test "x$ac_ct_CC" = x; then
3666 CC=""
3667 else
3668 case $cross_compiling:$ac_tool_warned in
3669yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672ac_tool_warned=yes ;;
3673esac
3674 CC=$ac_ct_CC
3675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
3677 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003678fi
3679
Jack Jansendd19cf82001-12-06 22:36:17 +00003680if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 if test -n "$ac_tool_prefix"; then
3682 # 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 +00003683set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3685$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003686if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003688else
3689 if test -n "$CC"; then
3690 ac_cv_prog_CC="$CC" # Let the user override the test.
3691else
Martin v. Löwis11437992002-04-12 09:54:03 +00003692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3693for as_dir in $PATH
3694do
3695 IFS=$as_save_IFS
3696 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 $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 +00003701 break 2
3702 fi
3703done
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003706
3707fi
3708fi
3709CC=$ac_cv_prog_CC
3710if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3712$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713else
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3715$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003716fi
3717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720fi
3721if test -z "$CC"; then
3722 # Extract the first word of "cc", so it can be a program name with args.
3723set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3725$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003726if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003728else
3729 if test -n "$CC"; then
3730 ac_cv_prog_CC="$CC" # Let the user override the test.
3731else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734for as_dir in $PATH
3735do
3736 IFS=$as_save_IFS
3737 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3741 ac_prog_rejected=yes
3742 continue
3743 fi
3744 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $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 +00003746 break 2
3747 fi
3748done
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003751
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752if test $ac_prog_rejected = yes; then
3753 # We found a bogon in the path, so make sure we never use it.
3754 set dummy $ac_cv_prog_CC
3755 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757 # We chose a different compiler from the bogus one.
3758 # However, it has the same basename, so the bogon will be chosen
3759 # first if we set CC to just the basename; use the full file name.
3760 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003761 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762 fi
3763fi
3764fi
3765fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003766CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3769$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770else
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773fi
3774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776fi
3777if test -z "$CC"; then
3778 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 do
3781 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3782set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003785if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003787else
3788 if test -n "$CC"; then
3789 ac_cv_prog_CC="$CC" # Let the user override the test.
3790else
Martin v. Löwis11437992002-04-12 09:54:03 +00003791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792for as_dir in $PATH
3793do
3794 IFS=$as_save_IFS
3795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 $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 +00003800 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802done
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003805
3806fi
3807fi
3808CC=$ac_cv_prog_CC
3809if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3811$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003815fi
3816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 test -n "$CC" && break
3819 done
3820fi
3821if test -z "$CC"; then
3822 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003824do
3825 # Extract the first word of "$ac_prog", so it can be a program name with args.
3826set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003829if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003831else
3832 if test -n "$ac_ct_CC"; then
3833 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3834else
3835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836for as_dir in $PATH
3837do
3838 IFS=$as_save_IFS
3839 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 $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 +00003844 break 2
3845 fi
3846done
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
3851fi
3852ac_ct_CC=$ac_cv_prog_ac_ct_CC
3853if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3855$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003856else
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 test -n "$ac_ct_CC" && break
3863done
Michael W. Hudson54241132001-12-07 15:38:26 +00003864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865 if test "x$ac_ct_CC" = x; then
3866 CC=""
3867 else
3868 case $cross_compiling:$ac_tool_warned in
3869yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003870{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872ac_tool_warned=yes ;;
3873esac
3874 CC=$ac_ct_CC
3875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
3877
3878fi
3879
3880
Matthias Kloseb9621712010-04-24 17:59:49 +00003881test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003883as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003884See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003885
3886# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003887$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3888set X $ac_compile
3889ac_compiler=$2
3890for ac_option in --version -v -V -qversion; do
3891 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892case "(($ac_try" in
3893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894 *) ac_try_echo=$ac_try;;
3895esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897$as_echo "$ac_try_echo"; } >&5
3898 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003899 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003900 if test -s conftest.err; then
3901 sed '10a\
3902... rest of stderr output deleted ...
3903 10q' conftest.err >conftest.er1
3904 cat conftest.er1 >&5
3905 fi
3906 rm -f conftest.er1 conftest.err
3907 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3908 test $ac_status = 0; }
3909done
Martin v. Löwis11437992002-04-12 09:54:03 +00003910
Matthias Kloseb9621712010-04-24 17:59:49 +00003911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003912/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003913
Martin v. Löwis11437992002-04-12 09:54:03 +00003914int
3915main ()
3916{
3917
3918 ;
3919 return 0;
3920}
3921_ACEOF
3922ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003923ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003924# Try to create an executable without -o first, disregard a.out.
3925# It will help us diagnose broken compilers, and finding out an intuition
3926# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3928$as_echo_n "checking whether the C compiler works... " >&6; }
3929ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3930
3931# The possible output files:
3932ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934ac_rmfiles=
3935for ac_file in $ac_files
3936do
3937 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3940 esac
3941done
3942rm -f $ac_rmfiles
3943
Matthias Kloseb9621712010-04-24 17:59:49 +00003944if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3954 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3956# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3957# in a Makefile. We should not override ac_cv_exeext if it was cached,
3958# so that the user can short-circuit this test for compilers unknown to
3959# Autoconf.
3960for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003961do
3962 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003964 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965 ;;
3966 [ab].out )
3967 # We found the default executable, but exeext='' is most
3968 # certainly right.
3969 break;;
3970 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 then :; else
3973 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3974 fi
3975 # We set ac_cv_exeext here because the later test for it is not
3976 # safe: cross compilers may not add the suffix if given an `-o'
3977 # argument, so we may need to know it at that point already.
3978 # Even if this section looks crufty: it has the advantage of
3979 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003980 break;;
3981 * )
3982 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 esac
3984done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985test "$ac_cv_exeext" = no && ac_cv_exeext=
3986
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003987else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988 ac_file=''
3989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003990if test -z "$ac_file"; then :
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3992$as_echo "no" >&6; }
3993$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003994sed 's/^/| /' conftest.$ac_ext >&5
3995
Matthias Kloseb9621712010-04-24 17:59:49 +00003996{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003998as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003999See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004000else
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4002$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4005$as_echo_n "checking for C compiler default output file name... " >&6; }
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4007$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009
Matthias Kloseb9621712010-04-24 17:59:49 +00004010rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4013$as_echo_n "checking for suffix of executables... " >&6; }
4014if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004022 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4026# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4027# work properly (i.e., refer to `conftest.exe'), while it won't with
4028# `rm'.
4029for ac_file in conftest.exe conftest conftest.*; do
4030 test -f "$ac_file" || continue
4031 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4034 break;;
4035 * ) break;;
4036 esac
4037done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004038else
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004041as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004042See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004044rm -f conftest conftest$ac_cv_exeext
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4046$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047
4048rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004049EXEEXT=$ac_cv_exeext
4050ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4052/* end confdefs.h. */
4053#include <stdio.h>
4054int
4055main ()
4056{
4057FILE *f = fopen ("conftest.out", "w");
4058 return ferror (f) || fclose (f) != 0;
4059
4060 ;
4061 return 0;
4062}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004064ac_clean_files="$ac_clean_files conftest.out"
4065# Check that the compiler produces executables we can run. If not, either
4066# the compiler is broken, or we cross compile.
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4068$as_echo_n "checking whether we are cross compiling... " >&6; }
4069if test "$cross_compiling" != yes; then
4070 { { ac_try="$ac_link"
4071case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
4075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
4077 (eval "$ac_link") 2>&5
4078 ac_status=$?
4079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }
4081 if { ac_try='./conftest$ac_cv_exeext'
4082 { { case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
4086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
4088 (eval "$ac_try") 2>&5
4089 ac_status=$?
4090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; }; then
4092 cross_compiling=no
4093 else
4094 if test "$cross_compiling" = maybe; then
4095 cross_compiling=yes
4096 else
4097 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004099as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004100If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004101See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 fi
4103 fi
4104fi
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4106$as_echo "$cross_compiling" >&6; }
4107
4108rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4109ac_clean_files=$ac_clean_files_save
4110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4111$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004112if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 $as_echo_n "(cached) " >&6
4114else
4115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004116/* end confdefs.h. */
4117
4118int
4119main ()
4120{
4121
4122 ;
4123 return 0;
4124}
4125_ACEOF
4126rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004127if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128case "(($ac_try" in
4129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4130 *) ac_try_echo=$ac_try;;
4131esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004132eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4133$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4137 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004138 for ac_file in conftest.o conftest.obj conftest.*; do
4139 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4143 break;;
4144 esac
4145done
4146else
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004148sed 's/^/| /' conftest.$ac_ext >&5
4149
Matthias Kloseb9621712010-04-24 17:59:49 +00004150{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004152as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004153See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004154fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004155rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4158$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004159OBJEXT=$ac_cv_objext
4160ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4162$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004163if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004168
Martin v. Löwis11437992002-04-12 09:54:03 +00004169int
4170main ()
4171{
4172#ifndef __GNUC__
4173 choke me
4174#endif
4175
4176 ;
4177 return 0;
4178}
4179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 ac_compiler_gnu=yes
4182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186ac_cv_c_compiler_gnu=$ac_compiler_gnu
4187
4188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4190$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4191if test $ac_compiler_gnu = yes; then
4192 GCC=yes
4193else
4194 GCC=
4195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004196ac_test_CFLAGS=${CFLAGS+set}
4197ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4199$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004200if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004202else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203 ac_save_c_werror_flag=$ac_c_werror_flag
4204 ac_c_werror_flag=yes
4205 ac_cv_prog_cc_g=no
4206 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004209
Martin v. Löwis11437992002-04-12 09:54:03 +00004210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004219 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220else
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 CFLAGS=""
4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223/* end confdefs.h. */
4224
4225int
4226main ()
4227{
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004233if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234
Matthias Kloseb9621712010-04-24 17:59:49 +00004235else
4236 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239/* end confdefs.h. */
4240
4241int
4242main ()
4243{
4244
4245 ;
4246 return 0;
4247}
4248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004249if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4257 ac_c_werror_flag=$ac_save_c_werror_flag
4258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4260$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004263elif test $ac_cv_prog_cc_g = yes; then
4264 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004265 CFLAGS="-g -O2"
4266 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268 fi
4269else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270 if test "$GCC" = yes; then
4271 CFLAGS="-O2"
4272 else
4273 CFLAGS=
4274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4277$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004278if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004279 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004280else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004282ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004284/* end confdefs.h. */
4285#include <stdarg.h>
4286#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004287struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004288/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4289struct buf { int x; };
4290FILE * (*rcsopen) (struct buf *, struct stat *, int);
4291static char *e (p, i)
4292 char **p;
4293 int i;
4294{
4295 return p[i];
4296}
4297static char *f (char * (*g) (char **, int), char **p, ...)
4298{
4299 char *s;
4300 va_list v;
4301 va_start (v,p);
4302 s = g (p, va_arg (v,int));
4303 va_end (v);
4304 return s;
4305}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306
4307/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4308 function prototypes and stuff, but not '\xHH' hex character constants.
4309 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4312 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004314int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4317 inside strings and character constants. */
4318#define FOO(x) 'x'
4319int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4320
Skip Montanaro6dead952003-09-25 14:50:04 +00004321int test (int i, double x);
4322struct s1 {int (*f) (int a);};
4323struct s2 {int (*f) (double a);};
4324int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4325int argc;
4326char **argv;
4327int
4328main ()
4329{
4330return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4331 ;
4332 return 0;
4333}
4334_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4336 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004337do
4338 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342rm -f core conftest.err conftest.$ac_objext
4343 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004344done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004346CC=$ac_save_CC
4347
4348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349# AC_CACHE_VAL
4350case "x$ac_cv_prog_cc_c89" in
4351 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4353$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4356$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004357 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4360$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004361esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004362if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004363
Matthias Kloseb9621712010-04-24 17:59:49 +00004364fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004365
Martin v. Löwis11437992002-04-12 09:54:03 +00004366ac_ext=c
4367ac_cpp='$CPP $CPPFLAGS'
4368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4370ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004371
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004372ac_ext=c
4373ac_cpp='$CPP $CPPFLAGS'
4374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4376ac_compiler_gnu=$ac_cv_c_compiler_gnu
4377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4378$as_echo_n "checking how to run the C preprocessor... " >&6; }
4379# On Suns, sometimes $CPP names a directory.
4380if test -n "$CPP" && test -d "$CPP"; then
4381 CPP=
4382fi
4383if test -z "$CPP"; then
4384 if ${ac_cv_prog_CPP+:} false; then :
4385 $as_echo_n "(cached) " >&6
4386else
4387 # Double quotes because CPP needs to be expanded
4388 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4389 do
4390 ac_preproc_ok=false
4391for ac_c_preproc_warn_flag in '' yes
4392do
4393 # Use a header file that comes with gcc, so configuring glibc
4394 # with a fresh cross-compiler works.
4395 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4396 # <limits.h> exists even on freestanding compilers.
4397 # On the NeXT, cc -E runs the code through the compiler's parser,
4398 # not just through cpp. "Syntax error" is here to catch this case.
4399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4400/* end confdefs.h. */
4401#ifdef __STDC__
4402# include <limits.h>
4403#else
4404# include <assert.h>
4405#endif
4406 Syntax error
4407_ACEOF
4408if ac_fn_c_try_cpp "$LINENO"; then :
4409
4410else
4411 # Broken: fails on valid input.
4412continue
4413fi
4414rm -f conftest.err conftest.i conftest.$ac_ext
4415
4416 # OK, works on sane cases. Now check whether nonexistent headers
4417 # can be detected and how.
4418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4419/* end confdefs.h. */
4420#include <ac_nonexistent.h>
4421_ACEOF
4422if ac_fn_c_try_cpp "$LINENO"; then :
4423 # Broken: success on invalid input.
4424continue
4425else
4426 # Passes both tests.
4427ac_preproc_ok=:
4428break
4429fi
4430rm -f conftest.err conftest.i conftest.$ac_ext
4431
4432done
4433# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4434rm -f conftest.i conftest.err conftest.$ac_ext
4435if $ac_preproc_ok; then :
4436 break
4437fi
4438
4439 done
4440 ac_cv_prog_CPP=$CPP
4441
4442fi
4443 CPP=$ac_cv_prog_CPP
4444else
4445 ac_cv_prog_CPP=$CPP
4446fi
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4448$as_echo "$CPP" >&6; }
4449ac_preproc_ok=false
4450for ac_c_preproc_warn_flag in '' yes
4451do
4452 # Use a header file that comes with gcc, so configuring glibc
4453 # with a fresh cross-compiler works.
4454 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4455 # <limits.h> exists even on freestanding compilers.
4456 # On the NeXT, cc -E runs the code through the compiler's parser,
4457 # not just through cpp. "Syntax error" is here to catch this case.
4458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4459/* end confdefs.h. */
4460#ifdef __STDC__
4461# include <limits.h>
4462#else
4463# include <assert.h>
4464#endif
4465 Syntax error
4466_ACEOF
4467if ac_fn_c_try_cpp "$LINENO"; then :
4468
4469else
4470 # Broken: fails on valid input.
4471continue
4472fi
4473rm -f conftest.err conftest.i conftest.$ac_ext
4474
4475 # OK, works on sane cases. Now check whether nonexistent headers
4476 # can be detected and how.
4477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4478/* end confdefs.h. */
4479#include <ac_nonexistent.h>
4480_ACEOF
4481if ac_fn_c_try_cpp "$LINENO"; then :
4482 # Broken: success on invalid input.
4483continue
4484else
4485 # Passes both tests.
4486ac_preproc_ok=:
4487break
4488fi
4489rm -f conftest.err conftest.i conftest.$ac_ext
4490
4491done
4492# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4493rm -f conftest.i conftest.err conftest.$ac_ext
4494if $ac_preproc_ok; then :
4495
4496else
4497 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4499as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4500See \`config.log' for more details" "$LINENO" 5; }
4501fi
4502
4503ac_ext=c
4504ac_cpp='$CPP $CPPFLAGS'
4505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4507ac_compiler_gnu=$ac_cv_c_compiler_gnu
4508
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4510$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4511if ${ac_cv_path_GREP+:} false; then :
4512 $as_echo_n "(cached) " >&6
4513else
4514 if test -z "$GREP"; then
4515 ac_path_GREP_found=false
4516 # Loop through the user's path and test for each of PROGNAME-LIST
4517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4519do
4520 IFS=$as_save_IFS
4521 test -z "$as_dir" && as_dir=.
4522 for ac_prog in grep ggrep; do
4523 for ac_exec_ext in '' $ac_executable_extensions; do
4524 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4525 as_fn_executable_p "$ac_path_GREP" || continue
4526# Check for GNU ac_path_GREP and select it if it is found.
4527 # Check for GNU $ac_path_GREP
4528case `"$ac_path_GREP" --version 2>&1` in
4529*GNU*)
4530 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4531*)
4532 ac_count=0
4533 $as_echo_n 0123456789 >"conftest.in"
4534 while :
4535 do
4536 cat "conftest.in" "conftest.in" >"conftest.tmp"
4537 mv "conftest.tmp" "conftest.in"
4538 cp "conftest.in" "conftest.nl"
4539 $as_echo 'GREP' >> "conftest.nl"
4540 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4541 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4542 as_fn_arith $ac_count + 1 && ac_count=$as_val
4543 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4544 # Best one so far, save it but keep looking for a better one
4545 ac_cv_path_GREP="$ac_path_GREP"
4546 ac_path_GREP_max=$ac_count
4547 fi
4548 # 10*(2^10) chars as input seems more than enough
4549 test $ac_count -gt 10 && break
4550 done
4551 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4552esac
4553
4554 $ac_path_GREP_found && break 3
4555 done
4556 done
4557 done
4558IFS=$as_save_IFS
4559 if test -z "$ac_cv_path_GREP"; then
4560 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4561 fi
4562else
4563 ac_cv_path_GREP=$GREP
4564fi
4565
4566fi
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4568$as_echo "$ac_cv_path_GREP" >&6; }
4569 GREP="$ac_cv_path_GREP"
4570
4571
Łukasz Langaa785c872016-09-09 17:37:37 -07004572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4573$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4574if ${ac_cv_path_SED+:} false; then :
4575 $as_echo_n "(cached) " >&6
4576else
4577 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4578 for ac_i in 1 2 3 4 5 6 7; do
4579 ac_script="$ac_script$as_nl$ac_script"
4580 done
4581 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4582 { ac_script=; unset ac_script;}
4583 if test -z "$SED"; then
4584 ac_path_SED_found=false
4585 # Loop through the user's path and test for each of PROGNAME-LIST
4586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4587for as_dir in $PATH
4588do
4589 IFS=$as_save_IFS
4590 test -z "$as_dir" && as_dir=.
4591 for ac_prog in sed gsed; do
4592 for ac_exec_ext in '' $ac_executable_extensions; do
4593 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4594 as_fn_executable_p "$ac_path_SED" || continue
4595# Check for GNU ac_path_SED and select it if it is found.
4596 # Check for GNU $ac_path_SED
4597case `"$ac_path_SED" --version 2>&1` in
4598*GNU*)
4599 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4600*)
4601 ac_count=0
4602 $as_echo_n 0123456789 >"conftest.in"
4603 while :
4604 do
4605 cat "conftest.in" "conftest.in" >"conftest.tmp"
4606 mv "conftest.tmp" "conftest.in"
4607 cp "conftest.in" "conftest.nl"
4608 $as_echo '' >> "conftest.nl"
4609 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4610 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4611 as_fn_arith $ac_count + 1 && ac_count=$as_val
4612 if test $ac_count -gt ${ac_path_SED_max-0}; then
4613 # Best one so far, save it but keep looking for a better one
4614 ac_cv_path_SED="$ac_path_SED"
4615 ac_path_SED_max=$ac_count
4616 fi
4617 # 10*(2^10) chars as input seems more than enough
4618 test $ac_count -gt 10 && break
4619 done
4620 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4621esac
4622
4623 $ac_path_SED_found && break 3
4624 done
4625 done
4626 done
4627IFS=$as_save_IFS
4628 if test -z "$ac_cv_path_SED"; then
4629 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4630 fi
4631else
4632 ac_cv_path_SED=$SED
4633fi
4634
4635fi
4636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4637$as_echo "$ac_cv_path_SED" >&6; }
4638 SED="$ac_cv_path_SED"
4639 rm -f conftest.sed
4640
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004641
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004642
4643
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4645$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004647# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004648if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004649 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004650
4651 case $withval in
4652 no) with_cxx_main=no
4653 MAINCC='$(CC)';;
4654 yes) with_cxx_main=yes
4655 MAINCC='$(CXX)';;
4656 *) with_cxx_main=yes
4657 MAINCC=$withval
4658 if test -z "$CXX"
4659 then
4660 CXX=$withval
4661 fi;;
4662 esac
4663else
4664
4665 with_cxx_main=no
4666 MAINCC='$(CC)'
4667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004668fi
4669
Matthias Kloseb9621712010-04-24 17:59:49 +00004670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4671$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004672
4673preset_cxx="$CXX"
4674if test -z "$CXX"
4675then
4676 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004677 gcc) if test -n "$ac_tool_prefix"; then
4678 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4679set dummy ${ac_tool_prefix}g++; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_CXX+:} false; then :
4683 $as_echo_n "(cached) " >&6
4684else
4685 case $CXX in
4686 [\\/]* | ?:[\\/]*)
4687 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4688 ;;
4689 *)
4690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in notfound
4692do
4693 IFS=$as_save_IFS
4694 test -z "$as_dir" && as_dir=.
4695 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699 break 2
4700 fi
4701done
4702 done
4703IFS=$as_save_IFS
4704
4705 ;;
4706esac
4707fi
4708CXX=$ac_cv_path_CXX
4709if test -n "$CXX"; then
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4711$as_echo "$CXX" >&6; }
4712else
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718fi
4719if test -z "$ac_cv_path_CXX"; then
4720 ac_pt_CXX=$CXX
4721 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4724$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004725if ${ac_cv_path_ac_pt_CXX+:} false; then :
4726 $as_echo_n "(cached) " >&6
4727else
4728 case $ac_pt_CXX in
4729 [\\/]* | ?:[\\/]*)
4730 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4731 ;;
4732 *)
4733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4734for as_dir in notfound
4735do
4736 IFS=$as_save_IFS
4737 test -z "$as_dir" && as_dir=.
4738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004740 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4742 break 2
4743 fi
4744done
4745 done
4746IFS=$as_save_IFS
4747
4748 ;;
4749esac
4750fi
4751ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4752if test -n "$ac_pt_CXX"; then
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4754$as_echo "$ac_pt_CXX" >&6; }
4755else
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4757$as_echo "no" >&6; }
4758fi
4759
4760 if test "x$ac_pt_CXX" = x; then
4761 CXX="g++"
4762 else
4763 case $cross_compiling:$ac_tool_warned in
4764yes:)
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4766$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4767ac_tool_warned=yes ;;
4768esac
4769 CXX=$ac_pt_CXX
4770 fi
4771else
4772 CXX="$ac_cv_path_CXX"
4773fi
4774 ;;
4775 cc) if test -n "$ac_tool_prefix"; then
4776 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4777set dummy ${ac_tool_prefix}c++; ac_word=$2
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004780if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782else
4783 case $CXX in
4784 [\\/]* | ?:[\\/]*)
4785 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4786 ;;
4787 *)
4788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789for as_dir in notfound
4790do
4791 IFS=$as_save_IFS
4792 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797 break 2
4798 fi
4799done
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004801IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 ;;
4804esac
4805fi
4806CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004807if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4809$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004810else
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004814
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004815
4816fi
4817if test -z "$ac_cv_path_CXX"; then
4818 ac_pt_CXX=$CXX
4819 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4822$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004825else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004827 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004828 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 +00004829 ;;
4830 *)
4831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4832for as_dir in notfound
4833do
4834 IFS=$as_save_IFS
4835 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004836 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004838 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840 break 2
4841 fi
4842done
Matthias Kloseb9621712010-04-24 17:59:49 +00004843 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004844IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846 ;;
4847esac
4848fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4850if test -n "$ac_pt_CXX"; then
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4852$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004853else
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004857
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858 if test "x$ac_pt_CXX" = x; then
4859 CXX="c++"
4860 else
4861 case $cross_compiling:$ac_tool_warned in
4862yes:)
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4865ac_tool_warned=yes ;;
4866esac
4867 CXX=$ac_pt_CXX
4868 fi
4869else
4870 CXX="$ac_cv_path_CXX"
4871fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004872 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004873 clang|*/clang) if test -n "$ac_tool_prefix"; then
4874 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4875set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4877$as_echo_n "checking for $ac_word... " >&6; }
4878if ${ac_cv_path_CXX+:} false; then :
4879 $as_echo_n "(cached) " >&6
4880else
4881 case $CXX in
4882 [\\/]* | ?:[\\/]*)
4883 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4884 ;;
4885 *)
4886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887for as_dir in notfound
4888do
4889 IFS=$as_save_IFS
4890 test -z "$as_dir" && as_dir=.
4891 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004893 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4895 break 2
4896 fi
4897done
4898 done
4899IFS=$as_save_IFS
4900
Ned Deilycbfb9a52012-06-23 16:02:19 -07004901 ;;
4902esac
4903fi
4904CXX=$ac_cv_path_CXX
4905if test -n "$CXX"; then
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4907$as_echo "$CXX" >&6; }
4908else
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910$as_echo "no" >&6; }
4911fi
4912
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004913
4914fi
4915if test -z "$ac_cv_path_CXX"; then
4916 ac_pt_CXX=$CXX
4917 # Extract the first word of "clang++", so it can be a program name with args.
4918set dummy clang++; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_ac_pt_CXX+:} false; then :
4922 $as_echo_n "(cached) " >&6
4923else
4924 case $ac_pt_CXX in
4925 [\\/]* | ?:[\\/]*)
4926 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4927 ;;
4928 *)
4929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in notfound
4931do
4932 IFS=$as_save_IFS
4933 test -z "$as_dir" && as_dir=.
4934 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004936 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938 break 2
4939 fi
4940done
4941 done
4942IFS=$as_save_IFS
4943
4944 ;;
4945esac
4946fi
4947ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4948if test -n "$ac_pt_CXX"; then
4949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4950$as_echo "$ac_pt_CXX" >&6; }
4951else
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956 if test "x$ac_pt_CXX" = x; then
4957 CXX="clang++"
4958 else
4959 case $cross_compiling:$ac_tool_warned in
4960yes:)
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4962$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4963ac_tool_warned=yes ;;
4964esac
4965 CXX=$ac_pt_CXX
4966 fi
4967else
4968 CXX="$ac_cv_path_CXX"
4969fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004970 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004971 icc|*/icc) if test -n "$ac_tool_prefix"; then
4972 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4973set dummy ${ac_tool_prefix}icpc; ac_word=$2
4974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4975$as_echo_n "checking for $ac_word... " >&6; }
4976if ${ac_cv_path_CXX+:} false; then :
4977 $as_echo_n "(cached) " >&6
4978else
4979 case $CXX in
4980 [\\/]* | ?:[\\/]*)
4981 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4982 ;;
4983 *)
4984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4985for as_dir in notfound
4986do
4987 IFS=$as_save_IFS
4988 test -z "$as_dir" && as_dir=.
4989 for ac_exec_ext in '' $ac_executable_extensions; do
4990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4991 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4993 break 2
4994 fi
4995done
4996 done
4997IFS=$as_save_IFS
4998
4999 ;;
5000esac
5001fi
5002CXX=$ac_cv_path_CXX
5003if test -n "$CXX"; then
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5005$as_echo "$CXX" >&6; }
5006else
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5008$as_echo "no" >&6; }
5009fi
5010
5011
5012fi
5013if test -z "$ac_cv_path_CXX"; then
5014 ac_pt_CXX=$CXX
5015 # Extract the first word of "icpc", so it can be a program name with args.
5016set dummy icpc; ac_word=$2
5017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018$as_echo_n "checking for $ac_word... " >&6; }
5019if ${ac_cv_path_ac_pt_CXX+:} false; then :
5020 $as_echo_n "(cached) " >&6
5021else
5022 case $ac_pt_CXX in
5023 [\\/]* | ?:[\\/]*)
5024 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5025 ;;
5026 *)
5027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028for as_dir in notfound
5029do
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
5032 for ac_exec_ext in '' $ac_executable_extensions; do
5033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5034 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5036 break 2
5037 fi
5038done
5039 done
5040IFS=$as_save_IFS
5041
5042 ;;
5043esac
5044fi
5045ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5046if test -n "$ac_pt_CXX"; then
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5048$as_echo "$ac_pt_CXX" >&6; }
5049else
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
5052fi
5053
5054 if test "x$ac_pt_CXX" = x; then
5055 CXX="icpc"
5056 else
5057 case $cross_compiling:$ac_tool_warned in
5058yes:)
5059{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5060$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5061ac_tool_warned=yes ;;
5062esac
5063 CXX=$ac_pt_CXX
5064 fi
5065else
5066 CXX="$ac_cv_path_CXX"
5067fi
5068 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005069 esac
5070 if test "$CXX" = "notfound"
5071 then
5072 CXX=""
5073 fi
5074fi
5075if test -z "$CXX"
5076then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005077 if test -n "$ac_tool_prefix"; then
5078 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5079 do
5080 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005084if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086else
5087 if test -n "$CXX"; then
5088 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5089else
5090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5091for as_dir in $PATH
5092do
5093 IFS=$as_save_IFS
5094 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099 break 2
5100 fi
5101done
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005103IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104
5105fi
5106fi
5107CXX=$ac_cv_prog_CXX
5108if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5110$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005111else
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114fi
5115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005116
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005117 test -n "$CXX" && break
5118 done
5119fi
5120if test -z "$CXX"; then
5121 ac_ct_CXX=$CXX
5122 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5123do
5124 # Extract the first word of "$ac_prog", so it can be a program name with args.
5125set dummy $ac_prog; ac_word=$2
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
5128if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5129 $as_echo_n "(cached) " >&6
5130else
5131 if test -n "$ac_ct_CXX"; then
5132 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5133else
5134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137 IFS=$as_save_IFS
5138 test -z "$as_dir" && as_dir=.
5139 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005140 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005141 ac_cv_prog_ac_ct_CXX="$ac_prog"
5142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5143 break 2
5144 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005145done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005146 done
5147IFS=$as_save_IFS
5148
5149fi
5150fi
5151ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5152if test -n "$ac_ct_CXX"; then
5153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5154$as_echo "$ac_ct_CXX" >&6; }
5155else
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161 test -n "$ac_ct_CXX" && break
5162done
5163
5164 if test "x$ac_ct_CXX" = x; then
5165 CXX="notfound"
5166 else
5167 case $cross_compiling:$ac_tool_warned in
5168yes:)
5169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5171ac_tool_warned=yes ;;
5172esac
5173 CXX=$ac_ct_CXX
5174 fi
5175fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005176
5177 if test "$CXX" = "notfound"
5178 then
5179 CXX=""
5180 fi
5181fi
5182if test "$preset_cxx" != "$CXX"
5183then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005184 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185
5186 By default, distutils will build C++ extension modules with \"$CXX\".
5187 If this is not intended, then set CXX on the configure command line.
5188 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005189$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005190
5191 By default, distutils will build C++ extension modules with \"$CXX\".
5192 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005193 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194fi
5195
5196
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5198
5199
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5201$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5202cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005203#undef bfin
5204#undef cris
5205#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005206#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005207#undef hppa
5208#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005209#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005210#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005211#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005212#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005213#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005214#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005215 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005216#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217# if defined(__x86_64__) && defined(__LP64__)
5218 x86_64-linux-gnu
5219# elif defined(__x86_64__) && defined(__ILP32__)
5220 x86_64-linux-gnux32
5221# elif defined(__i386__)
5222 i386-linux-gnu
5223# elif defined(__aarch64__) && defined(__AARCH64EL__)
5224# if defined(__ILP32__)
5225 aarch64_ilp32-linux-gnu
5226# else
5227 aarch64-linux-gnu
5228# endif
5229# elif defined(__aarch64__) && defined(__AARCH64EB__)
5230# if defined(__ILP32__)
5231 aarch64_be_ilp32-linux-gnu
5232# else
5233 aarch64_be-linux-gnu
5234# endif
5235# elif defined(__alpha__)
5236 alpha-linux-gnu
5237# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5238# if defined(__ARMEL__)
5239 arm-linux-gnueabihf
5240# else
5241 armeb-linux-gnueabihf
5242# endif
5243# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5244# if defined(__ARMEL__)
5245 arm-linux-gnueabi
5246# else
5247 armeb-linux-gnueabi
5248# endif
5249# elif defined(__hppa__)
5250 hppa-linux-gnu
5251# elif defined(__ia64__)
5252 ia64-linux-gnu
5253# elif defined(__m68k__) && !defined(__mcoldfire__)
5254 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005255# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5256# if _MIPS_SIM == _ABIO32
5257 mipsisa32r6el-linux-gnu
5258# elif _MIPS_SIM == _ABIN32
5259 mipsisa64r6el-linux-gnuabin32
5260# elif _MIPS_SIM == _ABI64
5261 mipsisa64r6el-linux-gnuabi64
5262# else
5263# error unknown platform triplet
5264# endif
5265# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5266# if _MIPS_SIM == _ABIO32
5267 mipsisa32r6-linux-gnu
5268# elif _MIPS_SIM == _ABIN32
5269 mipsisa64r6-linux-gnuabin32
5270# elif _MIPS_SIM == _ABI64
5271 mipsisa64r6-linux-gnuabi64
5272# else
5273# error unknown platform triplet
5274# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005275# elif defined(__mips_hard_float) && defined(_MIPSEL)
5276# if _MIPS_SIM == _ABIO32
5277 mipsel-linux-gnu
5278# elif _MIPS_SIM == _ABIN32
5279 mips64el-linux-gnuabin32
5280# elif _MIPS_SIM == _ABI64
5281 mips64el-linux-gnuabi64
5282# else
5283# error unknown platform triplet
5284# endif
5285# elif defined(__mips_hard_float)
5286# if _MIPS_SIM == _ABIO32
5287 mips-linux-gnu
5288# elif _MIPS_SIM == _ABIN32
5289 mips64-linux-gnuabin32
5290# elif _MIPS_SIM == _ABI64
5291 mips64-linux-gnuabi64
5292# else
5293# error unknown platform triplet
5294# endif
5295# elif defined(__or1k__)
5296 or1k-linux-gnu
5297# elif defined(__powerpc__) && defined(__SPE__)
5298 powerpc-linux-gnuspe
5299# elif defined(__powerpc64__)
5300# if defined(__LITTLE_ENDIAN__)
5301 powerpc64le-linux-gnu
5302# else
5303 powerpc64-linux-gnu
5304# endif
5305# elif defined(__powerpc__)
5306 powerpc-linux-gnu
5307# elif defined(__s390x__)
5308 s390x-linux-gnu
5309# elif defined(__s390__)
5310 s390-linux-gnu
5311# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5312 sh4-linux-gnu
5313# elif defined(__sparc__) && defined(__arch64__)
5314 sparc64-linux-gnu
5315# elif defined(__sparc__)
5316 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005317# elif defined(__riscv)
5318# if __riscv_xlen == 32
5319 riscv32-linux-gnu
5320# elif __riscv_xlen == 64
5321 riscv64-linux-gnu
5322# else
5323# error unknown platform triplet
5324# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325# else
5326# error unknown platform triplet
5327# endif
5328#elif defined(__FreeBSD_kernel__)
5329# if defined(__LP64__)
5330 x86_64-kfreebsd-gnu
5331# elif defined(__i386__)
5332 i386-kfreebsd-gnu
5333# else
5334# error unknown platform triplet
5335# endif
5336#elif defined(__gnu_hurd__)
5337 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005338#elif defined(__APPLE__)
5339 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005340#elif defined(__VXWORKS__)
5341 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005342#else
5343# error unknown platform triplet
5344#endif
5345
5346EOF
5347
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005348if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005349 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5351$as_echo "$PLATFORM_TRIPLET" >&6; }
5352else
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5354$as_echo "none" >&6; }
5355fi
5356rm -f conftest.c conftest.out
5357
5358if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5359 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5360 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5361 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005362elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5363 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005364fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005365
doko@ubuntu.com55532312016-06-14 08:55:19 +02005366if test x$MULTIARCH != x; then
5367 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5368fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005369
5370
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5372$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5373save_LDFLAGS="$LDFLAGS"
5374LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005375
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5377/* end confdefs.h. */
5378
5379int
5380main ()
5381{
5382
5383 ;
5384 return 0;
5385}
5386_ACEOF
5387if ac_fn_c_try_link "$LINENO"; then :
5388 NO_AS_NEEDED="-Wl,--no-as-needed"
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5390$as_echo "yes" >&6; }
5391else
5392 NO_AS_NEEDED=""
5393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5394$as_echo "no" >&6; }
5395fi
5396rm -f core conftest.err conftest.$ac_objext \
5397 conftest$ac_exeext conftest.$ac_ext
5398LDFLAGS="$save_LDFLAGS"
5399
5400
5401
5402# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403
Matthias Kloseb9621712010-04-24 17:59:49 +00005404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5405$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005406if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408else
5409 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5410 then ac_cv_path_EGREP="$GREP -E"
5411 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 # Loop through the user's path and test for each of PROGNAME-LIST
5415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5417do
5418 IFS=$as_save_IFS
5419 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 for ac_prog in egrep; do
5421 for ac_exec_ext in '' $ac_executable_extensions; do
5422 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005423 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005424# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 # Check for GNU $ac_path_EGREP
5426case `"$ac_path_EGREP" --version 2>&1` in
5427*GNU*)
5428 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5429*)
5430 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 while :
5433 do
5434 cat "conftest.in" "conftest.in" >"conftest.tmp"
5435 mv "conftest.tmp" "conftest.in"
5436 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005438 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5439 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005440 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5442 # Best one so far, save it but keep looking for a better one
5443 ac_cv_path_EGREP="$ac_path_EGREP"
5444 ac_path_EGREP_max=$ac_count
5445 fi
5446 # 10*(2^10) chars as input seems more than enough
5447 test $ac_count -gt 10 && break
5448 done
5449 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5450esac
5451
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 $ac_path_EGREP_found && break 3
5453 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005454 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005456IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005458 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 +00005459 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005460else
5461 ac_cv_path_EGREP=$EGREP
5462fi
5463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005464 fi
5465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5467$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005468 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005469
5470
Matthias Kloseb9621712010-04-24 17:59:49 +00005471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5472$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005473if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 $as_echo_n "(cached) " >&6
5475else
5476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005477/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005478#include <stdlib.h>
5479#include <stdarg.h>
5480#include <string.h>
5481#include <float.h>
5482
5483int
5484main ()
5485{
5486
5487 ;
5488 return 0;
5489}
5490_ACEOF
5491if ac_fn_c_try_compile "$LINENO"; then :
5492 ac_cv_header_stdc=yes
5493else
5494 ac_cv_header_stdc=no
5495fi
5496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5497
5498if test $ac_cv_header_stdc = yes; then
5499 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5501/* end confdefs.h. */
5502#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005503
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005504_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005505if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005508else
Matthias Kloseb9621712010-04-24 17:59:49 +00005509 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005510fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005511rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512
Matthias Kloseb9621712010-04-24 17:59:49 +00005513fi
5514
5515if test $ac_cv_header_stdc = yes; then
5516 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518/* end confdefs.h. */
5519#include <stdlib.h>
5520
5521_ACEOF
5522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5523 $EGREP "free" >/dev/null 2>&1; then :
5524
5525else
5526 ac_cv_header_stdc=no
5527fi
5528rm -f conftest*
5529
5530fi
5531
5532if test $ac_cv_header_stdc = yes; then
5533 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5534 if test "$cross_compiling" = yes; then :
5535 :
5536else
5537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5538/* end confdefs.h. */
5539#include <ctype.h>
5540#include <stdlib.h>
5541#if ((' ' & 0x0FF) == 0x020)
5542# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5543# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5544#else
5545# define ISLOWER(c) \
5546 (('a' <= (c) && (c) <= 'i') \
5547 || ('j' <= (c) && (c) <= 'r') \
5548 || ('s' <= (c) && (c) <= 'z'))
5549# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5550#endif
5551
5552#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5553int
5554main ()
5555{
5556 int i;
5557 for (i = 0; i < 256; i++)
5558 if (XOR (islower (i), ISLOWER (i))
5559 || toupper (i) != TOUPPER (i))
5560 return 2;
5561 return 0;
5562}
5563_ACEOF
5564if ac_fn_c_try_run "$LINENO"; then :
5565
5566else
5567 ac_cv_header_stdc=no
5568fi
5569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5570 conftest.$ac_objext conftest.beam conftest.$ac_ext
5571fi
5572
5573fi
5574fi
5575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5576$as_echo "$ac_cv_header_stdc" >&6; }
5577if test $ac_cv_header_stdc = yes; then
5578
5579$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5580
5581fi
5582
5583# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5584for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5585 inttypes.h stdint.h unistd.h
5586do :
5587 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5588ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5589"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005590if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005591 cat >>confdefs.h <<_ACEOF
5592#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5593_ACEOF
5594
5595fi
5596
5597done
5598
5599
5600
5601 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 +02005602if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005603 MINIX=yes
5604else
5605 MINIX=
5606fi
5607
5608
5609 if test "$MINIX" = yes; then
5610
5611$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5612
5613
5614$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5615
5616
5617$as_echo "#define _MINIX 1" >>confdefs.h
5618
5619 fi
5620
5621
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5623$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005624if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005625 $as_echo_n "(cached) " >&6
5626else
5627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5628/* end confdefs.h. */
5629
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005630# define __EXTENSIONS__ 1
5631 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005632int
5633main ()
5634{
5635
5636 ;
5637 return 0;
5638}
5639_ACEOF
5640if ac_fn_c_try_compile "$LINENO"; then :
5641 ac_cv_safe_to_define___extensions__=yes
5642else
5643 ac_cv_safe_to_define___extensions__=no
5644fi
5645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5646fi
5647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5648$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5649 test $ac_cv_safe_to_define___extensions__ = yes &&
5650 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5651
5652 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5653
5654 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5655
5656 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5657
5658 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5659
5660
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661
Xavier de Gaye95750b12016-07-09 11:05:42 +02005662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5663$as_echo_n "checking for the Android API level... " >&6; }
5664cat >> conftest.c <<EOF
5665#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005666android_api = __ANDROID_API__
5667arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005668#else
5669#error not Android
5670#endif
5671EOF
5672
5673if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005674 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5675 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5677$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005678 if test -z "$ANDROID_API_LEVEL"; then
5679 echo 'Fatal: you must define __ANDROID_API__'
5680 exit 1
5681 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005682
5683cat >>confdefs.h <<_ACEOF
5684#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5685_ACEOF
5686
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005687
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5689$as_echo_n "checking for the Android arm ABI... " >&6; }
5690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5691$as_echo "$_arm_arch" >&6; }
5692 if test "$_arm_arch" = 7; then
5693 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5694 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5695 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005696else
5697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5698$as_echo "not Android" >&6; }
5699fi
5700rm -f conftest.c conftest.out
5701
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702# Check for unsupported systems
5703case $ac_sys_system/$ac_sys_release in
5704atheos*|Linux*/1*)
5705 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5706 echo See README for details.
5707 exit 1;;
5708esac
5709
5710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5712$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005715if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 withval=$with_suffix;
5717 case $withval in
5718 no) EXEEXT=;;
5719 yes) EXEEXT=.exe;;
5720 *) EXEEXT=$withval;;
5721 esac
5722fi
5723
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5725$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
5727# Test whether we're running on a non-case-sensitive system, in which
5728# case we give a warning if no ext is given
5729
Matthias Kloseb9621712010-04-24 17:59:49 +00005730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5731$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732if test ! -d CaseSensitiveTestDir; then
5733mkdir CaseSensitiveTestDir
5734fi
5735
5736if test -d casesensitivetestdir
5737then
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5739$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740 BUILDEXEEXT=.exe
5741else
Matthias Kloseb9621712010-04-24 17:59:49 +00005742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744 BUILDEXEEXT=$EXEEXT
5745fi
5746rmdir CaseSensitiveTestDir
5747
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748case $ac_sys_system in
5749hp*|HP*)
5750 case $CC in
5751 cc|*/cc) CC="$CC -Ae";;
5752 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753esac
5754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755
Matthias Kloseb9621712010-04-24 17:59:49 +00005756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5757$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758if test -z "$LIBRARY"
5759then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005760 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5763$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764
5765# LDLIBRARY is the name of the library to link against (as opposed to the
5766# name of the library into which to insert object files). BLDLIBRARY is also
5767# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5768# is blank as the main program is not linked directly against LDLIBRARY.
5769# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5770# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5771# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5772# DLLLIBRARY is the shared (i.e., DLL) library.
5773#
5774# RUNSHARED is used to run shared python without installed libraries
5775#
5776# INSTSONAME is the name of the shared library that will be use to install
5777# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005778#
5779# LDVERSION is the shared library version number, normally the Python version
5780# with the ABI build flags appended.
5781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
5783
5784
5785
5786
5787
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789LDLIBRARY="$LIBRARY"
5790BLDLIBRARY='$(LDLIBRARY)'
5791INSTSONAME='$(LDLIBRARY)'
5792DLLLIBRARY=''
5793LDLIBRARYDIR=''
5794RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005795LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796
5797# LINKCC is the command that links the python executable -- default is $(CC).
5798# If CXX is set, and if it is needed to link a main function that was
5799# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5800# python might then depend on the C++ runtime
5801# This is altered for AIX in order to build the export list before
5802# linking.
5803
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5805$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806if test -z "$LINKCC"
5807then
5808 LINKCC='$(PURIFY) $(MAINCC)'
5809 case $ac_sys_system in
5810 AIX*)
5811 exp_extra="\"\""
5812 if test $ac_sys_release -ge 5 -o \
5813 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5814 exp_extra="."
5815 fi
5816 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817 QNX*)
5818 # qcc must be used because the other compilers do not
5819 # support -N.
5820 LINKCC=qcc;;
5821 esac
5822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5824$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825
5826# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5827# make sure we default having it set to "no": this is used by
5828# distutils.unixccompiler to know if it should add --enable-new-dtags
5829# to linker command lines, and failing to detect GNU ld simply results
5830# in the same bahaviour as before.
5831
Matthias Kloseb9621712010-04-24 17:59:49 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5833$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834ac_prog=ld
5835if test "$GCC" = yes; then
5836 ac_prog=`$CC -print-prog-name=ld`
5837fi
5838case `"$ac_prog" -V 2>&1 < /dev/null` in
5839 *GNU*)
5840 GNULD=yes;;
5841 *)
5842 GNULD=no;;
5843esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5845$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5848$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005850if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851 enableval=$enable_shared;
5852fi
5853
5854
5855if test -z "$enable_shared"
5856then
5857 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005858 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859 enable_shared="yes";;
5860 *)
5861 enable_shared="no";;
5862 esac
5863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5865$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866
Matthias Kloseb9621712010-04-24 17:59:49 +00005867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5868$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005870if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871 enableval=$enable_profiling;
5872fi
5873
5874if test "x$enable_profiling" = xyes; then
5875 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005876 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878/* end confdefs.h. */
5879int main() { return 0; }
5880_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881if ac_fn_c_try_link "$LINENO"; then :
5882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005884 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005886rm -f core conftest.err conftest.$ac_objext \
5887 conftest$ac_exeext conftest.$ac_ext
5888 CC="$ac_save_cc"
5889else
5890 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5893$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894
doko@ubuntu.comba015832012-06-30 16:52:05 +02005895if test "x$enable_profiling" = xyes; then
5896 BASECFLAGS="-pg $BASECFLAGS"
5897 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898fi
5899
Matthias Kloseb9621712010-04-24 17:59:49 +00005900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5901$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902
5903# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5904# library that we build, but we do not want to link against it (we
5905# will find it with a -framework option). For this reason there is an
5906# extra variable BLDLIBRARY against which Python and the extension
5907# modules are linked, BLDLIBRARY. This is normally the same as
5908# LDLIBRARY, but empty for MacOSX framework builds.
5909if test "$enable_framework"
5910then
5911 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005912 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 BLDLIBRARY=''
5914else
5915 BLDLIBRARY='$(LDLIBRARY)'
5916fi
5917
5918# Other platforms follow
5919if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005920 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921
Matthias Kloseb9621712010-04-24 17:59:49 +00005922$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923
5924 case $ac_sys_system in
5925 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005926 LDLIBRARY='libpython$(LDVERSION).dll.a'
5927 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
5929 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).so'
5931 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005932 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005934 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005935 then
5936 PY3LIBRARY=libpython3.so
5937 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005939 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).so'
5941 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005942 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005944 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005945 then
5946 PY3LIBRARY=libpython3.so
5947 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
5949 hp*|HP*)
5950 case `uname -m` in
5951 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 ;;
5954 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005955 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 ;;
5957 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005959 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).dylib'
5963 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005964 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005966 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005967 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005968 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005969 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970
5971 esac
5972else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005973 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 case $ac_sys_system in
5975 CYGWIN*)
5976 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005977 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978 ;;
5979 esac
5980fi
5981
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005982if test "$cross_compiling" = yes; then
5983 RUNSHARED=
5984fi
5985
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5987$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005990if test -n "$ac_tool_prefix"; then
5991 for ac_prog in ar aal
5992 do
5993 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5994set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005997if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999else
6000 if test -n "$AR"; then
6001 ac_cv_prog_AR="$AR" # Let the user override the test.
6002else
6003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006 IFS=$as_save_IFS
6007 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006010 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012 break 2
6013 fi
6014done
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016IFS=$as_save_IFS
6017
6018fi
6019fi
6020AR=$ac_cv_prog_AR
6021if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6023$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024else
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6026$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027fi
6028
6029
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006030 test -n "$AR" && break
6031 done
6032fi
6033if test -z "$AR"; then
6034 ac_ct_AR=$AR
6035 for ac_prog in ar aal
6036do
6037 # Extract the first word of "$ac_prog", so it can be a program name with args.
6038set dummy $ac_prog; ac_word=$2
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6040$as_echo_n "checking for $ac_word... " >&6; }
6041if ${ac_cv_prog_ac_ct_AR+:} false; then :
6042 $as_echo_n "(cached) " >&6
6043else
6044 if test -n "$ac_ct_AR"; then
6045 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6046else
6047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH
6049do
6050 IFS=$as_save_IFS
6051 test -z "$as_dir" && as_dir=.
6052 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006054 ac_cv_prog_ac_ct_AR="$ac_prog"
6055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6056 break 2
6057 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006059 done
6060IFS=$as_save_IFS
6061
6062fi
6063fi
6064ac_ct_AR=$ac_cv_prog_ac_ct_AR
6065if test -n "$ac_ct_AR"; then
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6067$as_echo "$ac_ct_AR" >&6; }
6068else
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6070$as_echo "no" >&6; }
6071fi
6072
6073
6074 test -n "$ac_ct_AR" && break
6075done
6076
6077 if test "x$ac_ct_AR" = x; then
6078 AR="ar"
6079 else
6080 case $cross_compiling:$ac_tool_warned in
6081yes:)
6082{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6083$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6084ac_tool_warned=yes ;;
6085esac
6086 AR=$ac_ct_AR
6087 fi
6088fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089
6090
6091# tweak ARFLAGS only if the user didn't set it on the command line
6092
6093if test -z "$ARFLAGS"
6094then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006095 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096fi
6097
doko@ubuntu.com58844492012-06-30 18:25:32 +02006098if test -n "$ac_tool_prefix"; then
6099 for ac_prog in readelf
6100 do
6101 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6102set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6104$as_echo_n "checking for $ac_word... " >&6; }
6105if ${ac_cv_prog_READELF+:} false; then :
6106 $as_echo_n "(cached) " >&6
6107else
6108 if test -n "$READELF"; then
6109 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6110else
6111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114 IFS=$as_save_IFS
6115 test -z "$as_dir" && as_dir=.
6116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006118 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120 break 2
6121 fi
6122done
6123 done
6124IFS=$as_save_IFS
6125
6126fi
6127fi
6128READELF=$ac_cv_prog_READELF
6129if test -n "$READELF"; then
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6131$as_echo "$READELF" >&6; }
6132else
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
6135fi
6136
6137
6138 test -n "$READELF" && break
6139 done
6140fi
6141if test -z "$READELF"; then
6142 ac_ct_READELF=$READELF
6143 for ac_prog in readelf
6144do
6145 # Extract the first word of "$ac_prog", so it can be a program name with args.
6146set dummy $ac_prog; ac_word=$2
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6148$as_echo_n "checking for $ac_word... " >&6; }
6149if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6150 $as_echo_n "(cached) " >&6
6151else
6152 if test -n "$ac_ct_READELF"; then
6153 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6154else
6155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6156for as_dir in $PATH
6157do
6158 IFS=$as_save_IFS
6159 test -z "$as_dir" && as_dir=.
6160 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006162 ac_cv_prog_ac_ct_READELF="$ac_prog"
6163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6164 break 2
6165 fi
6166done
6167 done
6168IFS=$as_save_IFS
6169
6170fi
6171fi
6172ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6173if test -n "$ac_ct_READELF"; then
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6175$as_echo "$ac_ct_READELF" >&6; }
6176else
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6178$as_echo "no" >&6; }
6179fi
6180
6181
6182 test -n "$ac_ct_READELF" && break
6183done
6184
6185 if test "x$ac_ct_READELF" = x; then
6186 READELF=":"
6187 else
6188 case $cross_compiling:$ac_tool_warned in
6189yes:)
6190{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6191$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6192ac_tool_warned=yes ;;
6193esac
6194 READELF=$ac_ct_READELF
6195 fi
6196fi
6197
6198if test "$cross_compiling" = yes; then
6199 case "$READELF" in
6200 readelf|:)
6201 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6202 ;;
6203 esac
6204fi
6205
6206
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006209hp*|HP*)
6210 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211 if test -z "$INSTALL"
6212 then
6213 INSTALL="${srcdir}/install-sh -c"
6214 fi
6215esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216# Find a good install program. We prefer a C program (faster),
6217# so one script is as good as another. But avoid the broken or
6218# incompatible versions:
6219# SysV /etc/install, /usr/sbin/install
6220# SunOS /usr/etc/install
6221# IRIX /sbin/install
6222# AIX /bin/install
6223# AmigaOS /C/install, which installs bootblocks on floppy discs
6224# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6225# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6226# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6227# OS/2's system install, which has a completely different semantic
6228# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006229# Reject install programs that cannot install multiple files.
6230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6231$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006233if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006234 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235else
6236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239 IFS=$as_save_IFS
6240 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006241 # Account for people who put trailing slashes in PATH elements.
6242case $as_dir/ in #((
6243 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006245 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246 /usr/ucb/* ) ;;
6247 *)
6248 # OSF1 and SCO ODT 3.0 have their own names for install.
6249 # Don't use installbsd from OSF since it installs stuff as root
6250 # by default.
6251 for ac_prog in ginstall scoinst install; do
6252 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006253 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006254 if test $ac_prog = install &&
6255 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6256 # AIX install. It has an incompatible calling convention.
6257 :
6258 elif test $ac_prog = install &&
6259 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6260 # program-specific install script used by HP pwplus--don't use.
6261 :
6262 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006263 rm -rf conftest.one conftest.two conftest.dir
6264 echo one > conftest.one
6265 echo two > conftest.two
6266 mkdir conftest.dir
6267 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6268 test -s conftest.one && test -s conftest.two &&
6269 test -s conftest.dir/conftest.one &&
6270 test -s conftest.dir/conftest.two
6271 then
6272 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6273 break 3
6274 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275 fi
6276 fi
6277 done
6278 done
6279 ;;
6280esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006281
6282 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283IFS=$as_save_IFS
6284
Matthias Kloseb9621712010-04-24 17:59:49 +00006285rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006286
6287fi
6288 if test "${ac_cv_path_install+set}" = set; then
6289 INSTALL=$ac_cv_path_install
6290 else
6291 # As a last resort, use the slow shell script. Don't cache a
6292 # value for INSTALL within a source directory, because that will
6293 # break other packages using the cache if that directory is
6294 # removed, or if the value is a relative name.
6295 INSTALL=$ac_install_sh
6296 fi
6297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6299$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300
6301# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6302# It thinks the first close brace ends the variable substitution.
6303test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6304
6305test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6306
6307test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6308
Matthias Klose93a0ef12012-03-15 18:08:34 +01006309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6310$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6311if test -z "$MKDIR_P"; then
6312 if ${ac_cv_path_mkdir+:} false; then :
6313 $as_echo_n "(cached) " >&6
6314else
6315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6316for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6317do
6318 IFS=$as_save_IFS
6319 test -z "$as_dir" && as_dir=.
6320 for ac_prog in mkdir gmkdir; do
6321 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006322 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006323 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6324 'mkdir (GNU coreutils) '* | \
6325 'mkdir (coreutils) '* | \
6326 'mkdir (fileutils) '4.1*)
6327 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6328 break 3;;
6329 esac
6330 done
6331 done
6332 done
6333IFS=$as_save_IFS
6334
6335fi
6336
6337 test -d ./--version && rmdir ./--version
6338 if test "${ac_cv_path_mkdir+set}" = set; then
6339 MKDIR_P="$ac_cv_path_mkdir -p"
6340 else
6341 # As a last resort, use the slow shell script. Don't cache a
6342 # value for MKDIR_P within a source directory, because that will
6343 # break other packages using the cache if that directory is
6344 # removed, or if the value is a relative name.
6345 MKDIR_P="$ac_install_sh -d"
6346 fi
6347fi
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6349$as_echo "$MKDIR_P" >&6; }
6350
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351
6352# Not every filesystem supports hard links
6353
6354if test -z "$LN" ; then
6355 case $ac_sys_system in
6356 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357 *) LN=ln;;
6358 esac
6359fi
6360
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006361# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006362
6363ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006364
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6367$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368
6369# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006370if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 withval=$with_pydebug;
6372if test "$withval" != no
6373then
6374
Matthias Kloseb9621712010-04-24 17:59:49 +00006375$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
Matthias Kloseb9621712010-04-24 17:59:49 +00006377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6378$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006380 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006381else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6382$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383fi
6384else
Matthias Kloseb9621712010-04-24 17:59:49 +00006385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387fi
6388
6389
Victor Stinnerf4e47032019-04-25 00:56:28 +02006390# Check for --with-trace-refs
6391# --with-trace-refs
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6393$as_echo_n "checking for --with-trace-refs... " >&6; }
6394
6395# Check whether --with-trace-refs was given.
6396if test "${with_trace_refs+set}" = set; then :
6397 withval=$with_trace_refs;
6398else
6399 with_trace_refs=no
6400fi
6401
6402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6403$as_echo "$with_trace_refs" >&6; }
6404
6405if test "$with_trace_refs" = "yes"
6406then
6407
6408$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6409
6410fi
6411
6412# Check for --with-assertions.
6413# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006414assertions='false'
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6416$as_echo_n "checking for --with-assertions... " >&6; }
6417
6418# Check whether --with-assertions was given.
6419if test "${with_assertions+set}" = set; then :
6420 withval=$with_assertions;
6421if test "$withval" != no
6422then
6423 assertions='true'
6424fi
6425fi
6426
6427if test "$assertions" = 'true'; then
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6429$as_echo "yes" >&6; }
6430elif test "$Py_DEBUG" = 'true'; then
6431 assertions='true'
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6433$as_echo "implied by --with-pydebug" >&6; }
6434else
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436$as_echo "no" >&6; }
6437fi
6438
Brett Cannon63d98bc2016-09-06 17:12:40 -07006439# Enable optimization flags
6440
6441
6442Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6444$as_echo_n "checking for --enable-optimizations... " >&6; }
6445# Check whether --enable-optimizations was given.
6446if test "${enable_optimizations+set}" = set; then :
6447 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006448if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006449then
6450 Py_OPT='true'
6451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6452$as_echo "yes" >&6; };
6453else
6454 Py_OPT='false'
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6456$as_echo "no" >&6; };
6457fi
6458else
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6460$as_echo "no" >&6; }
6461fi
6462
6463if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006464 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6465 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006466 # 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 +00006467 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006468 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006469 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006470 DEF_MAKE_RULE="build_all"
6471else
6472 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006473 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006474 DEF_MAKE_RULE="all"
6475fi
6476
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006477
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6479$as_echo_n "checking PROFILE_TASK... " >&6; }
6480if test -z "$PROFILE_TASK"
6481then
6482 PROFILE_TASK='-m test --pgo'
6483fi
6484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6485$as_echo "$PROFILE_TASK" >&6; }
6486
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006487# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6488# normal names in the default $PATH (ie: Ubuntu). They exist under the
6489# non-suffixed name in their versioned llvm directory.
6490
6491llvm_bin_dir=''
6492llvm_path="${PATH}"
6493if test "${CC}" = "clang"
6494then
6495 clang_bin=`which clang`
6496 # Some systems install clang elsewhere as a symlink to the real path
6497 # which is where the related llvm tools are located.
6498 if test -L "${clang_bin}"
6499 then
6500 clang_dir=`dirname "${clang_bin}"`
6501 clang_bin=`readlink "${clang_bin}"`
6502 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6503 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6504 fi
6505fi
6506
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006507# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6509$as_echo_n "checking for --with-lto... " >&6; }
6510
6511# Check whether --with-lto was given.
6512if test "${with_lto+set}" = set; then :
6513 withval=$with_lto;
6514if test "$withval" != no
6515then
6516 Py_LTO='true'
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6518$as_echo "yes" >&6; };
6519else
6520 Py_LTO='false'
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522$as_echo "no" >&6; };
6523fi
6524else
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }
6527fi
6528
6529if test "$Py_LTO" = 'true' ; then
6530 case $CC in
6531 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006532
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006533 if test -n "$ac_tool_prefix"; then
6534 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6535set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6537$as_echo_n "checking for $ac_word... " >&6; }
6538if ${ac_cv_path_LLVM_AR+:} false; then :
6539 $as_echo_n "(cached) " >&6
6540else
6541 case $LLVM_AR in
6542 [\\/]* | ?:[\\/]*)
6543 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6544 ;;
6545 *)
6546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6547for as_dir in ${llvm_path}
6548do
6549 IFS=$as_save_IFS
6550 test -z "$as_dir" && as_dir=.
6551 for ac_exec_ext in '' $ac_executable_extensions; do
6552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6553 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6555 break 2
6556 fi
6557done
6558 done
6559IFS=$as_save_IFS
6560
6561 ;;
6562esac
6563fi
6564LLVM_AR=$ac_cv_path_LLVM_AR
6565if test -n "$LLVM_AR"; then
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6567$as_echo "$LLVM_AR" >&6; }
6568else
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6570$as_echo "no" >&6; }
6571fi
6572
6573
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006574fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006575if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006576 ac_pt_LLVM_AR=$LLVM_AR
6577 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006578set dummy llvm-ar; ac_word=$2
6579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6580$as_echo_n "checking for $ac_word... " >&6; }
6581if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6582 $as_echo_n "(cached) " >&6
6583else
6584 case $ac_pt_LLVM_AR in
6585 [\\/]* | ?:[\\/]*)
6586 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6587 ;;
6588 *)
6589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6590for as_dir in ${llvm_path}
6591do
6592 IFS=$as_save_IFS
6593 test -z "$as_dir" && as_dir=.
6594 for ac_exec_ext in '' $ac_executable_extensions; do
6595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6596 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6598 break 2
6599 fi
6600done
6601 done
6602IFS=$as_save_IFS
6603
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006604 ;;
6605esac
6606fi
6607ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6608if test -n "$ac_pt_LLVM_AR"; then
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6610$as_echo "$ac_pt_LLVM_AR" >&6; }
6611else
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6613$as_echo "no" >&6; }
6614fi
6615
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006616 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006617 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006618 else
6619 case $cross_compiling:$ac_tool_warned in
6620yes:)
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6623ac_tool_warned=yes ;;
6624esac
6625 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006626 fi
6627else
6628 LLVM_AR="$ac_cv_path_LLVM_AR"
6629fi
6630
6631
6632 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6633 then
6634 LLVM_AR_FOUND="found"
6635 else
6636 LLVM_AR_FOUND="not-found"
6637 fi
6638 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6639 then
6640 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6641 if test -n "${found_llvm_ar}"
6642 then
6643 LLVM_AR='/usr/bin/xcrun llvm-ar'
6644 LLVM_AR_FOUND=found
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6646$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6647 fi
6648 fi
6649 if test $LLVM_AR_FOUND = not-found
6650 then
6651 LLVM_PROFR_ERR=yes
6652 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6653 else
6654 LLVM_AR_ERR=no
6655 fi
6656 AR="${LLVM_AR}"
6657 case $ac_sys_system in
6658 Darwin*)
6659 # Any changes made here should be reflected in the GCC+Darwin case below
6660 LTOFLAGS="-flto -Wl,-export_dynamic"
6661 ;;
6662 *)
6663 LTOFLAGS="-flto"
6664 ;;
6665 esac
6666 ;;
6667 *gcc*)
6668 case $ac_sys_system in
6669 Darwin*)
6670 LTOFLAGS="-flto -Wl,-export_dynamic"
6671 ;;
6672 *)
6673 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6674 ;;
6675 esac
6676 ;;
6677 esac
6678
6679 if test "$ac_cv_prog_cc_g" = "yes"
6680 then
6681 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6682 # to get debug symbols.
6683 LTOFLAGS="$LTOFLAGS -g"
6684 fi
6685
stratakisf92c7aa2018-12-04 15:54:01 +01006686 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006687 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006688fi
6689
6690# Enable PGO flags.
6691
6692
6693
6694
6695
6696
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006697if test -n "$ac_tool_prefix"; then
6698 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6699set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6701$as_echo_n "checking for $ac_word... " >&6; }
6702if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6703 $as_echo_n "(cached) " >&6
6704else
6705 case $LLVM_PROFDATA in
6706 [\\/]* | ?:[\\/]*)
6707 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6708 ;;
6709 *)
6710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6711for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006712do
6713 IFS=$as_save_IFS
6714 test -z "$as_dir" && as_dir=.
6715 for ac_exec_ext in '' $ac_executable_extensions; do
6716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006717 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6719 break 2
6720 fi
6721done
6722 done
6723IFS=$as_save_IFS
6724
Gregory P. Smith799520c2016-09-07 16:10:00 -07006725 ;;
6726esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006727fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006728LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6729if test -n "$LLVM_PROFDATA"; then
6730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6731$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006732else
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6734$as_echo "no" >&6; }
6735fi
6736
6737
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006738fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006739if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006740 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6741 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006742set dummy llvm-profdata; ac_word=$2
6743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6744$as_echo_n "checking for $ac_word... " >&6; }
6745if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6746 $as_echo_n "(cached) " >&6
6747else
6748 case $ac_pt_LLVM_PROFDATA in
6749 [\\/]* | ?:[\\/]*)
6750 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6751 ;;
6752 *)
6753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6754for as_dir in ${llvm_path}
6755do
6756 IFS=$as_save_IFS
6757 test -z "$as_dir" && as_dir=.
6758 for ac_exec_ext in '' $ac_executable_extensions; do
6759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6760 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6762 break 2
6763 fi
6764done
6765 done
6766IFS=$as_save_IFS
6767
Gregory P. Smith799520c2016-09-07 16:10:00 -07006768 ;;
6769esac
6770fi
6771ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6772if test -n "$ac_pt_LLVM_PROFDATA"; then
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6774$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6775else
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777$as_echo "no" >&6; }
6778fi
6779
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006780 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006781 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006782 else
6783 case $cross_compiling:$ac_tool_warned in
6784yes:)
6785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6787ac_tool_warned=yes ;;
6788esac
6789 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006790 fi
6791else
6792 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6793fi
6794
6795
6796if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6797then
6798 LLVM_PROF_FOUND="found"
6799else
6800 LLVM_PROF_FOUND="not-found"
6801fi
6802if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6803then
6804 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6805 if test -n "${found_llvm_profdata}"
6806 then
6807 # llvm-profdata isn't directly in $PATH in some cases.
6808 # https://apple.stackexchange.com/questions/197053/
6809 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6810 LLVM_PROF_FOUND=found
6811 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6812$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6813 fi
6814fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006815LLVM_PROF_ERR=no
6816case $CC in
6817 *clang*)
6818 # Any changes made here should be reflected in the GCC+Darwin case below
6819 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6820 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006821 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006822 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6823 if test $LLVM_PROF_FOUND = not-found
6824 then
6825 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006826 if test "${REQUIRE_PGO}" = "yes"
6827 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006828 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 -07006829 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006830 fi
6831 ;;
6832 *gcc*)
6833 case $ac_sys_system in
6834 Darwin*)
6835 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6836 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006837 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006838 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006839 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006840 then
6841 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006842 if test "${REQUIRE_PGO}" = "yes"
6843 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006844 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 -07006845 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006846 fi
6847 ;;
6848 *)
6849 PGO_PROF_GEN_FLAG="-fprofile-generate"
6850 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6851 LLVM_PROF_MERGER="true"
6852 LLVM_PROF_FILE=""
6853 ;;
6854 esac
6855 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006856 *icc*)
6857 PGO_PROF_GEN_FLAG="-prof-gen"
6858 PGO_PROF_USE_FLAG="-prof-use"
6859 LLVM_PROF_MERGER="true"
6860 LLVM_PROF_FILE=""
6861 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006862esac
6863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6865# merged with this chunk of code?
6866
6867# Optimizer/debugger flags
6868# ------------------------
6869# (The following bit of code is complicated enough - please keep things
6870# indented properly. Just pretend you're editing Python code. ;-)
6871
6872# There are two parallel sets of case statements below, one that checks to
6873# see if OPT was set and one that does BASECFLAGS setting based upon
6874# compiler and platform. BASECFLAGS tweaks need to be made even if the
6875# user set OPT.
6876
Victor Stinner23a683a2019-04-12 21:27:37 +02006877case $CC in
6878 *clang*)
6879 cc_is_clang=1
6880 ;;
6881 *)
6882 if $CC --version 2>&1 | grep -q clang
6883 then
6884 cc_is_clang=1
6885 else
6886 cc_is_clang=
6887 fi
6888esac
6889
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890# tweak OPT based on compiler and platform, only if the user didn't set
6891# it on the command line
6892
Victor Stinner9ed34a82017-05-02 22:35:58 +02006893
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006894if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895then
6896 case $GCC in
6897 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006898 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6899 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6900 WRAP="-fwrapv"
6901 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006902
Victor Stinner35f3d242017-04-21 12:35:24 +02006903 if test -n "${cc_is_clang}"
6904 then
6905 # Clang also needs -fwrapv
6906 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006907 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6908 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006909 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006910 fi
6911
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912 case $ac_cv_prog_cc_g in
6913 yes)
6914 if test "$Py_DEBUG" = 'true' ; then
6915 # Optimization messes up debuggers, so turn it off for
6916 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006917 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006918 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006919 else
Victor Stinner28205b22017-04-21 11:24:34 +02006920 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006921 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922 else
Victor Stinner28205b22017-04-21 11:24:34 +02006923 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924 fi
6925 ;;
6926 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006927 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928 ;;
6929 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006930
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006931 case $ac_sys_system in
6932 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6933 ;;
6934 esac
6935 ;;
6936
6937 *)
6938 OPT="-O"
6939 ;;
6940 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006941fi
6942
6943
6944
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006945
stratakiscf10a752018-12-19 18:19:01 +01006946
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006947# The -arch flags for universal builds on OSX
6948UNIVERSAL_ARCH_FLAGS=
6949
6950
6951# tweak BASECFLAGS based on compiler and platform
6952case $GCC in
6953yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006954 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006955
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6957$as_echo_n "checking for -Wextra... " >&6; }
6958 ac_save_cc="$CC"
6959 CC="$CC -Wextra -Werror"
6960 if ${ac_cv_extra_warnings+:} false; then :
6961 $as_echo_n "(cached) " >&6
6962else
6963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6964/* end confdefs.h. */
6965
6966
6967int
6968main ()
6969{
6970
6971 ;
6972 return 0;
6973}
6974
6975_ACEOF
6976if ac_fn_c_try_compile "$LINENO"; then :
6977
6978 ac_cv_extra_warnings=yes
6979
6980else
6981
6982 ac_cv_extra_warnings=no
6983
6984fi
6985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6986fi
6987
6988 CC="$ac_save_cc"
6989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6990$as_echo "$ac_cv_extra_warnings" >&6; }
6991
6992 if test $ac_cv_extra_warnings = yes
6993 then
6994 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6995 fi
6996
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997 # Python doesn't violate C99 aliasing rules, but older versions of
6998 # GCC produce warnings for legal Python code. Enable
6999 # -fno-strict-aliasing on versions of GCC that support but produce
7000 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7002$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007003 ac_save_cc="$CC"
7004 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007005 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007006 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007007 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007008else
Matthias Kloseb9621712010-04-24 17:59:49 +00007009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007011
Matthias Kloseb159a552010-04-25 21:00:44 +00007012
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007013int
7014main ()
7015{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007016
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007017 ;
7018 return 0;
7019}
Matthias Kloseb159a552010-04-25 21:00:44 +00007020
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007022if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007023
7024 CC="$ac_save_cc -fstrict-aliasing"
7025 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007027/* end confdefs.h. */
7028
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007029 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007030int
7031main ()
7032{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007033double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007034 ;
7035 return 0;
7036}
Matthias Kloseb159a552010-04-25 21:00:44 +00007037
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007039if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007040
7041 ac_cv_no_strict_aliasing=no
7042
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007043else
Matthias Kloseb159a552010-04-25 21:00:44 +00007044
7045 ac_cv_no_strict_aliasing=yes
7046
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007047fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007049
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007050else
Matthias Kloseb159a552010-04-25 21:00:44 +00007051
7052 ac_cv_no_strict_aliasing=no
7053
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007054fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007056fi
7057
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007058 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007059 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7061$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007062 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007063 then
7064 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7065 fi
7066
Zachary Ware5af85642015-12-21 12:09:17 -06007067 # ICC doesn't recognize the option, but only emits a warning
7068 ## XXX does it emit an unused result warning and can it be disabled?
7069 case "$CC" in
7070 *icc*)
7071 ac_cv_disable_unused_result_warning=no
7072 ;;
7073 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7075$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7076 ac_save_cc="$CC"
7077 CC="$CC -Wunused-result -Werror"
7078 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007079 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007080 $as_echo_n "(cached) " >&6
7081else
7082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7083/* end confdefs.h. */
7084
7085
7086int
7087main ()
7088{
7089
7090 ;
7091 return 0;
7092}
7093
7094_ACEOF
7095if ac_fn_c_try_compile "$LINENO"; then :
7096
7097 ac_cv_disable_unused_result_warning=yes
7098
7099else
7100
7101 ac_cv_disable_unused_result_warning=no
7102
7103fi
7104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7105fi
7106
7107 CFLAGS="$save_CFLAGS"
7108 CC="$ac_save_cc"
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7110$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007111 ;;
7112 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007113
7114 if test $ac_cv_disable_unused_result_warning = yes
7115 then
7116 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007117 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7118 fi
7119
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7121$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7122 ac_save_cc="$CC"
7123 CC="$CC -Wunused-parameter -Werror"
7124 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7125 $as_echo_n "(cached) " >&6
7126else
7127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7128/* end confdefs.h. */
7129
7130
7131int
7132main ()
7133{
7134
7135 ;
7136 return 0;
7137}
7138
7139_ACEOF
7140if ac_fn_c_try_compile "$LINENO"; then :
7141
7142 ac_cv_disable_unused_parameter_warning=yes
7143
7144else
7145
7146 ac_cv_disable_unused_parameter_warning=no
7147
7148fi
7149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7150fi
7151
7152 CC="$ac_save_cc"
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7154$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7155
7156 if test $ac_cv_disable_unused_parameter_warning = yes
7157 then
7158 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7159 fi
7160
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7162$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7163 ac_save_cc="$CC"
7164 CC="$CC -Wmissing-field-initializers -Werror"
7165 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7166 $as_echo_n "(cached) " >&6
7167else
7168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7169/* end confdefs.h. */
7170
7171
7172int
7173main ()
7174{
7175
7176 ;
7177 return 0;
7178}
7179
7180_ACEOF
7181if ac_fn_c_try_compile "$LINENO"; then :
7182
7183 ac_cv_disable_missing_field_initializers=yes
7184
7185else
7186
7187 ac_cv_disable_missing_field_initializers=no
7188
7189fi
7190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7191fi
7192
7193 CC="$ac_save_cc"
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7195$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7196
7197 if test $ac_cv_disable_missing_field_initializers = yes
7198 then
7199 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007200 fi
7201
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7203$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7204 ac_save_cc="$CC"
7205 CC="$CC -Wsign-compare"
7206 save_CFLAGS="$CFLAGS"
7207 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7208 $as_echo_n "(cached) " >&6
7209else
7210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7211/* end confdefs.h. */
7212
7213
7214int
7215main ()
7216{
7217
7218 ;
7219 return 0;
7220}
7221
7222_ACEOF
7223if ac_fn_c_try_compile "$LINENO"; then :
7224
7225 ac_cv_enable_sign_compare_warning=yes
7226
7227else
7228
7229 ac_cv_enable_sign_compare_warning=no
7230
7231fi
7232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7233fi
7234
7235 CFLAGS="$save_CFLAGS"
7236 CC="$ac_save_cc"
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7238$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7239
7240 if test $ac_cv_enable_sign_compare_warning = yes
7241 then
7242 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7243 fi
7244
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7246$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7247 ac_save_cc="$CC"
7248 CC="$CC -Wunreachable-code"
7249 save_CFLAGS="$CFLAGS"
7250 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7251 $as_echo_n "(cached) " >&6
7252else
7253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7254/* end confdefs.h. */
7255
7256
7257int
7258main ()
7259{
7260
7261 ;
7262 return 0;
7263}
7264
7265_ACEOF
7266if ac_fn_c_try_compile "$LINENO"; then :
7267
7268 ac_cv_enable_unreachable_code_warning=yes
7269
7270else
7271
7272 ac_cv_enable_unreachable_code_warning=no
7273
7274fi
7275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7276fi
7277
7278 CFLAGS="$save_CFLAGS"
7279 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007280
7281 # Don't enable unreachable code warning in debug mode, since it usually
7282 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007283 # Issue #24324: Unfortunately, the unreachable code warning does not work
7284 # correctly on gcc and has been silently removed from the compiler.
7285 # It is supported on clang but on OS X systems gcc may be an alias
7286 # for clang. Try to determine if the compiler is not really gcc and,
7287 # if so, only then enable the warning.
7288 if test $ac_cv_enable_unreachable_code_warning = yes && \
7289 test "$Py_DEBUG" != "true" && \
7290 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007291 then
7292 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007293 else
7294 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007295 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7297$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007298
INADA Naokie3364842018-06-05 20:40:53 +09007299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7300$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7301 ac_save_cc="$CC"
7302 CC="$CC -Werror -Wstrict-prototypes"
7303 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7304 $as_echo_n "(cached) " >&6
7305else
7306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7307/* end confdefs.h. */
7308
7309
7310int
7311main ()
7312{
7313
7314 ;
7315 return 0;
7316}
7317
7318_ACEOF
7319if ac_fn_c_try_compile "$LINENO"; then :
7320
7321 ac_cv_enable_strict_prototypes_warning=yes
7322
7323else
7324
7325 ac_cv_enable_strict_prototypes_warning=no
7326
7327fi
7328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7329fi
7330
7331 CC="$ac_save_cc"
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7333$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7334
7335 if test $ac_cv_enable_strict_prototypes_warning = yes
7336 then
7337 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7338 fi
7339
Victor Stinner193ee0a2017-02-06 14:24:00 +01007340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7341$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7342 ac_save_cc="$CC"
7343 CC="$CC -Werror=implicit-function-declaration"
7344 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7345 $as_echo_n "(cached) " >&6
7346else
7347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7348/* end confdefs.h. */
7349
7350
7351int
7352main ()
7353{
7354
7355 ;
7356 return 0;
7357}
7358
7359_ACEOF
7360if ac_fn_c_try_compile "$LINENO"; then :
7361
7362 ac_cv_enable_implicit_function_declaration_error=yes
7363
7364else
7365
7366 ac_cv_enable_implicit_function_declaration_error=no
7367
7368fi
7369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7370fi
7371
7372 CC="$ac_save_cc"
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7374$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7375
7376 if test $ac_cv_enable_implicit_function_declaration_error = yes
7377 then
7378 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7379 fi
7380
Vinay Sajip0b60f642019-10-15 08:26:12 +01007381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7382$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7383 ac_save_cc="$CC"
7384 CC="$CC -fvisibility=hidden"
7385 if ${ac_cv_enable_visibility+:} false; then :
7386 $as_echo_n "(cached) " >&6
7387else
7388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7389/* end confdefs.h. */
7390
7391
7392int
7393main ()
7394{
7395
7396 ;
7397 return 0;
7398}
7399
7400_ACEOF
7401if ac_fn_c_try_compile "$LINENO"; then :
7402
7403 ac_cv_enable_visibility=yes
7404
7405else
7406
7407 ac_cv_enable_visibility=no
7408
7409fi
7410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7411fi
7412
7413 CC="$ac_save_cc"
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7415$as_echo "$ac_cv_enable_visibility" >&6; }
7416
7417 if test $ac_cv_enable_visibility = yes
7418 then
7419 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7420 fi
7421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7423 # support. Without this, treatment of subnormals doesn't follow
7424 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007425 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426 alpha*)
7427 BASECFLAGS="$BASECFLAGS -mieee"
7428 ;;
7429 esac
7430
7431 case $ac_sys_system in
7432 SCO_SV*)
7433 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7434 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007435
Ned Deily87adb6e2013-10-18 21:09:56 -07007436 Darwin*)
7437 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7438 # used to be here, but non-Apple gcc doesn't accept them.
7439 if test "${CC}" = gcc
7440 then
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007442$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007443 case "${UNIVERSALSDK}" in
7444 */MacOSX10.4u.sdk)
7445 # Build using 10.4 SDK, force usage of gcc when the
7446 # compiler is gcc, otherwise the user will get very
7447 # confusing error messages when building on OSX 10.6
7448 CC=gcc-4.0
7449 CPP=cpp-4.0
7450 ;;
7451 esac
7452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007453$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007454 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455
Ned Deily87adb6e2013-10-18 21:09:56 -07007456 if test "${enable_universalsdk}"
7457 then
7458 case "$UNIVERSAL_ARCHS" in
7459 32-bit)
7460 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7461 LIPO_32BIT_FLAGS=""
7462 ARCH_RUN_32BIT=""
7463 ;;
7464 64-bit)
7465 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7466 LIPO_32BIT_FLAGS=""
7467 ARCH_RUN_32BIT="true"
7468 ;;
7469 all)
7470 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7471 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7472 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7473 ;;
7474 intel)
7475 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7476 LIPO_32BIT_FLAGS="-extract i386"
7477 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7478 ;;
7479 intel-32)
7480 UNIVERSAL_ARCH_FLAGS="-arch i386"
7481 LIPO_32BIT_FLAGS=""
7482 ARCH_RUN_32BIT=""
7483 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007484 intel-64)
7485 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7486 LIPO_32BIT_FLAGS=""
7487 ARCH_RUN_32BIT="true"
7488 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007489 3-way)
7490 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7491 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7492 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7493 ;;
7494 *)
7495 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7496 ;;
7497 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498
Ned Deily87adb6e2013-10-18 21:09:56 -07007499 if test "${UNIVERSALSDK}" != "/"
7500 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007501 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7502 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007503 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007504 else
7505 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7506 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007507 fi
7508 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509
Ned Deily87adb6e2013-10-18 21:09:56 -07007510 # Calculate an appropriate deployment target for this build:
7511 # The deployment target value is used explicitly to enable certain
7512 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007513 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007514 # component of the string returned by distutils.get_platform().
7515 #
7516 # Use the value from:
7517 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7518 # 2. the operating system version of the build machine if >= 10.6
7519 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7520 # below to pick either 10.3, 10.4, or 10.5 as the target.
7521 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522
Ned Deily87adb6e2013-10-18 21:09:56 -07007523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7524$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007525 cur_target_major=`sw_vers -productVersion | \
7526 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7527 cur_target_minor=`sw_vers -productVersion | \
7528 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7529 cur_target="${cur_target_major}.${cur_target_minor}"
7530 if test ${cur_target_major} -eq 10 && \
7531 test ${cur_target_minor} -ge 3 && \
7532 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007533 then
Ned Deily36820b62014-06-25 13:44:22 -07007534 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007535 cur_target=10.3
7536 if test ${enable_universalsdk}
7537 then
7538 case "$UNIVERSAL_ARCHS" in
7539 all|3-way|intel|64-bit)
7540 # These configurations were first supported in 10.5
7541 cur_target='10.5'
7542 ;;
7543 esac
7544 else
7545 if test `/usr/bin/arch` = "i386"
7546 then
7547 # 10.4 was the first release to support Intel archs
7548 cur_target="10.4"
7549 fi
7550 fi
7551 fi
7552 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007553
Ned Deily87adb6e2013-10-18 21:09:56 -07007554 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7555 # environment with a value that is the same as what we'll use
7556 # in the Makefile to ensure that we'll get the same compiler
7557 # environment during configure and build time.
7558 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7559 export MACOSX_DEPLOYMENT_TARGET
7560 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7562$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007563
Ned Deily87adb6e2013-10-18 21:09:56 -07007564 # end of Darwin* tests
7565 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566 esac
7567 ;;
7568
7569*)
7570 case $ac_sys_system in
7571 OpenUNIX*|UnixWare*)
7572 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7573 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574 SCO_SV*)
7575 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7576 ;;
7577 esac
7578 ;;
7579esac
7580
Zachary Ware5af85642015-12-21 12:09:17 -06007581# ICC needs -fp-model strict or floats behave badly
7582case "$CC" in
7583*icc*)
7584 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7585 ;;
7586esac
7587
T. Woutersddbfa2c2017-05-23 01:30:49 +02007588if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589 :
7590else
7591 OPT="-DNDEBUG $OPT"
7592fi
7593
7594if test "$ac_arch_flags"
7595then
7596 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7597fi
7598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599# On some compilers, pthreads are available without further options
7600# (e.g. MacOS X). On some of these systems, the compiler will not
7601# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7602# So we have to see first whether pthreads are available without
7603# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7605$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007606if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608else
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610 ac_cv_pthread_is_default=no
7611else
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613/* end confdefs.h. */
7614
Stefan Krah7dba5942012-11-22 22:49:11 +01007615#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616#include <pthread.h>
7617
7618void* routine(void* p){return NULL;}
7619
7620int main(){
7621 pthread_t p;
7622 if(pthread_create(&p,NULL,routine,NULL)!=0)
7623 return 1;
7624 (void)pthread_detach(p);
7625 return 0;
7626}
7627
7628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007629if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630
7631 ac_cv_pthread_is_default=yes
7632 ac_cv_kthread=no
7633 ac_cv_pthread=no
7634
7635else
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640fi
7641
7642
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643fi
7644
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7646$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647
7648
7649if test $ac_cv_pthread_is_default = yes
7650then
7651 ac_cv_kpthread=no
7652else
7653# -Kpthread, if available, provides the right #defines
7654# and linker options to make pthread_create available
7655# Some compilers won't report that they do not support -Kpthread,
7656# so we need to run a program to see whether it really made the
7657# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7659$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007660if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007661 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662else
7663 ac_save_cc="$CC"
7664CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007665if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666 ac_cv_kpthread=no
7667else
Matthias Kloseb9621712010-04-24 17:59:49 +00007668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669/* end confdefs.h. */
7670
Stefan Krah7dba5942012-11-22 22:49:11 +01007671#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007672#include <pthread.h>
7673
7674void* routine(void* p){return NULL;}
7675
7676int main(){
7677 pthread_t p;
7678 if(pthread_create(&p,NULL,routine,NULL)!=0)
7679 return 1;
7680 (void)pthread_detach(p);
7681 return 0;
7682}
7683
7684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007685if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686 ac_cv_kpthread=yes
7687else
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7691 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007692fi
7693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694CC="$ac_save_cc"
7695fi
7696
Matthias Kloseb9621712010-04-24 17:59:49 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7698$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699fi
7700
7701if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7702then
7703# -Kthread, if available, provides the right #defines
7704# and linker options to make pthread_create available
7705# Some compilers won't report that they do not support -Kthread,
7706# so we need to run a program to see whether it really made the
7707# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7709$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007710if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007711 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712else
7713 ac_save_cc="$CC"
7714CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007715if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716 ac_cv_kthread=no
7717else
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719/* end confdefs.h. */
7720
Stefan Krah7dba5942012-11-22 22:49:11 +01007721#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722#include <pthread.h>
7723
7724void* routine(void* p){return NULL;}
7725
7726int main(){
7727 pthread_t p;
7728 if(pthread_create(&p,NULL,routine,NULL)!=0)
7729 return 1;
7730 (void)pthread_detach(p);
7731 return 0;
7732}
7733
7734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007735if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736 ac_cv_kthread=yes
7737else
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742fi
7743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744CC="$ac_save_cc"
7745fi
7746
Matthias Kloseb9621712010-04-24 17:59:49 +00007747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7748$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749fi
7750
7751if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7752then
7753# -pthread, if available, provides the right #defines
7754# and linker options to make pthread_create available
7755# Some compilers won't report that they do not support -pthread,
7756# so we need to run a program to see whether it really made the
7757# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7759$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007760if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762else
7763 ac_save_cc="$CC"
7764CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007765if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766 ac_cv_pthread=no
7767else
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769/* end confdefs.h. */
7770
Stefan Krah7dba5942012-11-22 22:49:11 +01007771#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772#include <pthread.h>
7773
7774void* routine(void* p){return NULL;}
7775
7776int main(){
7777 pthread_t p;
7778 if(pthread_create(&p,NULL,routine,NULL)!=0)
7779 return 1;
7780 (void)pthread_detach(p);
7781 return 0;
7782}
7783
7784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007785if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786 ac_cv_pthread=yes
7787else
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792fi
7793
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794CC="$ac_save_cc"
7795fi
7796
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7798$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799fi
7800
7801# If we have set a CC compiler flag for thread support then
7802# check if it works for CXX, too.
7803ac_cv_cxx_thread=no
7804if test ! -z "$CXX"
7805then
Matthias Kloseb9621712010-04-24 17:59:49 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7807$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808ac_save_cxx="$CXX"
7809
7810if test "$ac_cv_kpthread" = "yes"
7811then
7812 CXX="$CXX -Kpthread"
7813 ac_cv_cxx_thread=yes
7814elif test "$ac_cv_kthread" = "yes"
7815then
7816 CXX="$CXX -Kthread"
7817 ac_cv_cxx_thread=yes
7818elif test "$ac_cv_pthread" = "yes"
7819then
7820 CXX="$CXX -pthread"
7821 ac_cv_cxx_thread=yes
7822fi
7823
7824if test $ac_cv_cxx_thread = yes
7825then
7826 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7827 $CXX -c conftest.$ac_ext 2>&5
7828 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7829 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7830 then
7831 ac_cv_cxx_thread=yes
7832 else
7833 ac_cv_cxx_thread=no
7834 fi
7835 rm -fr conftest*
7836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7838$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007839fi
7840CXX="$ac_save_cxx"
7841
7842
7843# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7845$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007846if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007848else
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007850/* end confdefs.h. */
7851#include <stdlib.h>
7852#include <stdarg.h>
7853#include <string.h>
7854#include <float.h>
7855
7856int
7857main ()
7858{
7859
7860 ;
7861 return 0;
7862}
7863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007864if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865 ac_cv_header_stdc=yes
7866else
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7870
7871if test $ac_cv_header_stdc = yes; then
7872 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007874/* end confdefs.h. */
7875#include <string.h>
7876
7877_ACEOF
7878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 $EGREP "memchr" >/dev/null 2>&1; then :
7880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007881else
7882 ac_cv_header_stdc=no
7883fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007884rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007885
7886fi
7887
7888if test $ac_cv_header_stdc = yes; then
7889 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007891/* end confdefs.h. */
7892#include <stdlib.h>
7893
7894_ACEOF
7895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 $EGREP "free" >/dev/null 2>&1; then :
7897
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007898else
7899 ac_cv_header_stdc=no
7900fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007901rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007902
7903fi
7904
7905if test $ac_cv_header_stdc = yes; then
7906 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007907 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007908 :
7909else
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007911/* end confdefs.h. */
7912#include <ctype.h>
7913#include <stdlib.h>
7914#if ((' ' & 0x0FF) == 0x020)
7915# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7916# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7917#else
7918# define ISLOWER(c) \
7919 (('a' <= (c) && (c) <= 'i') \
7920 || ('j' <= (c) && (c) <= 'r') \
7921 || ('s' <= (c) && (c) <= 'z'))
7922# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7923#endif
7924
7925#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7926int
7927main ()
7928{
7929 int i;
7930 for (i = 0; i < 256; i++)
7931 if (XOR (islower (i), ISLOWER (i))
7932 || toupper (i) != TOUPPER (i))
7933 return 2;
7934 return 0;
7935}
7936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007937if ac_fn_c_try_run "$LINENO"; then :
7938
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007939else
Matthias Kloseb9621712010-04-24 17:59:49 +00007940 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7943 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007944fi
7945
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007946fi
7947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7949$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007950if test $ac_cv_header_stdc = yes; then
7951
Matthias Kloseb9621712010-04-24 17:59:49 +00007952$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007953
7954fi
7955
stratakise768c862018-01-23 16:11:24 +01007956for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007957fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007958ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007959sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007960utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007961poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007962sys/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 +01007963sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007964sys/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 +01007965sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007966sys/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 -07007967libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007968linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007969sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007970do :
7971 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7972ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007973if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007975#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007976_ACEOF
7977
7978fi
7979
Guido van Rossum627b2d71993-12-24 10:39:16 +00007980done
7981
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007982ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007983for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7986$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007987if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007989else
Matthias Kloseb9621712010-04-24 17:59:49 +00007990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007992#include <sys/types.h>
7993#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007994
Martin v. Löwis11437992002-04-12 09:54:03 +00007995int
7996main ()
7997{
7998if ((DIR *) 0)
7999return 0;
8000 ;
8001 return 0;
8002}
8003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008006else
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011eval ac_res=\$$as_ac_Header
8012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8013$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008014if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008016#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008017_ACEOF
8018
8019ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008020fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008022done
8023# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8024if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8026$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008027if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008029else
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034/* Override any GCC internal prototype to avoid an error.
8035 Use char because int might match the return type of a GCC
8036 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008037#ifdef __cplusplus
8038extern "C"
8039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008040char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008041int
8042main ()
8043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 ;
8046 return 0;
8047}
8048_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049for ac_lib in '' dir; do
8050 if test -z "$ac_lib"; then
8051 ac_res="none required"
8052 else
8053 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008054 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008059rm -f core conftest.err conftest.$ac_objext \
8060 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008061 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064done
Victor Stinnere0be4232011-10-25 13:06:09 +02008065if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067else
8068 ac_cv_search_opendir=no
8069fi
8070rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008071LIBS=$ac_func_search_save_LIBS
8072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8074$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008076if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008079fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008080
Michael W. Hudson54241132001-12-07 15:38:26 +00008081else
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8083$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008084if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008086else
8087 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091/* Override any GCC internal prototype to avoid an error.
8092 Use char because int might match the return type of a GCC
8093 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094#ifdef __cplusplus
8095extern "C"
8096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008097char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008098int
8099main ()
8100{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 ;
8103 return 0;
8104}
8105_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106for ac_lib in '' x; do
8107 if test -z "$ac_lib"; then
8108 ac_res="none required"
8109 else
8110 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008111 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116rm -f core conftest.err conftest.$ac_objext \
8117 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008118 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121done
Victor Stinnere0be4232011-10-25 13:06:09 +02008122if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008124else
8125 ac_cv_search_opendir=no
8126fi
8127rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008128LIBS=$ac_func_search_save_LIBS
8129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8131$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008133if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008134 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008136fi
8137
8138fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008139
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8141$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008142if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008144else
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008146/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008147#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008148int
8149main ()
8150{
8151return makedev(0, 0);
8152 ;
8153 return 0;
8154}
8155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008156if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008157 ac_cv_header_sys_types_h_makedev=yes
8158else
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008161rm -f core conftest.err conftest.$ac_objext \
8162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008163
8164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8166$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008167
8168if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008169ac_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 +02008170if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008171
Matthias Kloseb9621712010-04-24 17:59:49 +00008172$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008173
8174fi
8175
8176
8177
8178 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008179 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 +02008180if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008181
Matthias Kloseb9621712010-04-24 17:59:49 +00008182$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008183
8184fi
8185
8186
8187 fi
8188fi
8189
Michael W. Hudson54241132001-12-07 15:38:26 +00008190
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008191# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8192# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8193SAVE_CFLAGS=$CFLAGS
8194CFLAGS="-std=c99 $CFLAGS"
8195for ac_header in bluetooth/bluetooth.h
8196do :
8197 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8198if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8199 cat >>confdefs.h <<_ACEOF
8200#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8201_ACEOF
8202
8203fi
8204
8205done
8206
8207CFLAGS=$SAVE_CFLAGS
8208
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008209# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8210for ac_header in net/if.h
8211do :
8212 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8213#ifdef STDC_HEADERS
8214# include <stdlib.h>
8215# include <stddef.h>
8216#else
8217# ifdef HAVE_STDLIB_H
8218# include <stdlib.h>
8219# endif
8220#endif
8221#ifdef HAVE_SYS_SOCKET_H
8222# include <sys/socket.h>
8223#endif
8224
8225"
Victor Stinnere0be4232011-10-25 13:06:09 +02008226if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008227 cat >>confdefs.h <<_ACEOF
8228#define HAVE_NET_IF_H 1
8229_ACEOF
8230
8231fi
8232
8233done
8234
8235
Martin v. Löwis11017b12006-01-14 18:12:57 +00008236# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008237for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008238do :
8239 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 +00008240#ifdef HAVE_ASM_TYPES_H
8241#include <asm/types.h>
8242#endif
8243#ifdef HAVE_SYS_SOCKET_H
8244#include <sys/socket.h>
8245#endif
8246
Matthias Kloseb9621712010-04-24 17:59:49 +00008247"
Victor Stinnere0be4232011-10-25 13:06:09 +02008248if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008249 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008250#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008251_ACEOF
8252
8253fi
8254
8255done
8256
8257
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008258# On Linux, qrtr.h requires asm/types.h
8259for ac_header in linux/qrtr.h
8260do :
8261 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8262#ifdef HAVE_ASM_TYPES_H
8263#include <asm/types.h>
8264#endif
8265#ifdef HAVE_SYS_SOCKET_H
8266#include <sys/socket.h>
8267#endif
8268
8269"
8270if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8271 cat >>confdefs.h <<_ACEOF
8272#define HAVE_LINUX_QRTR_H 1
8273_ACEOF
8274
8275fi
8276
8277done
8278
8279
caaveryeffc12f2017-09-06 18:18:10 -04008280for ac_header in linux/vm_sockets.h
8281do :
8282 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8283#ifdef HAVE_SYS_SOCKET_H
8284#include <sys/socket.h>
8285#endif
8286
8287"
8288if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8289 cat >>confdefs.h <<_ACEOF
8290#define HAVE_LINUX_VM_SOCKETS_H 1
8291_ACEOF
8292
8293fi
8294
8295done
8296
8297
karl ding360371f2020-04-29 15:31:19 -07008298# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8299for 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 +02008300do :
8301 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8302ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8303#ifdef HAVE_SYS_SOCKET_H
8304#include <sys/socket.h>
8305#endif
8306
8307"
8308if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8309 cat >>confdefs.h <<_ACEOF
8310#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8311_ACEOF
8312
8313fi
8314
8315done
8316
8317
Guido van Rossum627b2d71993-12-24 10:39:16 +00008318# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008319was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8321$as_echo_n "checking for clock_t in time.h... " >&6; }
8322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008323/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008325
8326_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008329 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008330else
Martin v. Löwis11437992002-04-12 09:54:03 +00008331
8332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008334
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008335
Guido van Rossum627b2d71993-12-24 10:39:16 +00008336fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008337rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008338
Matthias Kloseb9621712010-04-24 17:59:49 +00008339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8340$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008341
Matthias Kloseb9621712010-04-24 17:59:49 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8343$as_echo_n "checking for makedev... " >&6; }
8344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008345/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008346
Jesus Cea740f53a2010-04-28 11:35:30 +00008347#if defined(MAJOR_IN_MKDEV)
8348#include <sys/mkdev.h>
8349#elif defined(MAJOR_IN_SYSMACROS)
8350#include <sys/sysmacros.h>
8351#else
8352#include <sys/types.h>
8353#endif
8354
Neal Norwitz11690112002-07-30 01:08:28 +00008355int
8356main ()
8357{
Jesus Cea740f53a2010-04-28 11:35:30 +00008358
8359 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008360 ;
8361 return 0;
8362}
Matthias Kloseb159a552010-04-25 21:00:44 +00008363
Neal Norwitz11690112002-07-30 01:08:28 +00008364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008365if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008366 ac_cv_has_makedev=yes
8367else
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008370rm -f core conftest.err conftest.$ac_objext \
8371 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8373$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008374if test "$ac_cv_has_makedev" = "yes"; then
8375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008377
8378fi
8379
Christian Heimes985ecdc2013-11-20 11:46:18 +01008380# byte swapping
8381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8382$as_echo_n "checking for le64toh... " >&6; }
8383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8384/* end confdefs.h. */
8385
8386#ifdef HAVE_ENDIAN_H
8387#include <endian.h>
8388#elif defined(HAVE_SYS_ENDIAN_H)
8389#include <sys/endian.h>
8390#endif
8391
8392int
8393main ()
8394{
8395
8396 le64toh(1)
8397 ;
8398 return 0;
8399}
8400
8401_ACEOF
8402if ac_fn_c_try_link "$LINENO"; then :
8403 ac_cv_has_le64toh=yes
8404else
8405 ac_cv_has_le64toh=no
8406fi
8407rm -f core conftest.err conftest.$ac_objext \
8408 conftest$ac_exeext conftest.$ac_ext
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8410$as_echo "$ac_cv_has_le64toh" >&6; }
8411if test "$ac_cv_has_le64toh" = "yes"; then
8412
8413$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8414
8415fi
8416
Martin v. Löwis399a6892002-10-04 10:22:02 +00008417use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008418# Don't use largefile support for GNU/Hurd
8419case $ac_sys_system in GNU*)
8420 use_lfs=no
8421esac
8422
Martin v. Löwis399a6892002-10-04 10:22:02 +00008423if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008424# Two defines needed to enable largefile support on various platforms
8425# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008426case $ac_sys_system/$ac_sys_release in
8427AIX*)
8428
8429$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8430
8431 ;;
8432esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008433
Matthias Kloseb9621712010-04-24 17:59:49 +00008434$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
8436
Matthias Kloseb9621712010-04-24 17:59:49 +00008437$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008438
Martin v. Löwis399a6892002-10-04 10:22:02 +00008439fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008440
Guido van Rossum84e7b241996-08-19 21:59:00 +00008441# Add some code to confdefs.h so that the test for off_t works on SCO
8442cat >> confdefs.h <<\EOF
8443#if defined(SCO_DS)
8444#undef _OFF_T
8445#endif
8446EOF
8447
Guido van Rossumef2255b2000-03-10 22:30:29 +00008448# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008449ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008450if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008451
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008452else
Martin v. Löwis11437992002-04-12 09:54:03 +00008453
8454cat >>confdefs.h <<_ACEOF
8455#define mode_t int
8456_ACEOF
8457
8458fi
8459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008461if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008463else
Martin v. Löwis11437992002-04-12 09:54:03 +00008464
8465cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008467_ACEOF
8468
8469fi
8470
Matthias Kloseb9621712010-04-24 17:59:49 +00008471ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008472if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008473
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008474else
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
8476cat >>confdefs.h <<_ACEOF
8477#define pid_t int
8478_ACEOF
8479
8480fi
8481
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008482
Martin v. Löwis11437992002-04-12 09:54:03 +00008483cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008484#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008486
Matthias Kloseb9621712010-04-24 17:59:49 +00008487ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008488if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008490else
Martin v. Löwis11437992002-04-12 09:54:03 +00008491
8492cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008494_ACEOF
8495
8496fi
8497
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8499$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008500if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008502else
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008504/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008505#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008506
8507_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008510 ac_cv_type_uid_t=yes
8511else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008512 ac_cv_type_uid_t=no
8513fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008514rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008515
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8518$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008519if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008520
Matthias Kloseb9621712010-04-24 17:59:49 +00008521$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008522
8523
Matthias Kloseb9621712010-04-24 17:59:49 +00008524$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008525
8526fi
8527
Mark Dickinson983bc162012-12-02 12:11:38 +00008528
Matthias Kloseb9621712010-04-24 17:59:49 +00008529ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008530if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531
Matthias Kloseb9621712010-04-24 17:59:49 +00008532$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008533
8534fi
8535
Stefan Krah1919b7e2012-03-21 18:25:23 +01008536ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8537if test "x$ac_cv_type___uint128_t" = xyes; then :
8538
8539$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8540
8541fi
8542
Jack Jansendd19cf82001-12-06 22:36:17 +00008543
Michael W. Hudson54241132001-12-07 15:38:26 +00008544# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008545# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546# The cast to long int works around a bug in the HP C Compiler
8547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8549# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8551$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008552if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 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 +00008556
Martin v. Löwis11437992002-04-12 09:54:03 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 if test "$ac_cv_type_int" = yes; then
8559 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8560$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008561as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008562See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563 else
8564 ac_cv_sizeof_int=0
8565 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567
Martin v. Löwis11437992002-04-12 09:54:03 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8570$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571
8572
8573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008575#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008576_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008577
8578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579# The cast to long int works around a bug in the HP C Compiler
8580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8582# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8584$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008585if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 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 +00008589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 if test "$ac_cv_type_long" = yes; then
8592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008594as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008595See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596 else
8597 ac_cv_sizeof_long=0
8598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8603$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604
8605
8606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008608#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008609_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008610
8611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612# The cast to long int works around a bug in the HP C Compiler
8613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8615# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8617$as_echo_n "checking size of long long... " >&6; }
8618if ${ac_cv_sizeof_long_long+:} false; then :
8619 $as_echo_n "(cached) " >&6
8620else
8621 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8622
8623else
8624 if test "$ac_cv_type_long_long" = yes; then
8625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8627as_fn_error 77 "cannot compute sizeof (long long)
8628See \`config.log' for more details" "$LINENO" 5; }
8629 else
8630 ac_cv_sizeof_long_long=0
8631 fi
8632fi
8633
8634fi
8635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8636$as_echo "$ac_cv_sizeof_long_long" >&6; }
8637
8638
8639
8640cat >>confdefs.h <<_ACEOF
8641#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8642_ACEOF
8643
8644
8645# The cast to long int works around a bug in the HP C Compiler
8646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8650$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008651if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 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 +00008655
Martin v. Löwis11437992002-04-12 09:54:03 +00008656else
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 if test "$ac_cv_type_void_p" = yes; then
8658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008660as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662 else
8663 ac_cv_sizeof_void_p=0
8664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666
Martin v. Löwis11437992002-04-12 09:54:03 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8669$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670
8671
8672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008674#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008675_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008676
8677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678# The cast to long int works around a bug in the HP C Compiler
8679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8683$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008684if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 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 +00008688
Martin v. Löwis11437992002-04-12 09:54:03 +00008689else
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 if test "$ac_cv_type_short" = yes; then
8691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008693as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008694See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695 else
8696 ac_cv_sizeof_short=0
8697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699
Martin v. Löwis11437992002-04-12 09:54:03 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8702$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703
8704
8705
Martin v. Löwis11437992002-04-12 09:54:03 +00008706cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008707#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008708_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008709
8710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711# The cast to long int works around a bug in the HP C Compiler
8712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8716$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008717if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008719else
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 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 +00008721
Martin v. Löwis11437992002-04-12 09:54:03 +00008722else
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 if test "$ac_cv_type_float" = yes; then
8724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008726as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008727See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728 else
8729 ac_cv_sizeof_float=0
8730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732
Martin v. Löwis11437992002-04-12 09:54:03 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8735$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736
8737
8738
Martin v. Löwis11437992002-04-12 09:54:03 +00008739cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008740#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008741_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008742
8743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744# The cast to long int works around a bug in the HP C Compiler
8745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8747# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8749$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008750if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008752else
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 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 +00008754
Martin v. Löwis11437992002-04-12 09:54:03 +00008755else
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 if test "$ac_cv_type_double" = yes; then
8757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008759as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008760See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761 else
8762 ac_cv_sizeof_double=0
8763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008765
Martin v. Löwis11437992002-04-12 09:54:03 +00008766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8768$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769
8770
8771
Martin v. Löwis11437992002-04-12 09:54:03 +00008772cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008773#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008774_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008775
8776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777# The cast to long int works around a bug in the HP C Compiler
8778# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8779# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8780# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8782$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008783if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008785else
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 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 +00008787
Martin v. Löwis11437992002-04-12 09:54:03 +00008788else
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 if test "$ac_cv_type_fpos_t" = yes; then
8790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008792as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008793See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794 else
8795 ac_cv_sizeof_fpos_t=0
8796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008798
Martin v. Löwis11437992002-04-12 09:54:03 +00008799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8801$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802
8803
8804
Martin v. Löwis11437992002-04-12 09:54:03 +00008805cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008806#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008807_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008808
Michael W. Hudson54241132001-12-07 15:38:26 +00008809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810# The cast to long int works around a bug in the HP C Compiler
8811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8813# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8815$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008816if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008818else
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 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 +00008820
Martin v. Löwis18e16552006-02-15 17:27:45 +00008821else
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 if test "$ac_cv_type_size_t" = yes; then
8823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008825as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008826See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827 else
8828 ac_cv_sizeof_size_t=0
8829 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831
Martin v. Löwis18e16552006-02-15 17:27:45 +00008832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8834$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835
8836
8837
Martin v. Löwis18e16552006-02-15 17:27:45 +00008838cat >>confdefs.h <<_ACEOF
8839#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8840_ACEOF
8841
8842
Christian Heimes400adb02008-02-01 08:12:03 +00008843# The cast to long int works around a bug in the HP C Compiler
8844# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8845# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8846# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8848$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008849if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008850 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008851else
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 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 +00008853
Christian Heimes400adb02008-02-01 08:12:03 +00008854else
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 if test "$ac_cv_type_pid_t" = yes; then
8856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008858as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008859See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008860 else
8861 ac_cv_sizeof_pid_t=0
8862 fi
8863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008864
Christian Heimes400adb02008-02-01 08:12:03 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8867$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008868
8869
8870
8871cat >>confdefs.h <<_ACEOF
8872#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8873_ACEOF
8874
8875
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008876# The cast to long int works around a bug in the HP C Compiler
8877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8879# This bug is HP SR number 8606223364.
8880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8881$as_echo_n "checking size of uintptr_t... " >&6; }
8882if ${ac_cv_sizeof_uintptr_t+:} false; then :
8883 $as_echo_n "(cached) " >&6
8884else
8885 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8886
8887else
8888 if test "$ac_cv_type_uintptr_t" = yes; then
8889 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8890$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8891as_fn_error 77 "cannot compute sizeof (uintptr_t)
8892See \`config.log' for more details" "$LINENO" 5; }
8893 else
8894 ac_cv_sizeof_uintptr_t=0
8895 fi
8896fi
8897
8898fi
8899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8900$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8901
8902
8903
8904cat >>confdefs.h <<_ACEOF
8905#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8906_ACEOF
8907
8908
Michael W. Hudson54241132001-12-07 15:38:26 +00008909
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008910
Eitan Adler3055c942018-05-15 22:58:09 -07008911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8912$as_echo_n "checking for long double... " >&6; }
8913if ${ac_cv_type_long_double+:} false; then :
8914 $as_echo_n "(cached) " >&6
8915else
8916 if test "$GCC" = yes; then
8917 ac_cv_type_long_double=yes
8918 else
8919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8920/* end confdefs.h. */
8921/* The Stardent Vistra knows sizeof (long double), but does
8922 not support it. */
8923 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008924int
8925main ()
8926{
Eitan Adler3055c942018-05-15 22:58:09 -07008927static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8928 sizeof (double) <= sizeof (long double))];
8929test_array [0] = 0;
8930return test_array [0];
8931
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008932 ;
8933 return 0;
8934}
8935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008936if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008937 ac_cv_type_long_double=yes
8938else
8939 ac_cv_type_long_double=no
8940fi
8941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8942 fi
8943fi
8944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8945$as_echo "$ac_cv_type_long_double" >&6; }
8946 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008947
Matthias Kloseb9621712010-04-24 17:59:49 +00008948$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008949
Eitan Adler3055c942018-05-15 22:58:09 -07008950 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008951
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008952# The cast to long int works around a bug in the HP C Compiler
8953# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8954# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8955# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8957$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008958if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 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 +00008962
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008963else
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 if test "$ac_cv_type_long_double" = yes; then
8965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008967as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008968See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008969 else
8970 ac_cv_sizeof_long_double=0
8971 fi
8972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8976$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008977
8978
8979
8980cat >>confdefs.h <<_ACEOF
8981#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8982_ACEOF
8983
8984
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986# The cast to long int works around a bug in the HP C Compiler
8987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8989# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8991$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008992if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008994else
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 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 +00008996
Thomas Woutersb2137042007-02-01 18:02:27 +00008997else
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 if test "$ac_cv_type__Bool" = yes; then
8999 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009001as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009002See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003 else
9004 ac_cv_sizeof__Bool=0
9005 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009007
Thomas Woutersb2137042007-02-01 18:02:27 +00009008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9010$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011
9012
9013
Thomas Woutersb2137042007-02-01 18:02:27 +00009014cat >>confdefs.h <<_ACEOF
9015#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9016_ACEOF
9017
9018
Thomas Woutersb2137042007-02-01 18:02:27 +00009019
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009020# The cast to long int works around a bug in the HP C Compiler
9021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9023# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9025$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009026if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009028else
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009030#ifdef HAVE_SYS_TYPES_H
9031#include <sys/types.h>
9032#endif
9033
Matthias Kloseb9621712010-04-24 17:59:49 +00009034"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009035
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036else
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 if test "$ac_cv_type_off_t" = yes; then
9038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009040as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009041See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009042 else
9043 ac_cv_sizeof_off_t=0
9044 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009046
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9049$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009050
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009051
9052
Martin v. Löwis11437992002-04-12 09:54:03 +00009053cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009054#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009055_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009056
Michael W. Hudson54241132001-12-07 15:38:26 +00009057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9060$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009061if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009062 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009063
Matthias Kloseb9621712010-04-24 17:59:49 +00009064$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009065
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9067$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009068else
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9070$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009071fi
9072
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009073# The cast to long int works around a bug in the HP C Compiler
9074# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9075# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9076# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9078$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009079if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009081else
Matthias Kloseb9621712010-04-24 17:59:49 +00009082 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009083#ifdef HAVE_SYS_TYPES_H
9084#include <sys/types.h>
9085#endif
9086#ifdef HAVE_TIME_H
9087#include <time.h>
9088#endif
9089
Matthias Kloseb9621712010-04-24 17:59:49 +00009090"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009091
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009092else
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 if test "$ac_cv_type_time_t" = yes; then
9094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009096as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009097See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009098 else
9099 ac_cv_sizeof_time_t=0
9100 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009102
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9105$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009107
9108
Martin v. Löwis11437992002-04-12 09:54:03 +00009109cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009110#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009111_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009112
Michael W. Hudson54241132001-12-07 15:38:26 +00009113
9114
Trent Mick635f6fb2000-08-23 21:33:05 +00009115# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009116ac_save_cc="$CC"
9117if test "$ac_cv_kpthread" = "yes"
9118then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009119elif test "$ac_cv_kthread" = "yes"
9120then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009121elif test "$ac_cv_pthread" = "yes"
9122then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009123fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9126$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009127have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009129/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009130
9131 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009132int
9133main ()
9134{
Guido van Rossum12580492000-09-24 16:47:19 +00009135pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 ;
9137 return 0;
9138}
Matthias Kloseb159a552010-04-25 21:00:44 +00009139
Martin v. Löwis11437992002-04-12 09:54:03 +00009140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009141if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009142 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9146$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009147if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9151# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9153$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009154if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009155 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009156else
Matthias Kloseb9621712010-04-24 17:59:49 +00009157 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009158#ifdef HAVE_PTHREAD_H
9159#include <pthread.h>
9160#endif
9161
Matthias Kloseb9621712010-04-24 17:59:49 +00009162"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009164else
Matthias Kloseb9621712010-04-24 17:59:49 +00009165 if test "$ac_cv_type_pthread_t" = yes; then
9166 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009168as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009169See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009170 else
9171 ac_cv_sizeof_pthread_t=0
9172 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009174
Trent Mick635f6fb2000-08-23 21:33:05 +00009175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9177$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009179
9180
Martin v. Löwis11437992002-04-12 09:54:03 +00009181cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009182#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009183_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009184
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009185
Trent Mick635f6fb2000-08-23 21:33:05 +00009186fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009187
9188# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9189# This checking will be unnecessary after removing deprecated TLS API.
9190# The cast to long int works around a bug in the HP C Compiler
9191# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9192# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9193# This bug is HP SR number 8606223364.
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9195$as_echo_n "checking size of pthread_key_t... " >&6; }
9196if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9197 $as_echo_n "(cached) " >&6
9198else
9199 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9200"; then :
9201
9202else
9203 if test "$ac_cv_type_pthread_key_t" = yes; then
9204 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9205$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9206as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9207See \`config.log' for more details" "$LINENO" 5; }
9208 else
9209 ac_cv_sizeof_pthread_key_t=0
9210 fi
9211fi
9212
9213fi
9214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9215$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9216
9217
9218
9219cat >>confdefs.h <<_ACEOF
9220#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9221_ACEOF
9222
9223
9224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9225$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9226if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9228/* end confdefs.h. */
9229#include <pthread.h>
9230int
9231main ()
9232{
9233pthread_key_t k; k * 1;
9234 ;
9235 return 0;
9236}
9237_ACEOF
9238if ac_fn_c_try_compile "$LINENO"; then :
9239 ac_pthread_key_t_is_arithmetic_type=yes
9240else
9241 ac_pthread_key_t_is_arithmetic_type=no
9242
9243fi
9244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9246$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9247 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9248
9249$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9250
9251 fi
9252else
9253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9254$as_echo "no" >&6; }
9255fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009256CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009257
Michael W. Hudson54241132001-12-07 15:38:26 +00009258
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009259case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009260 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009261 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9262 ;;
9263 Darwin/*)
9264 OTHER_LIBTOOL_OPT=""
9265 ;;
9266esac
9267
9268
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009270case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009271 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009272 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9273 if test "${enable_universalsdk}"; then
9274 :
9275 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009276 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009277 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009278 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009279 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009280 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009281 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009282 if test ${gcc_version} '<' 4.0
9283 then
9284 LIBTOOL_CRUFT="-lcc_dynamic"
9285 else
9286 LIBTOOL_CRUFT=""
9287 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009289 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009290else
Matthias Kloseb9621712010-04-24 17:59:49 +00009291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009292/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009293
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009294 #include <unistd.h>
9295 int main(int argc, char*argv[])
9296 {
9297 if (sizeof(long) == 4) {
9298 return 0;
9299 } else {
9300 return 1;
9301 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009302 }
9303
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009305if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009306 ac_osx_32bit=yes
9307else
Matthias Kloseb9621712010-04-24 17:59:49 +00009308 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9311 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009312fi
9313
9314
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009315 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009316 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009317 i386)
9318 MACOSX_DEFAULT_ARCH="i386"
9319 ;;
9320 ppc)
9321 MACOSX_DEFAULT_ARCH="ppc"
9322 ;;
9323 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009324 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009325 ;;
9326 esac
9327 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009328 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009329 i386)
9330 MACOSX_DEFAULT_ARCH="x86_64"
9331 ;;
9332 ppc)
9333 MACOSX_DEFAULT_ARCH="ppc64"
9334 ;;
9335 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009336 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009337 ;;
9338 esac
9339
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009340 fi
9341
9342 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009343 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009344 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009345esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9347$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009348if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009349then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009350 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009351 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009352 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009353
Matthias Kloseb9621712010-04-24 17:59:49 +00009354$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9357$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009358 if test $enable_shared = "yes"
9359 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009360 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 +00009361 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009362else
Matthias Kloseb9621712010-04-24 17:59:49 +00009363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009365fi
9366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9368$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009369case $ac_sys_system/$ac_sys_release in
9370 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009371
Matthias Kloseb9621712010-04-24 17:59:49 +00009372$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009373
Matthias Kloseb9621712010-04-24 17:59:49 +00009374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9375$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009376 ;;
9377 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9379$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009380 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009381esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009382
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009384
Michael W. Hudson54241132001-12-07 15:38:26 +00009385
9386
9387
9388
Benjamin Peterson99f03762010-04-11 22:15:28 +00009389
Thomas Wouters477c8d52006-05-27 19:21:47 +00009390
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009391# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9392# -- usually .so, .sl on HP-UX, .dll on Cygwin
9393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9394$as_echo_n "checking the extension of shared libraries... " >&6; }
9395if test -z "$SHLIB_SUFFIX"; then
9396 case $ac_sys_system in
9397 hp*|HP*)
9398 case `uname -m` in
9399 ia64) SHLIB_SUFFIX=.so;;
9400 *) SHLIB_SUFFIX=.sl;;
9401 esac
9402 ;;
9403 CYGWIN*) SHLIB_SUFFIX=.dll;;
9404 *) SHLIB_SUFFIX=.so;;
9405 esac
9406fi
9407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9408$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009409
Guido van Rossum0a516c91994-09-12 10:58:40 +00009410# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009411# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009412# (Shared libraries in this instance are shared modules to be loaded into
9413# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9415$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009416if test -z "$LDSHARED"
9417then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009418 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009419 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009420 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009421 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009422 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009424 if test "$GCC" = "yes" ; then
9425 LDSHARED='$(CC) -shared'
9426 LDCXXSHARED='$(CXX) -shared'
9427 else
9428 LDSHARED='$(CC) -G'
9429 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009430 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009431 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009432 if test "$GCC" = "yes" ; then
9433 LDSHARED='$(CC) -shared'
9434 LDCXXSHARED='$(CXX) -shared'
9435 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009436 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009437 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009438 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009439 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009440 LDSHARED='$(CC) -bundle'
9441 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009442 if test "$enable_framework" ; then
9443 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009444 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9445 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009446 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009447 else
9448 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009449 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009450 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009451 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009452 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009453 LDSHARED='$(CC) -bundle'
9454 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009455 if test "$enable_framework" ; then
9456 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009457 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9458 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009459 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009460 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009461 # No framework, use the Python app as bundle-loader
9462 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009463 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009464 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009465 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009466 Darwin/*)
9467 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9468 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009469
Ned Deily36820b62014-06-25 13:44:22 -07009470 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9471 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9472 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9473 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9474 if test ${dep_target_major} -eq 10 && \
9475 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009476 then
Ned Deily36820b62014-06-25 13:44:22 -07009477 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009478 LDSHARED='$(CC) -bundle'
9479 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009480 if test "$enable_framework" ; then
9481 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009482 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9483 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009484 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009485 else
9486 # No framework, use the Python app as bundle-loader
9487 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9488 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009489 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009490 fi
Ned Deily36820b62014-06-25 13:44:22 -07009491 else
9492 # building for OS X 10.3 and later
9493 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9494 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9495 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009496 fi
9497 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009498 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009499 LDSHARED='$(CC) -shared'
9500 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009501 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009502 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009503 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009504 LDSHARED='$(CC) -shared'
9505 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009506 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009507 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009508 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009509 OpenBSD*)
9510 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9511 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009512 LDSHARED='$(CC) -shared $(CCSHARED)'
9513 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009514 else
9515 case `uname -r` in
9516 [01].* | 2.[0-7] | 2.[0-7].*)
9517 LDSHARED="ld -Bshareable ${LDFLAGS}"
9518 ;;
9519 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009520 LDSHARED='$(CC) -shared $(CCSHARED)'
9521 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009522 ;;
9523 esac
9524 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009525 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009526 LDSHARED='$(CC) -shared'
9527 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009528 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009529 if test "$GCC" = "yes" ; then
9530 LDSHARED='$(CC) -shared'
9531 LDCXXSHARED='$(CXX) -shared'
9532 else
9533 LDSHARED='$(CC) -G'
9534 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009535 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009536 SCO_SV*)
9537 LDSHARED='$(CC) -Wl,-G,-Bexport'
9538 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9539 CYGWIN*)
9540 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9541 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009542 *) LDSHARED="ld";;
9543 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9546$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009547LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009548BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009549# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009550# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9552$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009553if test -z "$CCSHARED"
9554then
Guido van Rossum07397971997-04-29 21:49:50 +00009555 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009556 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009557 then CCSHARED="-fPIC";
9558 elif test `uname -p` = sparc;
9559 then CCSHARED="-xcode=pic32";
9560 else CCSHARED="-Kpic";
9561 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009562 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009563 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009564 else CCSHARED="+z";
9565 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009566 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009567 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009568 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009569 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009570 if test "$GCC" = "yes"
9571 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009572 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009573 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009574 SCO_SV*)
9575 if test "$GCC" = "yes"
9576 then CCSHARED="-fPIC"
9577 else CCSHARED="-Kpic -belf"
9578 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009579 VxWorks*)
9580 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009581 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9584$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009585# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009586# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9588$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009589if test -z "$LINKFORSHARED"
9590then
Guido van Rossum07397971997-04-29 21:49:50 +00009591 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009592 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009593 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009594 LINKFORSHARED="-Wl,-E -Wl,+s";;
9595# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009596 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009597 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009598 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009600 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009601
9602 # Issue #18075: the default maximum stack size (8MBytes) is too
9603 # small for the default recursion limit. Increase the stack size
9604 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009605 # Note: This matches the value of THREAD_STACK_SIZE in
9606 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009607 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9608
Jack Jansene578a632001-08-15 01:27:14 +00009609 if test "$enable_framework"
9610 then
Jack Jansenda49e192005-01-07 13:08:22 +00009611 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009612 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009613 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009614 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009615 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009616 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009617 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009618 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9619 then
9620 LINKFORSHARED="-Wl,--export-dynamic"
9621 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009622 SunOS/5*) case $CC in
9623 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009624 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009625 then
9626 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009627 fi;;
9628 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009629 CYGWIN*)
9630 if test $enable_shared = "no"
9631 then
9632 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9633 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009634 QNX*)
9635 # -Wl,-E causes the symbols to be added to the dynamic
9636 # symbol table so that they can be found when a module
9637 # is loaded. -N 2048K causes the stack size to be set
9638 # to 2048 kilobytes so that the stack doesn't overflow
9639 # when running test_compile.py.
9640 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009641 VxWorks*)
9642 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009643 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9646$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009647
Michael W. Hudson54241132001-12-07 15:38:26 +00009648
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009649
Matthias Kloseb9621712010-04-24 17:59:49 +00009650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9651$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009652if test ! "$LIBRARY" = "$LDLIBRARY"
9653then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009654 case $ac_sys_system in
9655 CYGWIN*)
9656 # Cygwin needs CCSHARED when building extension DLLs
9657 # but not when building the interpreter DLL.
9658 CFLAGSFORSHARED='';;
9659 *)
9660 CFLAGSFORSHARED='$(CCSHARED)'
9661 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9664$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009665
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009666# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9667# library (with --enable-shared).
9668# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009669# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9670# if it is not required, since it creates a dependency of the shared library
9671# to LIBS. This, in turn, means that applications linking the shared libpython
9672# don't need to link LIBS explicitly. The default should be only changed
9673# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009674
Matthias Kloseb9621712010-04-24 17:59:49 +00009675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9676$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009677case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009678 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009679 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009680esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9682$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009683
9684
Guido van Rossum627b2d71993-12-24 10:39:16 +00009685# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9687$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009688if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009689 $as_echo_n "(cached) " >&6
9690else
9691 ac_check_lib_save_LIBS=$LIBS
9692LIBS="-lsendfile $LIBS"
9693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9694/* end confdefs.h. */
9695
9696/* Override any GCC internal prototype to avoid an error.
9697 Use char because int might match the return type of a GCC
9698 builtin and then its argument prototype would still apply. */
9699#ifdef __cplusplus
9700extern "C"
9701#endif
9702char sendfile ();
9703int
9704main ()
9705{
9706return sendfile ();
9707 ;
9708 return 0;
9709}
9710_ACEOF
9711if ac_fn_c_try_link "$LINENO"; then :
9712 ac_cv_lib_sendfile_sendfile=yes
9713else
9714 ac_cv_lib_sendfile_sendfile=no
9715fi
9716rm -f core conftest.err conftest.$ac_objext \
9717 conftest$ac_exeext conftest.$ac_ext
9718LIBS=$ac_check_lib_save_LIBS
9719fi
9720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9721$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009722if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009723 cat >>confdefs.h <<_ACEOF
9724#define HAVE_LIBSENDFILE 1
9725_ACEOF
9726
9727 LIBS="-lsendfile $LIBS"
9728
9729fi
9730
Matthias Kloseb9621712010-04-24 17:59:49 +00009731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9732$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009733if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009734 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009735else
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009737LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741/* Override any GCC internal prototype to avoid an error.
9742 Use char because int might match the return type of a GCC
9743 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009744#ifdef __cplusplus
9745extern "C"
9746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009747char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009748int
9749main ()
9750{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009751return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ;
9753 return 0;
9754}
9755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009756if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009758else
Matthias Kloseb9621712010-04-24 17:59:49 +00009759 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009761rm -f core conftest.err conftest.$ac_objext \
9762 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009763LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9766$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009767if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 cat >>confdefs.h <<_ACEOF
9769#define HAVE_LIBDL 1
9770_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009771
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009772 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009773
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009774fi
9775 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9777$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009778if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009780else
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009782LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786/* Override any GCC internal prototype to avoid an error.
9787 Use char because int might match the return type of a GCC
9788 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009789#ifdef __cplusplus
9790extern "C"
9791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009792char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009793int
9794main ()
9795{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 ;
9798 return 0;
9799}
9800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009801if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009803else
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009806rm -f core conftest.err conftest.$ac_objext \
9807 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009808LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9811$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009812if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 cat >>confdefs.h <<_ACEOF
9814#define HAVE_LIBDLD 1
9815_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009816
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009817 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009818
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009819fi
9820 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009821
Michael Felt0d3ccb42017-12-30 22:39:20 +01009822# checks for uuid.h location
9823for ac_header in uuid/uuid.h uuid.h
9824do :
9825 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9826ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9827if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9828 cat >>confdefs.h <<_ACEOF
9829#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9830_ACEOF
9831
9832fi
9833
9834done
9835
9836
Berker Peksag9a10ff42017-11-08 23:09:16 +03009837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9838$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9840/* end confdefs.h. */
9841#include <uuid/uuid.h>
9842int
9843main ()
9844{
9845
9846#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009847void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009848#endif
9849
9850 ;
9851 return 0;
9852}
9853_ACEOF
9854if ac_fn_c_try_compile "$LINENO"; then :
9855
9856$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9857
9858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9859$as_echo "yes" >&6; }
9860else
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9862$as_echo "no" >&6; }
9863
9864fi
9865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9866
Michael Felt0d3ccb42017-12-30 22:39:20 +01009867# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009868# FreeBSD and OpenBSD provides support as well
9869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9870$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9872/* end confdefs.h. */
9873#include <uuid.h>
9874int
9875main ()
9876{
9877
9878#ifndef uuid_create
9879void *x = uuid_create
9880#endif
9881
9882 ;
9883 return 0;
9884}
9885_ACEOF
9886if ac_fn_c_try_compile "$LINENO"; then :
9887
9888$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9889
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9891$as_echo "yes" >&6; }
9892else
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9894$as_echo "no" >&6; }
9895
9896fi
9897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9898
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009899# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9900# stream in big-endian byte-order
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9902$as_echo_n "checking for uuid_enc_be... " >&6; }
9903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9904/* end confdefs.h. */
9905#include <uuid.h>
9906int
9907main ()
9908{
9909
9910#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009911void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009912#endif
9913
9914 ;
9915 return 0;
9916}
9917_ACEOF
9918if ac_fn_c_try_compile "$LINENO"; then :
9919
9920$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9921
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9923$as_echo "yes" >&6; }
9924else
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
9927
9928fi
9929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9930
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009931# 'Real Time' functions on Solaris
9932# posix4 on Solaris 2.6
9933# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009935$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009936if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009938else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009939 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009943/* Override any GCC internal prototype to avoid an error.
9944 Use char because int might match the return type of a GCC
9945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009946#ifdef __cplusplus
9947extern "C"
9948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009949char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009950int
9951main ()
9952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009954 ;
9955 return 0;
9956}
9957_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958for ac_lib in '' pthread rt posix4; do
9959 if test -z "$ac_lib"; then
9960 ac_res="none required"
9961 else
9962 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009968rm -f core conftest.err conftest.$ac_objext \
9969 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009970 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009973done
Victor Stinnere0be4232011-10-25 13:06:09 +02009974if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009976else
9977 ac_cv_search_sem_init=no
9978fi
9979rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009980LIBS=$ac_func_search_save_LIBS
9981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9983$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009985if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009987
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009988fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009989
Martin v. Löwis519adae2003-09-20 10:47:47 +00009990
Martin v. Löwis19d17342003-06-14 21:03:05 +00009991# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9993$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009994if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009995 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009996else
9997 ac_check_lib_save_LIBS=$LIBS
9998LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010000/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002/* Override any GCC internal prototype to avoid an error.
10003 Use char because int might match the return type of a GCC
10004 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010005#ifdef __cplusplus
10006extern "C"
10007#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010008char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010009int
10010main ()
10011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010013 ;
10014 return 0;
10015}
10016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010018 ac_cv_lib_intl_textdomain=yes
10019else
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010022rm -f core conftest.err conftest.$ac_objext \
10023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010024LIBS=$ac_check_lib_save_LIBS
10025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10027$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010028if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010029
Matthias Kloseb9621712010-04-24 17:59:49 +000010030$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010031
Brett Cannonc6d936e2009-06-07 20:09:53 +000010032 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010033fi
10034
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010035
10036# checks for system dependent C++ extensions support
10037case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010038 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10039$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010041/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010042
Georg Brandl59e87bd2011-02-15 19:48:59 +000010043 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010044int
10045main ()
10046{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010047loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ;
10049 return 0;
10050}
Matthias Kloseb159a552010-04-25 21:00:44 +000010051
Martin v. Löwis11437992002-04-12 09:54:03 +000010052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010053if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010054
Matthias Kloseb159a552010-04-25 21:00:44 +000010055
Matthias Kloseb9621712010-04-24 17:59:49 +000010056$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010057
Matthias Kloseb159a552010-04-25 21:00:44 +000010058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010059$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010060
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010061else
Matthias Kloseb159a552010-04-25 21:00:44 +000010062
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010064$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010065
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010067rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010068 conftest$ac_exeext conftest.$ac_ext
10069# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10070# of the AIX system used to build/package Python executable. This tag serves
10071# as a baseline for bdist module packages
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10073$as_echo_n "checking for the system builddate... " >&6; }
10074 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10075
10076cat >>confdefs.h <<_ACEOF
10077#define AIX_BUILDDATE $AIX_BUILDDATE
10078_ACEOF
10079
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10081$as_echo "$AIX_BUILDDATE" >&6; }
10082 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010083 *) ;;
10084esac
10085
Christian Heimes985ecdc2013-11-20 11:46:18 +010010086# check for systems that require aligned memory access
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10088$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010089if ${ac_cv_aligned_required+:} false; then :
10090 $as_echo_n "(cached) " >&6
10091else
10092 if test "$cross_compiling" = yes; then :
10093 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010094else
10095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10096/* end confdefs.h. */
10097
10098int main()
10099{
10100 char s[16];
10101 int i, *p1, *p2;
10102 for (i=0; i < 16; i++)
10103 s[i] = i;
10104 p1 = (int*)(s+1);
10105 p2 = (int*)(s+2);
10106 if (*p1 == *p2)
10107 return 1;
10108 return 0;
10109}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010110_ACEOF
10111if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010112 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010113else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010114 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010115fi
10116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10117 conftest.$ac_objext conftest.beam conftest.$ac_ext
10118fi
10119
10120
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010121fi
10122
10123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10124$as_echo "$ac_cv_aligned_required" >&6; }
10125if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010126
10127$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10128
10129fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010130
10131# str, bytes and memoryview hash algorithm
10132
10133
10134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10135$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10136
10137# Check whether --with-hash_algorithm was given.
10138if test "${with_hash_algorithm+set}" = set; then :
10139 withval=$with_hash_algorithm;
10140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10141$as_echo "$withval" >&6; }
10142case "$withval" in
10143 siphash24)
10144 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10145
10146 ;;
10147 fnv)
10148 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10149
10150 ;;
10151 *)
10152 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10153 ;;
10154esac
10155
10156else
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10158$as_echo "default" >&6; }
10159fi
10160
10161
Paul Ganssle62972d92020-05-16 04:20:06 -040010162validate_tzpath() {
10163 # Checks that each element of hte path is an absolute path
10164 if test -z "$1"; then
10165 # Empty string is allowed: it indicates no system TZPATH
10166 return 0
10167 fi
10168
10169 # Bad paths are those that don't start with /
10170 if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
10171 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10172 return 1;
10173 fi
10174}
10175
10176TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10178$as_echo_n "checking for --with-tzpath... " >&6; }
10179
10180# Check whether --with-tzpath was given.
10181if test "${with_tzpath+set}" = set; then :
10182 withval=$with_tzpath;
10183case "$withval" in
10184 yes)
10185 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10186 ;;
10187 *)
10188 validate_tzpath "$withval"
10189 TZPATH="$withval"
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10191$as_echo "\"$withval\"" >&6; }
10192 ;;
10193esac
10194
10195else
10196 validate_tzpath "$TZPATH"
10197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10198$as_echo "\"$TZPATH\"" >&6; }
10199fi
10200
10201
10202
Charles-François Natalid30b0222014-05-08 23:08:51 +010010203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10204$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10205
10206# Check whether --with-address_sanitizer was given.
10207if test "${with_address_sanitizer+set}" = set; then :
10208 withval=$with_address_sanitizer;
10209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10210$as_echo "$withval" >&6; }
10211BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10212LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010213# ASan works by controlling memory allocation, our own malloc interferes.
10214with_pymalloc="no"
10215
10216else
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10218$as_echo "no" >&6; }
10219fi
10220
10221
10222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10223$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10224
10225# Check whether --with-memory_sanitizer was given.
10226if test "${with_memory_sanitizer+set}" = set; then :
10227 withval=$with_memory_sanitizer;
10228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10229$as_echo "$withval" >&6; }
10230BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10231LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10232# MSan works by controlling memory allocation, our own malloc interferes.
10233with_pymalloc="no"
10234
10235else
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10237$as_echo "no" >&6; }
10238fi
10239
10240
10241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10242$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10243
10244# Check whether --with-undefined_behavior_sanitizer was given.
10245if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10246 withval=$with_undefined_behavior_sanitizer;
10247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10248$as_echo "$withval" >&6; }
10249BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10250LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010251
10252else
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
10255fi
10256
10257
Guido van Rossum70c7f481998-03-26 18:44:10 +000010258# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10260$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010261if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010263else
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010265LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269/* Override any GCC internal prototype to avoid an error.
10270 Use char because int might match the return type of a GCC
10271 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010272#ifdef __cplusplus
10273extern "C"
10274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010275char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010276int
10277main ()
10278{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 ;
10281 return 0;
10282}
10283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010286else
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010289rm -f core conftest.err conftest.$ac_objext \
10290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010291LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10294$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010295if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010296 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010297fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010298 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10300$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010301if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010303else
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010305LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309/* Override any GCC internal prototype to avoid an error.
10310 Use char because int might match the return type of a GCC
10311 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010312#ifdef __cplusplus
10313extern "C"
10314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010315char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010316int
10317main ()
10318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 ;
10321 return 0;
10322}
10323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010324if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010326else
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010329rm -f core conftest.err conftest.$ac_objext \
10330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010331LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10334$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010335if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010336 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010337fi
10338 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010339
Matthias Kloseb9621712010-04-24 17:59:49 +000010340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10341$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010344if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010345 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10347$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010348LIBS="$withval $LIBS"
10349
10350else
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10352$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353fi
10354
Guido van Rossum7f43da71994-08-01 12:15:30 +000010355
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010356
10357
10358
10359
10360
10361
Victor Stinnerb477d192020-01-22 22:48:16 +010010362
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010363if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10364 if test -n "$ac_tool_prefix"; then
10365 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10366set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10368$as_echo_n "checking for $ac_word... " >&6; }
10369if ${ac_cv_path_PKG_CONFIG+:} false; then :
10370 $as_echo_n "(cached) " >&6
10371else
10372 case $PKG_CONFIG in
10373 [\\/]* | ?:[\\/]*)
10374 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10375 ;;
10376 *)
10377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378for as_dir in $PATH
10379do
10380 IFS=$as_save_IFS
10381 test -z "$as_dir" && as_dir=.
10382 for ac_exec_ext in '' $ac_executable_extensions; do
10383 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10384 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10386 break 2
10387 fi
10388done
10389 done
10390IFS=$as_save_IFS
10391
10392 ;;
10393esac
10394fi
10395PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10396if test -n "$PKG_CONFIG"; then
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10398$as_echo "$PKG_CONFIG" >&6; }
10399else
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10401$as_echo "no" >&6; }
10402fi
10403
10404
10405fi
10406if test -z "$ac_cv_path_PKG_CONFIG"; then
10407 ac_pt_PKG_CONFIG=$PKG_CONFIG
10408 # Extract the first word of "pkg-config", so it can be a program name with args.
10409set dummy pkg-config; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10413 $as_echo_n "(cached) " >&6
10414else
10415 case $ac_pt_PKG_CONFIG in
10416 [\\/]* | ?:[\\/]*)
10417 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10418 ;;
10419 *)
10420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421for as_dir in $PATH
10422do
10423 IFS=$as_save_IFS
10424 test -z "$as_dir" && as_dir=.
10425 for ac_exec_ext in '' $ac_executable_extensions; do
10426 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10427 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429 break 2
10430 fi
10431done
10432 done
10433IFS=$as_save_IFS
10434
10435 ;;
10436esac
10437fi
10438ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10439if test -n "$ac_pt_PKG_CONFIG"; then
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10441$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10442else
10443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
10445fi
10446
10447 if test "x$ac_pt_PKG_CONFIG" = x; then
10448 PKG_CONFIG=""
10449 else
10450 case $cross_compiling:$ac_tool_warned in
10451yes:)
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10453$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10454ac_tool_warned=yes ;;
10455esac
10456 PKG_CONFIG=$ac_pt_PKG_CONFIG
10457 fi
10458else
10459 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10460fi
10461
10462fi
10463if test -n "$PKG_CONFIG"; then
10464 _pkg_min_version=0.9.0
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10466$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10467 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10469$as_echo "yes" >&6; }
10470 else
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
10473 PKG_CONFIG=""
10474 fi
10475fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010476
10477# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10479$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010480
10481# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010482if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010483 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010484else
10485 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010486fi
10487
10488
Matthias Kloseb9621712010-04-24 17:59:49 +000010489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10490$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010491
10492# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10494$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010495
10496# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010497if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010498 withval=$with_system_ffi;
10499fi
10500
10501
Zachary Waref40d4dd2016-09-17 01:25:24 -050010502if test "$ac_sys_system" = "Darwin"
10503then
10504 case "$with_system_ffi" in
10505 "")
10506 with_system_ffi="no"
10507 ;;
10508 yes|no)
10509 ;;
10510 *)
10511 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10512 ;;
10513 esac
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10515$as_echo "$with_system_ffi" >&6; }
10516else
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10518$as_echo "yes" >&6; }
10519 if test "$with_system_ffi" != ""
10520 then
10521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10522$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10523 fi
10524 with_system_ffi="yes"
10525fi
Zachary Ware935043d2016-09-09 17:01:21 -070010526
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010527if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010528 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10529else
10530 LIBFFI_INCLUDEDIR=""
10531fi
10532
10533
Stefan Krah60187b52012-03-23 19:06:27 +010010534# Check for use of the system libmpdec library
10535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10536$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10537
10538# Check whether --with-system_libmpdec was given.
10539if test "${with_system_libmpdec+set}" = set; then :
10540 withval=$with_system_libmpdec;
10541else
10542 with_system_libmpdec="no"
10543fi
10544
10545
10546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10547$as_echo "$with_system_libmpdec" >&6; }
10548
Stefan Krah815280e2020-02-29 19:43:42 +010010549# Check whether _decimal should use a coroutine-local or thread-local context
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10551$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10552
10553# Check whether --with-decimal_contextvar was given.
10554if test "${with_decimal_contextvar+set}" = set; then :
10555 withval=$with_decimal_contextvar;
10556else
10557 with_decimal_contextvar="yes"
10558fi
10559
10560
10561if test "$with_decimal_contextvar" != "no"
10562then
10563
10564$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10565
10566fi
10567
10568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10569$as_echo "$with_decimal_contextvar" >&6; }
10570
Benjamin Peterson076ed002010-10-31 17:11:02 +000010571# Check for support for loadable sqlite extensions
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10573$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10574# Check whether --enable-loadable-sqlite-extensions was given.
10575if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10576 enableval=$enable_loadable_sqlite_extensions;
10577else
10578 enable_loadable_sqlite_extensions="no"
10579fi
10580
10581
10582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10583$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10584
Ned Deilyd819b932013-09-06 01:07:05 -070010585# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10586
10587
10588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10589$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10590
10591# Check whether --with-tcltk-includes was given.
10592if test "${with_tcltk_includes+set}" = set; then :
10593 withval=$with_tcltk_includes;
10594else
10595 with_tcltk_includes="default"
10596fi
10597
10598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10599$as_echo "$with_tcltk_includes" >&6; }
10600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10601$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10602
10603# Check whether --with-tcltk-libs was given.
10604if test "${with_tcltk_libs+set}" = set; then :
10605 withval=$with_tcltk_libs;
10606else
10607 with_tcltk_libs="default"
10608fi
10609
10610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10611$as_echo "$with_tcltk_libs" >&6; }
10612if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10613then
10614 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10615 then
10616 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10617 fi
10618 TCLTK_INCLUDES=""
10619 TCLTK_LIBS=""
10620else
10621 TCLTK_INCLUDES="$with_tcltk_includes"
10622 TCLTK_LIBS="$with_tcltk_libs"
10623fi
10624
Matthias Klose55708cc2009-04-30 08:06:49 +000010625# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10627$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010628
10629# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010630if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010631 withval=$with_dbmliborder;
10632if test x$with_dbmliborder = xyes
10633then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010634as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010635else
10636 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10637 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10638 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010639 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010640 fi
10641 done
10642fi
10643fi
10644
Matthias Kloseb9621712010-04-24 17:59:49 +000010645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10646$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010647
Martin v. Löwis11437992002-04-12 09:54:03 +000010648# Templates for things AC_DEFINEd more than once.
10649# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010650
10651
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010652if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010653then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010654 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010656
10657 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010658 if test "$ac_sys_system" = "SunOS"; then
10659 CFLAGS="$CFLAGS -D_REENTRANT"
10660 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010661elif test "$ac_cv_kpthread" = "yes"
10662then
10663 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010664 if test "$ac_cv_cxx_thread" = "yes"; then
10665 CXX="$CXX -Kpthread"
10666 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010667 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010668elif test "$ac_cv_kthread" = "yes"
10669then
10670 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010671 if test "$ac_cv_cxx_thread" = "yes"; then
10672 CXX="$CXX -Kthread"
10673 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010674 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675elif test "$ac_cv_pthread" = "yes"
10676then
10677 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010678 if test "$ac_cv_cxx_thread" = "yes"; then
10679 CXX="$CXX -pthread"
10680 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010681 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010682else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010683 if test ! -z "$withval" -a -d "$withval"
10684 then LDFLAGS="$LDFLAGS -L$withval"
10685 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010686
10687 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010688 # define _POSIX_THREADS in unistd.h. Some apparently don't
10689 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10691$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010694
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010695#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010696#ifdef _POSIX_THREADS
10697yes
10698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010699
10700_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010703 unistd_defines_pthreads=yes
10704else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010705 unistd_defines_pthreads=no
10706fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010707rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10710$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010713
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010714 # Just looking for pthread_create in libpthread is not enough:
10715 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10716 # So we really have to include pthread.h, and then link.
10717 _libs=$LIBS
10718 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10720$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010722/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010723
10724#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010725#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010726
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010727void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010728int
10729main ()
10730{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010731
10732pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 ;
10734 return 0;
10735}
10736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010737if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010738
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10740$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010741 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010742
Guido van Rossum02a1c402000-02-25 19:26:31 +000010743else
Martin v. Löwis11437992002-04-12 09:54:03 +000010744
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010745 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010747if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010748
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010749 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010750
Guido van Rossumad678af1998-10-02 14:42:15 +000010751else
Guido van Rossumad678af1998-10-02 14:42:15 +000010752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10754$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010755if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010757else
Martin v. Löwis11437992002-04-12 09:54:03 +000010758 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010759LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010763/* Override any GCC internal prototype to avoid an error.
10764 Use char because int might match the return type of a GCC
10765 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010766#ifdef __cplusplus
10767extern "C"
10768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010769char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010770int
10771main ()
10772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010773return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 ;
10775 return 0;
10776}
10777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010778if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010780else
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010783rm -f core conftest.err conftest.$ac_objext \
10784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010785LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10788$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010789if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010790
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010791 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010792 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010793
Greg Steinadf63d62000-07-05 10:38:09 +000010794else
Greg Steinadf63d62000-07-05 10:38:09 +000010795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10797$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010798if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010800else
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010802LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010806/* Override any GCC internal prototype to avoid an error.
10807 Use char because int might match the return type of a GCC
10808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010809#ifdef __cplusplus
10810extern "C"
10811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010812char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010813int
10814main ()
10815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010817 ;
10818 return 0;
10819}
10820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010822 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010823else
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010826rm -f core conftest.err conftest.$ac_objext \
10827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010828LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10831$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010832if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010833
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010834 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010835 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010836
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010837else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010838
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10840$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010841if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010843else
Martin v. Löwis11437992002-04-12 09:54:03 +000010844 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010845LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010849/* Override any GCC internal prototype to avoid an error.
10850 Use char because int might match the return type of a GCC
10851 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010852#ifdef __cplusplus
10853extern "C"
10854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010855char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010856int
10857main ()
10858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010860 ;
10861 return 0;
10862}
10863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010864if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010865 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010866else
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010869rm -f core conftest.err conftest.$ac_objext \
10870 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010871LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10874$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010875if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010876
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010877 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010878 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010879
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010880else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10883$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010884if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010886else
Martin v. Löwis11437992002-04-12 09:54:03 +000010887 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010888LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010892/* Override any GCC internal prototype to avoid an error.
10893 Use char because int might match the return type of a GCC
10894 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010895#ifdef __cplusplus
10896extern "C"
10897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010898char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010899int
10900main ()
10901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010902return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010903 ;
10904 return 0;
10905}
10906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010908 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010909else
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010912rm -f core conftest.err conftest.$ac_objext \
10913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010914LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10917$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010918if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010919
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010920 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010921 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010922
Guido van Rossumb93a8621998-05-07 13:27:32 +000010923else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010924
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010925 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10926
Guido van Rossum2d38f911996-06-26 19:47:01 +000010927fi
10928
Guido van Rossum627b2d71993-12-24 10:39:16 +000010929
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010930fi
10931
Guido van Rossum0be3e491997-05-22 20:33:33 +000010932fi
10933
Guido van Rossum49545951997-12-02 19:28:29 +000010934fi
10935
Guido van Rossumb93a8621998-05-07 13:27:32 +000010936fi
10937
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010939rm -f core conftest.err conftest.$ac_objext \
10940 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10943$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010944if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010946else
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010948LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010952/* Override any GCC internal prototype to avoid an error.
10953 Use char because int might match the return type of a GCC
10954 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010955#ifdef __cplusplus
10956extern "C"
10957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010958char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010959int
10960main ()
10961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 ;
10964 return 0;
10965}
10966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010967if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010972rm -f core conftest.err conftest.$ac_objext \
10973 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010974LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10977$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010978if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010979
Martin v. Löwis130fb172001-07-19 11:00:41 +000010980 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010981
Guido van Rossum627b2d71993-12-24 10:39:16 +000010982fi
10983
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010984
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010985fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010986
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010987if test "$posix_threads" = "yes"; then
10988 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010991
10992 fi
10993
10994 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10995 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010996 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010998
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010999 ;;
11000 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011001$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011002
11003 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011004 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011006
11007 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011008 esac
11009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11011$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011012 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011014else
Matthias Kloseb9621712010-04-24 17:59:49 +000011015 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011016 ac_cv_pthread_system_supported=no
11017else
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011019/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011020
11021 #include <stdio.h>
11022 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011023 void *foo(void *parm) {
11024 return NULL;
11025 }
11026 main() {
11027 pthread_attr_t attr;
11028 pthread_t id;
11029 if (pthread_attr_init(&attr)) exit(-1);
11030 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11031 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11032 exit(0);
11033 }
11034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011035if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011036 ac_cv_pthread_system_supported=yes
11037else
Matthias Kloseb9621712010-04-24 17:59:49 +000011038 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011042fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044
Guido van Rossum627b2d71993-12-24 10:39:16 +000011045fi
11046
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11048$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011049 if test "$ac_cv_pthread_system_supported" = "yes"; then
11050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011052
11053 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 for ac_func in pthread_sigmask
11055do :
11056 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011057if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011058 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011059#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011060_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011061 case $ac_sys_system in
11062 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011065
11066 ;;
11067 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011068fi
11069done
11070
pdoxe14679c2017-10-05 00:01:56 -070011071 for ac_func in pthread_getcpuclockid
11072do :
11073 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11074if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11075 cat >>confdefs.h <<_ACEOF
11076#define HAVE_PTHREAD_GETCPUCLOCKID 1
11077_ACEOF
11078
11079fi
11080done
11081
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011082fi
11083
11084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011086
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11088$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011090if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011095 ipv6=no
11096 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11098$as_echo "yes" >&6; }
11099 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011100
11101 ipv6=yes
11102 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104else
Martin v. Löwis11437992002-04-12 09:54:03 +000011105
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011107/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108 /* AF_INET6 available check */
11109#include <sys/types.h>
11110#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011111int
11112main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011113{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011114int domain = AF_INET6;
11115 ;
11116 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117}
Martin v. Löwis11437992002-04-12 09:54:03 +000011118_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011119if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011120
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11122$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011124
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125else
Matthias Kloseb159a552010-04-25 21:00:44 +000011126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11128$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011134if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11136$as_echo_n "checking if RFC2553 API is available... " >&6; }
11137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011139
11140 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011141#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011142int
11143main ()
11144{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011145struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011146 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 ;
11148 return 0;
11149}
Matthias Kloseb159a552010-04-25 21:00:44 +000011150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011152if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011153
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011156 ipv6=yes
11157
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011158else
Matthias Kloseb159a552010-04-25 21:00:44 +000011159
11160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011161$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011162 ipv6=no
11163
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011166fi
11167
11168if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011169 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011170
11171fi
11172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173fi
11174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011175
11176ipv6type=unknown
11177ipv6lib=none
11178ipv6trylibc=no
11179
11180if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11182$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011183 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11184 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011185 case $i in
11186 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011188/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011189
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011190#include <netinet/in.h>
11191#ifdef IPV6_INRIA_VERSION
11192yes
11193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011194_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011196 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011197 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011198fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011199rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011200
11201 ;;
11202 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011204/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011205
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011206#include <netinet/in.h>
11207#ifdef __KAME__
11208yes
11209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011210_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011213 ipv6type=$i;
11214 ipv6lib=inet6
11215 ipv6libdir=/usr/local/v6/lib
11216 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011217fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011218rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011219
11220 ;;
11221 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011223/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011224
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011225#include <features.h>
11226#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11227yes
11228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011229_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011231 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011232 ipv6type=$i;
11233 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011234fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011235rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011236
11237 ;;
11238 linux-inet6)
11239 if test -d /usr/inet6; then
11240 ipv6type=$i
11241 ipv6lib=inet6
11242 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011243 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011244 fi
11245 ;;
11246 solaris)
11247 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011248 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011249 ipv6type=$i
11250 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011251 fi
11252 fi
11253 ;;
11254 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011256/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011257
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011258#include <sys/param.h>
11259#ifdef _TOSHIBA_INET6
11260yes
11261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011262_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011263if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011264 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011265 ipv6type=$i;
11266 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011267 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011268fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011269rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011270
11271 ;;
11272 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011275
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011276#include </usr/local/v6/include/sys/v6config.h>
11277#ifdef __V6D__
11278yes
11279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011280_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011282 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011283 ipv6type=$i;
11284 ipv6lib=v6;
11285 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011286 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011287fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011288rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011289
11290 ;;
11291 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011294
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011295#include <sys/param.h>
11296#ifdef _ZETA_MINAMI_INET6
11297yes
11298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011299_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011302 ipv6type=$i;
11303 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011304 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011305fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011306rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011307
11308 ;;
11309 esac
11310 if test "$ipv6type" != "unknown"; then
11311 break
11312 fi
11313 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11315$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011316fi
11317
11318if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11319 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11320 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11321 echo "using lib$ipv6lib"
11322 else
11323 if test $ipv6trylibc = "yes"; then
11324 echo "using libc"
11325 else
11326 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11327 echo "You need to fetch lib$ipv6lib.a from appropriate"
11328 echo 'ipv6 kit and compile beforehand.'
11329 exit 1
11330 fi
11331 fi
11332fi
11333
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11335$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11337/* end confdefs.h. */
11338 /* CAN_RAW_FD_FRAMES available check */
11339#include <linux/can/raw.h>
11340int
11341main ()
11342{
11343int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11344 ;
11345 return 0;
11346}
11347_ACEOF
11348if ac_fn_c_try_compile "$LINENO"; then :
11349
11350
11351$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11352
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11354$as_echo "yes" >&6; }
11355
11356else
11357
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11359$as_echo "no" >&6; }
11360
11361fi
11362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11363
Zackery Spytz97e0de02020-04-09 06:03:49 -060011364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11365$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11367/* end confdefs.h. */
11368
11369#include <linux/can/raw.h>
11370int
11371main ()
11372{
11373int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11374 ;
11375 return 0;
11376}
11377_ACEOF
11378if ac_fn_c_try_compile "$LINENO"; then :
11379
11380
11381$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11382
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11384$as_echo "yes" >&6; }
11385
11386else
11387
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11389$as_echo "no" >&6; }
11390
11391fi
11392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11393
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011394# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11396$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011399if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400 withval=$with_doc_strings;
11401fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011402
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011403
11404if test -z "$with_doc_strings"
11405then with_doc_strings="yes"
11406fi
11407if test "$with_doc_strings" != "no"
11408then
11409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011411
11412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11414$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011415
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011416# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11418$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011421if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011422 withval=$with_pymalloc;
11423fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011424
Neil Schemenauera35c6882001-02-27 04:45:05 +000011425
Neil Schemenauer16c22972002-03-22 15:34:49 +000011426if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011427then
11428 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011429fi
11430if test "$with_pymalloc" != "no"
11431then
Martin v. Löwis11437992002-04-12 09:54:03 +000011432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011434
11435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11437$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011438
Nick Coghlan6ea41862017-06-11 13:16:15 +100011439# Check for --with-c-locale-coercion
11440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11441$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11442
11443# Check whether --with-c-locale-coercion was given.
11444if test "${with_c_locale_coercion+set}" = set; then :
11445 withval=$with_c_locale_coercion;
11446fi
11447
11448
11449if test -z "$with_c_locale_coercion"
11450then
11451 with_c_locale_coercion="yes"
11452fi
11453if test "$with_c_locale_coercion" != "no"
11454then
11455
11456$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11457
11458fi
11459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11460$as_echo "$with_c_locale_coercion" >&6; }
11461
Benjamin Peterson05159c42009-12-03 03:01:27 +000011462# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11464$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011465
11466# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011467if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011468 withval=$with_valgrind;
11469else
11470 with_valgrind=no
11471fi
11472
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11474$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011475if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011476 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 +020011477if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011478
Matthias Kloseb9621712010-04-24 17:59:49 +000011479$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011480
11481else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011482 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011483
11484fi
11485
11486
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011487 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011488fi
11489
Łukasz Langaa785c872016-09-09 17:37:37 -070011490# Check for DTrace support
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11492$as_echo_n "checking for --with-dtrace... " >&6; }
11493
11494# Check whether --with-dtrace was given.
11495if test "${with_dtrace+set}" = set; then :
11496 withval=$with_dtrace;
11497else
11498 with_dtrace=no
11499fi
11500
11501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11502$as_echo "$with_dtrace" >&6; }
11503
11504
11505
11506
11507
11508DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011509DTRACE_HEADERS=
11510DTRACE_OBJS=
11511
11512if test "$with_dtrace" = "yes"
11513then
11514 # Extract the first word of "dtrace", so it can be a program name with args.
11515set dummy dtrace; ac_word=$2
11516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11517$as_echo_n "checking for $ac_word... " >&6; }
11518if ${ac_cv_path_DTRACE+:} false; then :
11519 $as_echo_n "(cached) " >&6
11520else
11521 case $DTRACE in
11522 [\\/]* | ?:[\\/]*)
11523 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11524 ;;
11525 *)
11526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11527for as_dir in $PATH
11528do
11529 IFS=$as_save_IFS
11530 test -z "$as_dir" && as_dir=.
11531 for ac_exec_ext in '' $ac_executable_extensions; do
11532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11533 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11535 break 2
11536 fi
11537done
11538 done
11539IFS=$as_save_IFS
11540
11541 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11542 ;;
11543esac
11544fi
11545DTRACE=$ac_cv_path_DTRACE
11546if test -n "$DTRACE"; then
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11548$as_echo "$DTRACE" >&6; }
11549else
11550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551$as_echo "no" >&6; }
11552fi
11553
11554
11555 if test "$DTRACE" = "not found"; then
11556 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11557 fi
11558
11559$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11560
11561 DTRACE_HEADERS="Include/pydtrace_probes.h"
11562
11563 # On OS X, DTrace providers do not need to be explicitly compiled and
11564 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11565 # generation flag '-G'. We check for presence of this flag, rather than
11566 # hardcoding support by OS, in the interest of robustness.
11567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11568$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11569if ${ac_cv_dtrace_link+:} false; then :
11570 $as_echo_n "(cached) " >&6
11571else
11572 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011573 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011574 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011575 ac_cv_dtrace_link=yes
11576
11577fi
11578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11579$as_echo "$ac_cv_dtrace_link" >&6; }
11580 if test "$ac_cv_dtrace_link" = "yes"; then
11581 DTRACE_OBJS="Python/pydtrace.o"
11582 fi
11583fi
11584
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011585# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011586
Guido van Rossum98935bf2001-09-05 19:13:16 +000011587DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011588
Guido van Rossume97ee181999-12-20 21:27:22 +000011589# the dlopen() function means we might want to use dynload_shlib.o. some
11590# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011591for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011592do :
11593 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011594if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011597_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011598
Guido van Rossume97ee181999-12-20 21:27:22 +000011599fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011600done
Guido van Rossume97ee181999-12-20 21:27:22 +000011601
Michael W. Hudson54241132001-12-07 15:38:26 +000011602
Guido van Rossume97ee181999-12-20 21:27:22 +000011603# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11604# loading of modules.
11605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11607$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011608if test -z "$DYNLOADFILE"
11609then
11610 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011611 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11612 if test "$ac_cv_func_dlopen" = yes
11613 then DYNLOADFILE="dynload_shlib.o"
11614 else DYNLOADFILE="dynload_aix.o"
11615 fi
11616 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011617 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011618 *)
11619 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11620 # out any dynamic loading
11621 if test "$ac_cv_func_dlopen" = yes
11622 then DYNLOADFILE="dynload_shlib.o"
11623 else DYNLOADFILE="dynload_stub.o"
11624 fi
11625 ;;
11626 esac
11627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11629$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011630if test "$DYNLOADFILE" != "dynload_stub.o"
11631then
Martin v. Löwis11437992002-04-12 09:54:03 +000011632
Matthias Kloseb9621712010-04-24 17:59:49 +000011633$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011634
11635fi
11636
Neil Schemenauer4e425612001-06-19 15:44:15 +000011637# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11638
Michael W. Hudson54241132001-12-07 15:38:26 +000011639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11641$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011642if test -z "$MACHDEP_OBJS"
11643then
Jack Jansene578a632001-08-15 01:27:14 +000011644 MACHDEP_OBJS=$extra_machdep_objs
11645else
11646 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011647fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011648if test -z "$MACHDEP_OBJS"; then
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11650$as_echo "none" >&6; }
11651else
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11653$as_echo "$MACHDEP_OBJS" >&6; }
11654fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011655
Guido van Rossum627b2d71993-12-24 10:39:16 +000011656# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011657for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011658 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11659 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011660 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011661 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011662 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011663 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011664 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011665 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011666 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011667 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011668 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011669 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011670 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011671 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011672 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011673 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011674 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011675 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11676 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011677 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011678 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011679 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011680 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011681 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011682do :
11683 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11684ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011685if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011686 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011687#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011688_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011689
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011690fi
11691done
11692
Michael W. Hudson54241132001-12-07 15:38:26 +000011693
Benjamin Peterson40caa052018-09-12 15:52:40 -070011694# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11695# links. Some libc implementations have a stub lchmod implementation that always
11696# returns an error.
11697if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011698 for ac_func in lchmod
11699do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011700 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11701if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011702 cat >>confdefs.h <<_ACEOF
11703#define HAVE_LCHMOD 1
11704_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011705
11706fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011707done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011708
11709fi
11710
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011711ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11712 #include <dirent.h>
11713"
11714if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11715
11716$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11717
11718fi
11719
11720
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011721# For some functions, having a definition is not sufficient, since
11722# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11724$as_echo_n "checking for chroot... " >&6; }
11725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011726/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011727#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011728int
11729main ()
11730{
11731void *x=chroot
11732 ;
11733 return 0;
11734}
11735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011739
Matthias Kloseb159a552010-04-25 21:00:44 +000011740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011741$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11744$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011745
11746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11749$as_echo_n "checking for link... " >&6; }
11750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011751/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011752#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011753int
11754main ()
11755{
11756void *x=link
11757 ;
11758 return 0;
11759}
11760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011764
Matthias Kloseb159a552010-04-25 21:00:44 +000011765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011766$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011767else
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11769$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011770
11771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11774$as_echo_n "checking for symlink... " >&6; }
11775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011776/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011777#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011778int
11779main ()
11780{
11781void *x=symlink
11782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011789
Matthias Kloseb159a552010-04-25 21:00:44 +000011790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11794$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011795
11796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11799$as_echo_n "checking for fchdir... " >&6; }
11800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011801/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011802#include <unistd.h>
11803int
11804main ()
11805{
11806void *x=fchdir
11807 ;
11808 return 0;
11809}
11810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011811if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011814
Matthias Kloseb159a552010-04-25 21:00:44 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011816$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011817else
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011820
11821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11824$as_echo_n "checking for fsync... " >&6; }
11825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011826/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011827#include <unistd.h>
11828int
11829main ()
11830{
11831void *x=fsync
11832 ;
11833 return 0;
11834}
11835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011836if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011837
Matthias Kloseb9621712010-04-24 17:59:49 +000011838$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011839
Matthias Kloseb159a552010-04-25 21:00:44 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011841$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11844$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011845
11846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11849$as_echo_n "checking for fdatasync... " >&6; }
11850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011851/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011852#include <unistd.h>
11853int
11854main ()
11855{
11856void *x=fdatasync
11857 ;
11858 return 0;
11859}
11860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011861if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011862
Matthias Kloseb9621712010-04-24 17:59:49 +000011863$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011864
Matthias Kloseb159a552010-04-25 21:00:44 +000011865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011866$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011867else
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11869$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011870
11871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11874$as_echo_n "checking for epoll... " >&6; }
11875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011876/* end confdefs.h. */
11877#include <sys/epoll.h>
11878int
11879main ()
11880{
11881void *x=epoll_create
11882 ;
11883 return 0;
11884}
11885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011886if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011887
Matthias Kloseb9621712010-04-24 17:59:49 +000011888$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011889
Matthias Kloseb159a552010-04-25 21:00:44 +000011890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011891$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011892else
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11894$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011895
11896fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11899$as_echo_n "checking for epoll_create1... " >&6; }
11900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11901/* end confdefs.h. */
11902#include <sys/epoll.h>
11903int
11904main ()
11905{
11906void *x=epoll_create1
11907 ;
11908 return 0;
11909}
11910_ACEOF
11911if ac_fn_c_try_compile "$LINENO"; then :
11912
11913$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11914
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11916$as_echo "yes" >&6; }
11917else
11918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11919$as_echo "no" >&6; }
11920
11921fi
11922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11924$as_echo_n "checking for kqueue... " >&6; }
11925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011926/* end confdefs.h. */
11927
11928#include <sys/types.h>
11929#include <sys/event.h>
11930
11931int
11932main ()
11933{
11934int x=kqueue()
11935 ;
11936 return 0;
11937}
11938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011939if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011940
Matthias Kloseb9621712010-04-24 17:59:49 +000011941$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011942
Matthias Kloseb159a552010-04-25 21:00:44 +000011943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011944$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011945else
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011948
11949fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11952$as_echo_n "checking for prlimit... " >&6; }
11953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11954/* end confdefs.h. */
11955
11956#include <sys/time.h>
11957#include <sys/resource.h>
11958
11959int
11960main ()
11961{
11962void *x=prlimit
11963 ;
11964 return 0;
11965}
11966_ACEOF
11967if ac_fn_c_try_compile "$LINENO"; then :
11968
11969$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11970
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11972$as_echo "yes" >&6; }
11973else
11974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11975$as_echo "no" >&6; }
11976
11977fi
11978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11979
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11981$as_echo_n "checking for memfd_create... " >&6; }
11982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11983/* end confdefs.h. */
11984
11985#ifdef HAVE_SYS_MMAN_H
11986#include <sys/mman.h>
11987#endif
11988#ifdef HAVE_SYS_MEMFD_H
11989#include <sys/memfd.h>
11990#endif
11991
11992int
11993main ()
11994{
11995void *x=memfd_create
11996 ;
11997 return 0;
11998}
11999_ACEOF
12000if ac_fn_c_try_compile "$LINENO"; then :
12001
12002$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12003
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12005$as_echo "yes" >&6; }
12006else
12007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12008$as_echo "no" >&6; }
12009
12010fi
12011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12012
Martin v. Löwisd5843682002-11-21 20:41:28 +000012013# On some systems (eg. FreeBSD 5), we would find a definition of the
12014# functions ctermid_r, setgroups in the library, but no prototype
12015# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12016# address to avoid compiler warnings and potential miscompilations
12017# because of the missing prototypes.
12018
Matthias Kloseb9621712010-04-24 17:59:49 +000012019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12020$as_echo_n "checking for ctermid_r... " >&6; }
12021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012022/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012023
Martin v. Löwisd5843682002-11-21 20:41:28 +000012024#include <stdio.h>
12025
Martin v. Löwisd5843682002-11-21 20:41:28 +000012026int
12027main ()
12028{
12029void* p = ctermid_r
12030 ;
12031 return 0;
12032}
12033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012035
Matthias Kloseb9621712010-04-24 17:59:49 +000012036$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012037
Matthias Kloseb159a552010-04-25 21:00:44 +000012038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012039$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012043
12044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12046
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12048$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012049if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012050 $as_echo_n "(cached) " >&6
12051else
12052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012053/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012054#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012055int
12056main ()
12057{
12058void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012059
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012060 ;
12061 return 0;
12062}
12063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012064if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012065 ac_cv_flock_decl=yes
12066else
12067 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012068
12069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012071
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012072fi
12073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12074$as_echo "$ac_cv_flock_decl" >&6; }
12075if test "x${ac_cv_flock_decl}" = xyes; then
12076 for ac_func in flock
12077do :
12078 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012079if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012080 cat >>confdefs.h <<_ACEOF
12081#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012082_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012083
Antoine Pitroua3000072010-09-07 14:52:42 +000012084else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012086$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012087if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012088 $as_echo_n "(cached) " >&6
12089else
12090 ac_check_lib_save_LIBS=$LIBS
12091LIBS="-lbsd $LIBS"
12092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12093/* end confdefs.h. */
12094
12095/* Override any GCC internal prototype to avoid an error.
12096 Use char because int might match the return type of a GCC
12097 builtin and then its argument prototype would still apply. */
12098#ifdef __cplusplus
12099extern "C"
12100#endif
12101char flock ();
12102int
12103main ()
12104{
12105return flock ();
12106 ;
12107 return 0;
12108}
12109_ACEOF
12110if ac_fn_c_try_link "$LINENO"; then :
12111 ac_cv_lib_bsd_flock=yes
12112else
12113 ac_cv_lib_bsd_flock=no
12114fi
12115rm -f core conftest.err conftest.$ac_objext \
12116 conftest$ac_exeext conftest.$ac_ext
12117LIBS=$ac_check_lib_save_LIBS
12118fi
12119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12120$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012121if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012122 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012123
12124
12125$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12126
12127
12128fi
12129
12130
12131fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012132done
12133
Antoine Pitroua3000072010-09-07 14:52:42 +000012134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12137$as_echo_n "checking for getpagesize... " >&6; }
12138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012139/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012140
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012141#include <unistd.h>
12142
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012143int
12144main ()
12145{
12146void* p = getpagesize
12147 ;
12148 return 0;
12149}
12150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012154
Matthias Kloseb159a552010-04-25 21:00:44 +000012155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012156$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12159$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012160
12161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012163
Victor Stinner984890f2011-11-24 13:53:38 +010012164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12165$as_echo_n "checking for broken unsetenv... " >&6; }
12166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12167/* end confdefs.h. */
12168
12169#include <stdlib.h>
12170
12171int
12172main ()
12173{
12174int res = unsetenv("DUMMY")
12175 ;
12176 return 0;
12177}
12178_ACEOF
12179if ac_fn_c_try_compile "$LINENO"; then :
12180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12181$as_echo "no" >&6; }
12182else
12183
12184$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12185
12186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12187$as_echo "yes" >&6; }
12188
12189fi
12190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12191
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012192for ac_prog in true
12193do
12194 # Extract the first word of "$ac_prog", so it can be a program name with args.
12195set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12197$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012198if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012200else
12201 if test -n "$TRUE"; then
12202 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12203else
12204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12205for as_dir in $PATH
12206do
12207 IFS=$as_save_IFS
12208 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012211 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 $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 +000012213 break 2
12214 fi
12215done
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012218
12219fi
12220fi
12221TRUE=$ac_cv_prog_TRUE
12222if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12224$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12227$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012228fi
12229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012231 test -n "$TRUE" && break
12232done
12233test -n "$TRUE" || TRUE="/bin/true"
12234
12235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12237$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012238if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012240else
12241 ac_check_lib_save_LIBS=$LIBS
12242LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012244/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012246/* Override any GCC internal prototype to avoid an error.
12247 Use char because int might match the return type of a GCC
12248 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012249#ifdef __cplusplus
12250extern "C"
12251#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012252char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012253int
12254main ()
12255{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012257 ;
12258 return 0;
12259}
12260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012262 ac_cv_lib_c_inet_aton=yes
12263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012266rm -f core conftest.err conftest.$ac_objext \
12267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012268LIBS=$ac_check_lib_save_LIBS
12269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12271$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012272if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012273 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012274else
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12276$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012277if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012279else
12280 ac_check_lib_save_LIBS=$LIBS
12281LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285/* Override any GCC internal prototype to avoid an error.
12286 Use char because int might match the return type of a GCC
12287 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012288#ifdef __cplusplus
12289extern "C"
12290#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012291char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012292int
12293main ()
12294{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012296 ;
12297 return 0;
12298}
12299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012300if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012301 ac_cv_lib_resolv_inet_aton=yes
12302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012305rm -f core conftest.err conftest.$ac_objext \
12306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012307LIBS=$ac_check_lib_save_LIBS
12308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12310$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012311if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012312 cat >>confdefs.h <<_ACEOF
12313#define HAVE_LIBRESOLV 1
12314_ACEOF
12315
12316 LIBS="-lresolv $LIBS"
12317
12318fi
12319
12320
12321fi
12322
12323
Christian Heimesd0764e22007-12-04 15:00:33 +000012324# On Tru64, chflags seems to be present, but calling it will
12325# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12327$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012328if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012332 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012333else
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012335/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012336
Christian Heimesd0764e22007-12-04 15:00:33 +000012337#include <sys/stat.h>
12338#include <unistd.h>
12339int main(int argc, char*argv[])
12340{
12341 if(chflags(argv[0], 0) != 0)
12342 return 1;
12343 return 0;
12344}
Ned Deily3eb67d52011-06-28 00:00:28 -070012345
Christian Heimesd0764e22007-12-04 15:00:33 +000012346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012348 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012349else
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12353 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012354fi
12355
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012356
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12359$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012360if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012362if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012363 ac_cv_have_chflags="yes"
12364else
12365 ac_cv_have_chflags="no"
12366fi
12367
12368fi
12369if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012370
Matthias Kloseb9621712010-04-24 17:59:49 +000012371$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012372
12373fi
12374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12376$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012381 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012382else
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012384/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012385
Christian Heimesd0764e22007-12-04 15:00:33 +000012386#include <sys/stat.h>
12387#include <unistd.h>
12388int main(int argc, char*argv[])
12389{
12390 if(lchflags(argv[0], 0) != 0)
12391 return 1;
12392 return 0;
12393}
Ned Deily3eb67d52011-06-28 00:00:28 -070012394
Christian Heimesd0764e22007-12-04 15:00:33 +000012395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012396if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012397 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012398else
Matthias Kloseb9621712010-04-24 17:59:49 +000012399 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12402 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012403fi
12404
12405
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12408$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012409if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012411if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012412 ac_cv_have_lchflags="yes"
12413else
12414 ac_cv_have_lchflags="no"
12415fi
12416
12417fi
12418if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012419
Matthias Kloseb9621712010-04-24 17:59:49 +000012420$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012421
12422fi
12423
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012424case $ac_sys_system/$ac_sys_release in
12425Darwin/*)
12426 _CUR_CFLAGS="${CFLAGS}"
12427 _CUR_LDFLAGS="${LDFLAGS}"
12428 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12429 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12430 ;;
12431esac
12432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12434$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012435if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012436 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012437else
12438 ac_check_lib_save_LIBS=$LIBS
12439LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012441/* end confdefs.h. */
12442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012443/* Override any GCC internal prototype to avoid an error.
12444 Use char because int might match the return type of a GCC
12445 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012446#ifdef __cplusplus
12447extern "C"
12448#endif
12449char inflateCopy ();
12450int
12451main ()
12452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012454 ;
12455 return 0;
12456}
12457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012459 ac_cv_lib_z_inflateCopy=yes
12460else
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012463rm -f core conftest.err conftest.$ac_objext \
12464 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012465LIBS=$ac_check_lib_save_LIBS
12466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12468$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012469if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012470
Matthias Kloseb9621712010-04-24 17:59:49 +000012471$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012472
12473fi
12474
12475
12476case $ac_sys_system/$ac_sys_release in
12477Darwin/*)
12478 CFLAGS="${_CUR_CFLAGS}"
12479 LDFLAGS="${_CUR_LDFLAGS}"
12480 ;;
12481esac
12482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12484$as_echo_n "checking for hstrerror... " >&6; }
12485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012486/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012487
Martin v. Löwise9416172003-05-03 10:12:45 +000012488#include <netdb.h>
12489
Martin v. Löwise9416172003-05-03 10:12:45 +000012490int
12491main ()
12492{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012493void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012494 ;
12495 return 0;
12496}
12497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012498if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012499
Matthias Kloseb9621712010-04-24 17:59:49 +000012500$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012501
Matthias Kloseb159a552010-04-25 21:00:44 +000012502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012503$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012504else
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12506$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012507
12508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012509rm -f core conftest.err conftest.$ac_objext \
12510 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511
Matthias Kloseb9621712010-04-24 17:59:49 +000012512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12513$as_echo_n "checking for inet_aton... " >&6; }
12514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012515/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012516
Martin v. Löwis86d66262006-02-17 08:40:11 +000012517#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012518#include <sys/socket.h>
12519#include <netinet/in.h>
12520#include <arpa/inet.h>
12521
Martin v. Löwise9416172003-05-03 10:12:45 +000012522int
12523main ()
12524{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012525void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012526 ;
12527 return 0;
12528}
12529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012533
Matthias Kloseb159a552010-04-25 21:00:44 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012535$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012536else
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12538$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012539
12540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012541rm -f core conftest.err conftest.$ac_objext \
12542 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543
Matthias Kloseb9621712010-04-24 17:59:49 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12545$as_echo_n "checking for inet_pton... " >&6; }
12546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012548
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012549#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012550#include <sys/socket.h>
12551#include <netinet/in.h>
12552#include <arpa/inet.h>
12553
Martin v. Löwise9416172003-05-03 10:12:45 +000012554int
12555main ()
12556{
12557void* p = inet_pton
12558 ;
12559 return 0;
12560}
12561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012563
Matthias Kloseb9621712010-04-24 17:59:49 +000012564$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012565
Matthias Kloseb159a552010-04-25 21:00:44 +000012566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012567$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012568else
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12570$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012571
12572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012574
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012575# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12577$as_echo_n "checking for setgroups... " >&6; }
12578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012579/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012580
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012581#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012582#ifdef HAVE_GRP_H
12583#include <grp.h>
12584#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012585
Martin v. Löwisd5843682002-11-21 20:41:28 +000012586int
12587main ()
12588{
12589void* p = setgroups
12590 ;
12591 return 0;
12592}
12593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012595
Matthias Kloseb9621712010-04-24 17:59:49 +000012596$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012597
Matthias Kloseb159a552010-04-25 21:00:44 +000012598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012599$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012600else
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012603
12604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012606
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012607# check for openpty and forkpty
12608
12609for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012610do :
12611 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012612if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012613 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012615_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012616
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012617else
Matthias Kloseb9621712010-04-24 17:59:49 +000012618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12619$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012620if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012622else
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012624LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628/* Override any GCC internal prototype to avoid an error.
12629 Use char because int might match the return type of a GCC
12630 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012631#ifdef __cplusplus
12632extern "C"
12633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012634char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012635int
12636main ()
12637{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012638return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012639 ;
12640 return 0;
12641}
12642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012643if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012645else
Matthias Kloseb9621712010-04-24 17:59:49 +000012646 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012648rm -f core conftest.err conftest.$ac_objext \
12649 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012650LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12653$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012654if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012656 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012657else
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12659$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012660if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012662else
12663 ac_check_lib_save_LIBS=$LIBS
12664LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012666/* end confdefs.h. */
12667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668/* Override any GCC internal prototype to avoid an error.
12669 Use char because int might match the return type of a GCC
12670 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012671#ifdef __cplusplus
12672extern "C"
12673#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012674char openpty ();
12675int
12676main ()
12677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012679 ;
12680 return 0;
12681}
12682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012684 ac_cv_lib_bsd_openpty=yes
12685else
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012688rm -f core conftest.err conftest.$ac_objext \
12689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012690LIBS=$ac_check_lib_save_LIBS
12691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12693$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012694if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012696 LIBS="$LIBS -lbsd"
12697fi
12698
12699
12700fi
12701
Fred Drake8cef4cf2000-06-28 16:40:38 +000012702
12703fi
12704done
12705
12706for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012707do :
12708 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012709if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012711#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012712_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012713
Fred Drake8cef4cf2000-06-28 16:40:38 +000012714else
Matthias Kloseb9621712010-04-24 17:59:49 +000012715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12716$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012717if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012719else
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012721LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725/* Override any GCC internal prototype to avoid an error.
12726 Use char because int might match the return type of a GCC
12727 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012728#ifdef __cplusplus
12729extern "C"
12730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012731char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012732int
12733main ()
12734{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012736 ;
12737 return 0;
12738}
12739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012740if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012742else
Matthias Kloseb9621712010-04-24 17:59:49 +000012743 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012745rm -f core conftest.err conftest.$ac_objext \
12746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012747LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12750$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012751if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012753 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012754else
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12756$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012757if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012759else
12760 ac_check_lib_save_LIBS=$LIBS
12761LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012763/* end confdefs.h. */
12764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765/* Override any GCC internal prototype to avoid an error.
12766 Use char because int might match the return type of a GCC
12767 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012768#ifdef __cplusplus
12769extern "C"
12770#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012771char forkpty ();
12772int
12773main ()
12774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012776 ;
12777 return 0;
12778}
12779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012780if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012781 ac_cv_lib_bsd_forkpty=yes
12782else
Matthias Kloseb9621712010-04-24 17:59:49 +000012783 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012785rm -f core conftest.err conftest.$ac_objext \
12786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012787LIBS=$ac_check_lib_save_LIBS
12788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12790$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012791if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012793 LIBS="$LIBS -lbsd"
12794fi
12795
12796
12797fi
12798
Fred Drake8cef4cf2000-06-28 16:40:38 +000012799
12800fi
12801done
12802
Jack Jansendd19cf82001-12-06 22:36:17 +000012803
Michael W. Hudson54241132001-12-07 15:38:26 +000012804# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012805for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012806do :
12807 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12808ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012809if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012811#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012812_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012813
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012814fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012815done
12816
Michael W. Hudson54241132001-12-07 15:38:26 +000012817
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012818ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012819if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012820 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012821
Martin v. Löwis1142de32002-03-29 16:28:31 +000012822else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012824 *" dup2.$ac_objext "* ) ;;
12825 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012827esac
12828
Martin v. Löwis1142de32002-03-29 16:28:31 +000012829fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012830
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012831ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012832if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012833 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12834
12835else
12836 case " $LIBOBJS " in
12837 *" strdup.$ac_objext "* ) ;;
12838 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12839 ;;
12840esac
12841
12842fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012843
12844
12845for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012846do :
12847 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012848if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012850#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012853/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012854#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012855int
12856main ()
12857{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012858getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 ;
12860 return 0;
12861}
12862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012866
Guido van Rossum627b2d71993-12-24 10:39:16 +000012867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012869
Guido van Rossum627b2d71993-12-24 10:39:16 +000012870fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012871done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012872
Jack Jansen150753c2003-03-29 22:07:47 +000012873for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012874do :
12875 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012876if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012877 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012878#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012881/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012882#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012883int
12884main ()
12885{
12886setpgrp(0,0);
12887 ;
12888 return 0;
12889}
12890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012894
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012897
12898fi
12899done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012900
Michael W. Hudson54241132001-12-07 15:38:26 +000012901
Gregory P. Smith387512c2018-12-30 15:42:32 -080012902# We search for both crypt and crypt_r as one or the other may be defined
12903# This gets us our -lcrypt in LIBS when required on the target platform.
12904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12905$as_echo_n "checking for library containing crypt... " >&6; }
12906if ${ac_cv_search_crypt+:} false; then :
12907 $as_echo_n "(cached) " >&6
12908else
12909 ac_func_search_save_LIBS=$LIBS
12910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12911/* end confdefs.h. */
12912
12913/* Override any GCC internal prototype to avoid an error.
12914 Use char because int might match the return type of a GCC
12915 builtin and then its argument prototype would still apply. */
12916#ifdef __cplusplus
12917extern "C"
12918#endif
12919char crypt ();
12920int
12921main ()
12922{
12923return crypt ();
12924 ;
12925 return 0;
12926}
12927_ACEOF
12928for ac_lib in '' crypt; do
12929 if test -z "$ac_lib"; then
12930 ac_res="none required"
12931 else
12932 ac_res=-l$ac_lib
12933 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12934 fi
12935 if ac_fn_c_try_link "$LINENO"; then :
12936 ac_cv_search_crypt=$ac_res
12937fi
12938rm -f core conftest.err conftest.$ac_objext \
12939 conftest$ac_exeext
12940 if ${ac_cv_search_crypt+:} false; then :
12941 break
12942fi
12943done
12944if ${ac_cv_search_crypt+:} false; then :
12945
12946else
12947 ac_cv_search_crypt=no
12948fi
12949rm conftest.$ac_ext
12950LIBS=$ac_func_search_save_LIBS
12951fi
12952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12953$as_echo "$ac_cv_search_crypt" >&6; }
12954ac_res=$ac_cv_search_crypt
12955if test "$ac_res" != no; then :
12956 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12957
12958fi
12959
12960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12961$as_echo_n "checking for library containing crypt_r... " >&6; }
12962if ${ac_cv_search_crypt_r+:} false; then :
12963 $as_echo_n "(cached) " >&6
12964else
12965 ac_func_search_save_LIBS=$LIBS
12966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12967/* end confdefs.h. */
12968
12969/* Override any GCC internal prototype to avoid an error.
12970 Use char because int might match the return type of a GCC
12971 builtin and then its argument prototype would still apply. */
12972#ifdef __cplusplus
12973extern "C"
12974#endif
12975char crypt_r ();
12976int
12977main ()
12978{
12979return crypt_r ();
12980 ;
12981 return 0;
12982}
12983_ACEOF
12984for ac_lib in '' crypt; do
12985 if test -z "$ac_lib"; then
12986 ac_res="none required"
12987 else
12988 ac_res=-l$ac_lib
12989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12990 fi
12991 if ac_fn_c_try_link "$LINENO"; then :
12992 ac_cv_search_crypt_r=$ac_res
12993fi
12994rm -f core conftest.err conftest.$ac_objext \
12995 conftest$ac_exeext
12996 if ${ac_cv_search_crypt_r+:} false; then :
12997 break
12998fi
12999done
13000if ${ac_cv_search_crypt_r+:} false; then :
13001
13002else
13003 ac_cv_search_crypt_r=no
13004fi
13005rm conftest.$ac_ext
13006LIBS=$ac_func_search_save_LIBS
13007fi
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13009$as_echo "$ac_cv_search_crypt_r" >&6; }
13010ac_res=$ac_cv_search_crypt_r
13011if test "$ac_res" != no; then :
13012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13013
13014fi
13015
13016
13017ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13018if test "x$ac_cv_func_crypt_r" = xyes; then :
13019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13020/* end confdefs.h. */
13021
13022#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13023#include <crypt.h>
13024
13025int
13026main ()
13027{
13028
13029struct crypt_data d;
13030char *r = crypt_r("", "", &d);
13031
13032 ;
13033 return 0;
13034}
13035_ACEOF
13036if ac_fn_c_try_compile "$LINENO"; then :
13037
13038$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13039
13040fi
13041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13042
13043fi
13044
13045
Victor Stinnere0be4232011-10-25 13:06:09 +020013046for ac_func in clock_gettime
13047do :
13048 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13049if test "x$ac_cv_func_clock_gettime" = xyes; then :
13050 cat >>confdefs.h <<_ACEOF
13051#define HAVE_CLOCK_GETTIME 1
13052_ACEOF
13053
13054else
13055
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13057$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13058if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13059 $as_echo_n "(cached) " >&6
13060else
13061 ac_check_lib_save_LIBS=$LIBS
13062LIBS="-lrt $LIBS"
13063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13064/* end confdefs.h. */
13065
13066/* Override any GCC internal prototype to avoid an error.
13067 Use char because int might match the return type of a GCC
13068 builtin and then its argument prototype would still apply. */
13069#ifdef __cplusplus
13070extern "C"
13071#endif
13072char clock_gettime ();
13073int
13074main ()
13075{
13076return clock_gettime ();
13077 ;
13078 return 0;
13079}
13080_ACEOF
13081if ac_fn_c_try_link "$LINENO"; then :
13082 ac_cv_lib_rt_clock_gettime=yes
13083else
13084 ac_cv_lib_rt_clock_gettime=no
13085fi
13086rm -f core conftest.err conftest.$ac_objext \
13087 conftest$ac_exeext conftest.$ac_ext
13088LIBS=$ac_check_lib_save_LIBS
13089fi
13090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13091$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13092if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13093
Victor Stinner7efb8332014-08-29 15:41:08 +020013094 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013095 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13096
13097
13098$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13099
13100
13101fi
13102
13103
13104fi
13105done
13106
13107
13108for ac_func in clock_getres
13109do :
13110 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13111if test "x$ac_cv_func_clock_getres" = xyes; then :
13112 cat >>confdefs.h <<_ACEOF
13113#define HAVE_CLOCK_GETRES 1
13114_ACEOF
13115
13116else
13117
13118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13119$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13120if ${ac_cv_lib_rt_clock_getres+:} false; then :
13121 $as_echo_n "(cached) " >&6
13122else
13123 ac_check_lib_save_LIBS=$LIBS
13124LIBS="-lrt $LIBS"
13125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13126/* end confdefs.h. */
13127
13128/* Override any GCC internal prototype to avoid an error.
13129 Use char because int might match the return type of a GCC
13130 builtin and then its argument prototype would still apply. */
13131#ifdef __cplusplus
13132extern "C"
13133#endif
13134char clock_getres ();
13135int
13136main ()
13137{
13138return clock_getres ();
13139 ;
13140 return 0;
13141}
13142_ACEOF
13143if ac_fn_c_try_link "$LINENO"; then :
13144 ac_cv_lib_rt_clock_getres=yes
13145else
13146 ac_cv_lib_rt_clock_getres=no
13147fi
13148rm -f core conftest.err conftest.$ac_objext \
13149 conftest$ac_exeext conftest.$ac_ext
13150LIBS=$ac_check_lib_save_LIBS
13151fi
13152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13153$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13154if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13155
13156 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13157
13158
13159fi
13160
13161
13162fi
13163done
13164
13165
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013166for ac_func in clock_settime
13167do :
13168 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13169if test "x$ac_cv_func_clock_settime" = xyes; then :
13170 cat >>confdefs.h <<_ACEOF
13171#define HAVE_CLOCK_SETTIME 1
13172_ACEOF
13173
13174else
13175
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13177$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13178if ${ac_cv_lib_rt_clock_settime+:} false; then :
13179 $as_echo_n "(cached) " >&6
13180else
13181 ac_check_lib_save_LIBS=$LIBS
13182LIBS="-lrt $LIBS"
13183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13184/* end confdefs.h. */
13185
13186/* Override any GCC internal prototype to avoid an error.
13187 Use char because int might match the return type of a GCC
13188 builtin and then its argument prototype would still apply. */
13189#ifdef __cplusplus
13190extern "C"
13191#endif
13192char clock_settime ();
13193int
13194main ()
13195{
13196return clock_settime ();
13197 ;
13198 return 0;
13199}
13200_ACEOF
13201if ac_fn_c_try_link "$LINENO"; then :
13202 ac_cv_lib_rt_clock_settime=yes
13203else
13204 ac_cv_lib_rt_clock_settime=no
13205fi
13206rm -f core conftest.err conftest.$ac_objext \
13207 conftest$ac_exeext conftest.$ac_ext
13208LIBS=$ac_check_lib_save_LIBS
13209fi
13210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13211$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13212if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13213
13214 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13215
13216
13217fi
13218
13219
13220fi
13221done
13222
13223
Matthias Kloseb9621712010-04-24 17:59:49 +000013224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13225$as_echo_n "checking for major... " >&6; }
13226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013227/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013228
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013229#if defined(MAJOR_IN_MKDEV)
13230#include <sys/mkdev.h>
13231#elif defined(MAJOR_IN_SYSMACROS)
13232#include <sys/sysmacros.h>
13233#else
13234#include <sys/types.h>
13235#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013236
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013237int
13238main ()
13239{
13240
13241 makedev(major(0),minor(0));
13242
13243 ;
13244 return 0;
13245}
13246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013247if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013248
13249
Matthias Kloseb9621712010-04-24 17:59:49 +000013250$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13253$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013254
13255else
Skip Montanaro6dead952003-09-25 14:50:04 +000013256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13258$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013259
13260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013261rm -f core conftest.err conftest.$ac_objext \
13262 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013263
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013264# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013265# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13267$as_echo_n "checking for getaddrinfo... " >&6; }
13268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013269/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013270
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013271#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013272#include <sys/socket.h>
13273#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013274#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275
Martin v. Löwis11437992002-04-12 09:54:03 +000013276int
13277main ()
13278{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013279getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013285 have_getaddrinfo=yes
13286else
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013289rm -f core conftest.err conftest.$ac_objext \
13290 conftest$ac_exeext conftest.$ac_ext
13291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13292$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013293if test $have_getaddrinfo = yes
13294then
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13296$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013297 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013299else
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013301
13302if test "${enable_ipv6+set}" = set; then
13303 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13304else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013305 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013306fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013309/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310
Stefan Krah19c21392012-11-22 23:47:32 +010013311#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013312#include <sys/types.h>
13313#include <netdb.h>
13314#include <string.h>
13315#include <sys/socket.h>
13316#include <netinet/in.h>
13317
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013318int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319{
13320 int passive, gaierr, inet4 = 0, inet6 = 0;
13321 struct addrinfo hints, *ai, *aitop;
13322 char straddr[INET6_ADDRSTRLEN], strport[16];
13323
13324 for (passive = 0; passive <= 1; passive++) {
13325 memset(&hints, 0, sizeof(hints));
13326 hints.ai_family = AF_UNSPEC;
13327 hints.ai_flags = passive ? AI_PASSIVE : 0;
13328 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013329 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013330 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13331 (void)gai_strerror(gaierr);
13332 goto bad;
13333 }
13334 for (ai = aitop; ai; ai = ai->ai_next) {
13335 if (ai->ai_addr == NULL ||
13336 ai->ai_addrlen == 0 ||
13337 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13338 straddr, sizeof(straddr), strport, sizeof(strport),
13339 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13340 goto bad;
13341 }
13342 switch (ai->ai_family) {
13343 case AF_INET:
13344 if (strcmp(strport, "54321") != 0) {
13345 goto bad;
13346 }
13347 if (passive) {
13348 if (strcmp(straddr, "0.0.0.0") != 0) {
13349 goto bad;
13350 }
13351 } else {
13352 if (strcmp(straddr, "127.0.0.1") != 0) {
13353 goto bad;
13354 }
13355 }
13356 inet4++;
13357 break;
13358 case AF_INET6:
13359 if (strcmp(strport, "54321") != 0) {
13360 goto bad;
13361 }
13362 if (passive) {
13363 if (strcmp(straddr, "::") != 0) {
13364 goto bad;
13365 }
13366 } else {
13367 if (strcmp(straddr, "::1") != 0) {
13368 goto bad;
13369 }
13370 }
13371 inet6++;
13372 break;
13373 case AF_UNSPEC:
13374 goto bad;
13375 break;
13376 default:
13377 /* another family support? */
13378 break;
13379 }
13380 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013381 freeaddrinfo(aitop);
13382 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013383 }
13384
13385 if (!(inet4 == 0 || inet4 == 2))
13386 goto bad;
13387 if (!(inet6 == 0 || inet6 == 2))
13388 goto bad;
13389
13390 if (aitop)
13391 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013392 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013393
13394 bad:
13395 if (aitop)
13396 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013397 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013398}
13399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013401if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013403else
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13407 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013409
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013410fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013411
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13415$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13416
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013417if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013418then
13419 if test $ipv6 = yes
13420 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013421 echo 'Fatal: You must get working getaddrinfo() function.'
13422 echo ' or you can specify "--disable-ipv6"'.
13423 exit 1
13424 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013425else
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013428
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013429fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013430
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013431for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013432do :
13433 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013434if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013435 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013436#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013437_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013438
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013439fi
13440done
13441
Michael W. Hudson54241132001-12-07 15:38:26 +000013442
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013443# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13445$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013446if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013450/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013451#include <sys/types.h>
13452#include <sys/time.h>
13453#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Martin v. Löwis11437992002-04-12 09:54:03 +000013455int
13456main ()
13457{
13458if ((struct tm *) 0)
13459return 0;
13460 ;
13461 return 0;
13462}
13463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013464if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013466else
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13472$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013473if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476
13477fi
13478
Matthias Kloseb9621712010-04-24 17:59:49 +000013479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13480$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013481if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013485/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486#include <sys/types.h>
13487#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013488
Martin v. Löwis11437992002-04-12 09:54:03 +000013489int
13490main ()
13491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013492struct tm tm;
13493 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 ;
13496 return 0;
13497}
13498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013499if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013500 ac_cv_struct_tm=time.h
13501else
Matthias Kloseb9621712010-04-24 17:59:49 +000013502 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13507$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013508if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013511
13512fi
13513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514ac_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 +000013515#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517"
Victor Stinnere0be4232011-10-25 13:06:09 +020013518if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
13520cat >>confdefs.h <<_ACEOF
13521#define HAVE_STRUCT_TM_TM_ZONE 1
13522_ACEOF
13523
13524
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013525fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013526
Martin v. Löwis11437992002-04-12 09:54:03 +000013527if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013530
13531else
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13533"
Victor Stinnere0be4232011-10-25 13:06:09 +020013534if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013535 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536else
Matthias Kloseb9621712010-04-24 17:59:49 +000013537 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013538fi
13539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013541#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013542_ACEOF
13543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13545$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013546if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548else
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013550/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013551#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013552#if !HAVE_DECL_TZNAME
13553extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Martin v. Löwis11437992002-04-12 09:54:03 +000013556int
13557main ()
13558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013559return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 ;
13561 return 0;
13562}
13563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013564if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565 ac_cv_var_tzname=yes
13566else
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013569rm -f core conftest.err conftest.$ac_objext \
13570 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13573$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013574 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013575
Matthias Kloseb9621712010-04-24 17:59:49 +000013576$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013577
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578 fi
13579fi
13580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581ac_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 +020013582if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
13584cat >>confdefs.h <<_ACEOF
13585#define HAVE_STRUCT_STAT_ST_RDEV 1
13586_ACEOF
13587
13588
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013589fi
13590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591ac_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 +020013592if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013593
Martin v. Löwis11437992002-04-12 09:54:03 +000013594cat >>confdefs.h <<_ACEOF
13595#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13596_ACEOF
13597
13598
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013599fi
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013602if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013603
13604cat >>confdefs.h <<_ACEOF
13605#define HAVE_STRUCT_STAT_ST_FLAGS 1
13606_ACEOF
13607
13608
13609fi
13610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611ac_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 +020013612if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013613
13614cat >>confdefs.h <<_ACEOF
13615#define HAVE_STRUCT_STAT_ST_GEN 1
13616_ACEOF
13617
13618
13619fi
13620
Matthias Kloseb9621712010-04-24 17:59:49 +000013621ac_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 +020013622if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013623
13624cat >>confdefs.h <<_ACEOF
13625#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13626_ACEOF
13627
13628
13629fi
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631ac_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 +020013632if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013633
Martin v. Löwis11437992002-04-12 09:54:03 +000013634cat >>confdefs.h <<_ACEOF
13635#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13636_ACEOF
13637
13638
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013639fi
13640
Stefan Krah267b6392016-04-26 01:09:18 +020013641ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13642 #include <sys/types.h>
13643 #include <pwd.h>
13644
13645"
13646if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13647
13648cat >>confdefs.h <<_ACEOF
13649#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13650_ACEOF
13651
13652
13653fi
13654ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13655 #include <sys/types.h>
13656 #include <pwd.h>
13657
13658"
13659if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13660
13661cat >>confdefs.h <<_ACEOF
13662#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13663_ACEOF
13664
13665
13666fi
13667
Zachary Ware6a6967e2016-10-01 00:47:27 -050013668# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13669ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13670"
13671if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13672
13673cat >>confdefs.h <<_ACEOF
13674#define HAVE_SIGINFO_T_SI_BAND 1
13675_ACEOF
13676
13677
13678fi
13679
Michael W. Hudson54241132001-12-07 15:38:26 +000013680
Matthias Kloseb9621712010-04-24 17:59:49 +000013681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13682$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013683if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685else
Matthias Kloseb159a552010-04-25 21:00:44 +000013686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013688/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013689#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013690int
13691main ()
13692{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013693return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 ;
13695 return 0;
13696}
13697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013699 ac_cv_header_time_altzone=yes
13700else
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013705fi
13706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13708$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013709if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
Matthias Kloseb9621712010-04-24 17:59:49 +000013711$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013712
13713fi
13714
Guido van Rossumda88dad1995-01-26 00:46:29 +000013715was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13717$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013719/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013720
13721#include <sys/types.h>
13722#include <sys/select.h>
13723#include <sys/time.h>
13724
Martin v. Löwis11437992002-04-12 09:54:03 +000013725int
13726main ()
13727{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728;
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ;
13730 return 0;
13731}
13732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013733if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013734
13735
Matthias Kloseb9621712010-04-24 17:59:49 +000013736$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013737
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013738 was_it_defined=yes
13739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13743$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13746$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013747if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013749else
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013751/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013752#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013753int
13754main ()
13755{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013756struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 ;
13758 return 0;
13759}
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013762 ac_cv_struct_addrinfo=yes
13763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13767fi
13768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13770$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013771if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013774
13775fi
13776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13778$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013779if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013781else
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013783/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013784
13785# include <sys/types.h>
13786# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013787int
13788main ()
13789{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013790struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 ;
13792 return 0;
13793}
13794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013795if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013796 ac_cv_struct_sockaddr_storage=yes
13797else
Matthias Kloseb9621712010-04-24 17:59:49 +000013798 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13801fi
13802
Matthias Kloseb9621712010-04-24 17:59:49 +000013803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13804$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013805if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013808
13809fi
13810
Christian Heimesdffa3942016-09-05 23:54:41 +020013811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13812$as_echo_n "checking for sockaddr_alg... " >&6; }
13813if ${ac_cv_struct_sockaddr_alg+:} false; then :
13814 $as_echo_n "(cached) " >&6
13815else
13816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13817/* end confdefs.h. */
13818
13819# include <sys/types.h>
13820# include <sys/socket.h>
13821# include <linux/if_alg.h>
13822int
13823main ()
13824{
13825struct sockaddr_alg s
13826 ;
13827 return 0;
13828}
13829_ACEOF
13830if ac_fn_c_try_compile "$LINENO"; then :
13831 ac_cv_struct_sockaddr_alg=yes
13832else
13833 ac_cv_struct_sockaddr_alg=no
13834fi
13835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13836fi
13837
13838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13839$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13840if test $ac_cv_struct_sockaddr_alg = yes; then
13841
13842$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13843
13844fi
13845
Guido van Rossum627b2d71993-12-24 10:39:16 +000013846# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13849$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013850if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013852else
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013855$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013856int
13857main ()
13858{
13859static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013860test_array [0] = 0;
13861return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
13863 ;
13864 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013865}
Martin v. Löwis11437992002-04-12 09:54:03 +000013866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013867if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013868 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013869else
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13875$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013876if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013878
13879fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013880
Matthias Kloseb9621712010-04-24 17:59:49 +000013881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13882$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013883if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013885else
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013887/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889int
13890main ()
13891{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013892
Martin v. Löwis11437992002-04-12 09:54:03 +000013893#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013894 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013895 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013896 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898 char const *const *pcpcc;
13899 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 /* NEC SVR4.0.2 mips cc rejects this. */
13901 struct point {int x, y;};
13902 static struct point const zero = {0,0};
13903 /* AIX XL C 1.02.0.0 rejects this.
13904 It does not let you subtract one const X* pointer from another in
13905 an arm of an if-expression whose if-part is not a constant
13906 expression */
13907 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013909 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910 ++pcpcc;
13911 ppc = (char**) pcpcc;
13912 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013913 { /* SCO 3.2v4 cc rejects this sort of thing. */
13914 char tx;
13915 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013917
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 }
13921 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13922 int x[] = {25, 17};
13923 const int *foo = &x[0];
13924 ++foo;
13925 }
13926 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13927 typedef const int *iptr;
13928 iptr p = 0;
13929 ++p;
13930 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013931 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013933 struct s { int j; const int *ap[3]; } bx;
13934 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 }
13936 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13937 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013941#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013942
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 ;
13944 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013945}
Martin v. Löwis11437992002-04-12 09:54:03 +000013946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013947if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013948 ac_cv_c_const=yes
13949else
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13955$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013956if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013959
13960fi
13961
Michael W. Hudson54241132001-12-07 15:38:26 +000013962
Guido van Rossumda88dad1995-01-26 00:46:29 +000013963works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13965$as_echo_n "checking for working signed char... " >&6; }
13966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013967/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013968
Martin v. Löwis11437992002-04-12 09:54:03 +000013969int
13970main ()
13971{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013973 ;
13974 return 0;
13975}
13976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013977if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013978 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013979else
Skip Montanaro6dead952003-09-25 14:50:04 +000013980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013982
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013983
Guido van Rossum7f43da71994-08-01 12:15:30 +000013984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13987$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013988
Guido van Rossumda88dad1995-01-26 00:46:29 +000013989have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13991$as_echo_n "checking for prototypes... " >&6; }
13992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013993/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013994int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013995int
13996main ()
13997{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013998return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013999 ;
14000 return 0;
14001}
14002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014004
Matthias Kloseb9621712010-04-24 17:59:49 +000014005$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
Matthias Kloseb159a552010-04-25 21:00:44 +000014007 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14011$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014012
Guido van Rossumda88dad1995-01-26 00:46:29 +000014013works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14015$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014017/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014018
14019#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014020int foo(int x, ...) {
14021 va_list va;
14022 va_start(va, x);
14023 va_arg(va, int);
14024 va_arg(va, char *);
14025 va_arg(va, double);
14026 return 0;
14027}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014028
Martin v. Löwis11437992002-04-12 09:54:03 +000014029int
14030main ()
14031{
Guido van Rossum90eea071996-08-30 20:58:57 +000014032return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 ;
14034 return 0;
14035}
14036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014038
14039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014041
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014042 works=yes
14043
Guido van Rossum627b2d71993-12-24 10:39:16 +000014044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14047$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014048
Martin v. Löwisd6320502004-08-12 13:45:08 +000014049# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14051$as_echo_n "checking for socketpair... " >&6; }
14052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014053/* end confdefs.h. */
14054
14055#include <sys/types.h>
14056#include <sys/socket.h>
14057
14058int
14059main ()
14060{
14061void *x=socketpair
14062 ;
14063 return 0;
14064}
14065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014069
Matthias Kloseb159a552010-04-25 21:00:44 +000014070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014071$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014072else
Matthias Kloseb9621712010-04-24 17:59:49 +000014073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14074$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014075
14076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014078
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014079# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14081$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014083/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014084#include <sys/types.h>
14085#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014086int
14087main ()
14088{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014089struct sockaddr x;
14090x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 ;
14092 return 0;
14093}
14094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014095if ac_fn_c_try_compile "$LINENO"; then :
14096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14097$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014098
Matthias Kloseb9621712010-04-24 17:59:49 +000014099$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014100
14101else
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14103$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014104
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014107
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014108# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014109
14110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014112if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014115
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14117$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014118 OLD_CFLAGS=$CFLAGS
14119 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014121/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014122
14123# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014124
Martin v. Löwis11437992002-04-12 09:54:03 +000014125int
14126main ()
14127{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014128
14129 char *name;
14130 struct hostent *he, *res;
14131 char buffer[2048];
14132 int buflen = 2048;
14133 int h_errnop;
14134
14135 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014136
14137 ;
14138 return 0;
14139}
14140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014141if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014144
Martin v. Löwis11437992002-04-12 09:54:03 +000014145
Matthias Kloseb9621712010-04-24 17:59:49 +000014146$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14149$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014150
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014151else
Skip Montanaro6dead952003-09-25 14:50:04 +000014152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14154$as_echo "no" >&6; }
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14156$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014158/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014159
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014160# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014161
Martin v. Löwis11437992002-04-12 09:54:03 +000014162int
14163main ()
14164{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014165
14166 char *name;
14167 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014168 char buffer[2048];
14169 int buflen = 2048;
14170 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014171
Matthias Kloseb159a552010-04-25 21:00:44 +000014172 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
14174 ;
14175 return 0;
14176}
14177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014181
Martin v. Löwis11437992002-04-12 09:54:03 +000014182
Matthias Kloseb159a552010-04-25 21:00:44 +000014183$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014184
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14186$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014188else
Skip Montanaro6dead952003-09-25 14:50:04 +000014189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14191$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14193$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14195/* end confdefs.h. */
14196
14197# include <netdb.h>
14198
14199int
14200main ()
14201{
14202
14203 char *name;
14204 struct hostent *he;
14205 struct hostent_data data;
14206
14207 (void) gethostbyname_r(name, he, &data);
14208
14209 ;
14210 return 0;
14211}
14212_ACEOF
14213if ac_fn_c_try_compile "$LINENO"; then :
14214
14215 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14216
14217
14218$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14219
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14221$as_echo "yes" >&6; }
14222
14223else
14224
14225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14226$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000014233
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014236 CFLAGS=$OLD_CFLAGS
14237
14238else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014239
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 for ac_func in gethostbyname
14241do :
14242 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014243if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014244 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014245#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014246_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014247
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014248fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014249done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014250
Michael W. Hudson54241132001-12-07 15:38:26 +000014251
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014252fi
14253
Michael W. Hudson54241132001-12-07 15:38:26 +000014254
14255
14256
14257
14258
14259
Guido van Rossum627b2d71993-12-24 10:39:16 +000014260# checks for system services
14261# (none yet)
14262
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014263# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014264ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014265if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014266
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014267else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14269$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014270if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014271 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014272else
Martin v. Löwis11437992002-04-12 09:54:03 +000014273 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014274LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278/* Override any GCC internal prototype to avoid an error.
14279 Use char because int might match the return type of a GCC
14280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014281#ifdef __cplusplus
14282extern "C"
14283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014284char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014285int
14286main ()
14287{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014289 ;
14290 return 0;
14291}
14292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014294 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014295else
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014298rm -f core conftest.err conftest.$ac_objext \
14299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014300LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14303$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014304if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014305 cat >>confdefs.h <<_ACEOF
14306#define HAVE_LIBIEEE 1
14307_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014308
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014309 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014310
Guido van Rossum627b2d71993-12-24 10:39:16 +000014311fi
14312
Michael W. Hudson54241132001-12-07 15:38:26 +000014313
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014314fi
14315
Michael W. Hudson54241132001-12-07 15:38:26 +000014316
Guido van Rossum7f43da71994-08-01 12:15:30 +000014317# check for --with-libm=...
14318
Guido van Rossum563e7081996-09-10 18:20:48 +000014319case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014320Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014321*) LIBM=-lm
14322esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14324$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014326# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014327if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014329if test "$withval" = no
14330then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14332$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014333elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014334then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14336$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014337else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014338fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014339else
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14341$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014342fi
14343
Guido van Rossum7f43da71994-08-01 12:15:30 +000014344
14345# check for --with-libc=...
14346
Matthias Kloseb9621712010-04-24 17:59:49 +000014347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14348$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014350# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014351if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014353if test "$withval" = no
14354then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14356$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014357elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014358then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14360$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014361else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014362fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014363else
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14365$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366fi
14367
Guido van Rossum7f43da71994-08-01 12:15:30 +000014368
Stefan Krah1919b7e2012-03-21 18:25:23 +010014369# **************************************
14370# * Check for gcc x64 inline assembler *
14371# **************************************
14372
14373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14374$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14376/* end confdefs.h. */
14377
14378int
14379main ()
14380{
14381
14382 __asm__ __volatile__ ("movq %rcx, %rax");
14383
14384 ;
14385 return 0;
14386}
14387_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014388if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014389 have_gcc_asm_for_x64=yes
14390else
14391 have_gcc_asm_for_x64=no
14392fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014393rm -f core conftest.err conftest.$ac_objext \
14394 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14396$as_echo "$have_gcc_asm_for_x64" >&6; }
14397if test "$have_gcc_asm_for_x64" = yes
14398then
14399
14400$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14401
14402fi
14403
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014404# **************************************************
14405# * Check for various properties of floating point *
14406# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014407
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14409$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14410if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014412else
14413
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014414
14415ax_cv_c_float_words_bigendian=unknown
14416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014417/* end confdefs.h. */
14418
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014419
14420double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14421
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014422
14423_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014424if ac_fn_c_try_compile "$LINENO"; then :
14425
14426
Arnon Yaari5dd83602020-04-01 18:19:09 +030014427if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014428 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014429fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014430if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014431 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14432 ax_cv_c_float_words_bigendian=no
14433 else
14434 ax_cv_c_float_words_bigendian=unknown
14435 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014436fi
14437
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014438
14439fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014441fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14443$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014444
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014445case $ax_cv_c_float_words_bigendian in
14446 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014447
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014448$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14449 ;;
14450 no)
14451 ;;
14452 *)
14453 as_fn_error $? "
14454
14455Unknown float word ordering. You need to manually preset
14456ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14457
14458 " "$LINENO" 5 ;;
14459esac
14460
14461
14462if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014463then
14464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014466
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014467elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014468then
14469
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014470$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14471
14472else
14473 # Some ARM platforms use a mixed-endian representation for doubles.
14474 # While Python doesn't currently have full support for these platforms
14475 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14476 # conversions work.
14477 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14478 # or little, then it must be this?
14479
Matthias Kloseb9621712010-04-24 17:59:49 +000014480$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014481
14482fi
14483
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014484# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014485# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014486# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014487# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014488# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014489# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014490
14491# This inline assembler syntax may also work for suncc and icc,
14492# so we try it on all platforms.
14493
Matthias Kloseb9621712010-04-24 17:59:49 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14495$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014497/* end confdefs.h. */
14498
14499int
14500main ()
14501{
14502
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014503 unsigned short cw;
14504 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14505 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014506
14507 ;
14508 return 0;
14509}
14510_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014511if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014512 have_gcc_asm_for_x87=yes
14513else
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014515fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014516rm -f core conftest.err conftest.$ac_objext \
14517 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14519$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014520if test "$have_gcc_asm_for_x87" = yes
14521then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014524
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014525fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014526
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14528$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14530/* end confdefs.h. */
14531
14532int
14533main ()
14534{
14535
14536 unsigned int fpcr;
14537 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14538 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14539
14540 ;
14541 return 0;
14542}
14543_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014544if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014545 have_gcc_asm_for_mc68881=yes
14546else
14547 have_gcc_asm_for_mc68881=no
14548fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014549rm -f core conftest.err conftest.$ac_objext \
14550 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14552$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14553if test "$have_gcc_asm_for_mc68881" = yes
14554then
14555
14556$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14557
14558fi
14559
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014560# Detect whether system arithmetic is subject to x87-style double
14561# rounding issues. The result of this test has little meaning on non
14562# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14563# mode is round-to-nearest and double rounding issues are present, and
14564# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14566$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014567# $BASECFLAGS may affect the result
14568ac_save_cc="$CC"
14569CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014570if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014571 ac_cv_x87_double_rounding=no
14572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014574/* end confdefs.h. */
14575
14576#include <stdlib.h>
14577#include <math.h>
14578int main() {
14579 volatile double x, y, z;
14580 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14581 x = 0.99999999999999989; /* 1-2**-53 */
14582 y = 1./x;
14583 if (y != 1.)
14584 exit(0);
14585 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14586 x = 1e16;
14587 y = 2.99999;
14588 z = x + y;
14589 if (z != 1e16+4.)
14590 exit(0);
14591 /* both tests show evidence of double rounding */
14592 exit(1);
14593}
14594
14595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014596if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014597 ac_cv_x87_double_rounding=no
14598else
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14602 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014603fi
14604
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014605CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14607$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014608if test "$ac_cv_x87_double_rounding" = yes
14609then
14610
Matthias Kloseb9621712010-04-24 17:59:49 +000014611$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014612
14613fi
14614
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014615# ************************************
14616# * Check for mathematical functions *
14617# ************************************
14618
14619LIBS_SAVE=$LIBS
14620LIBS="$LIBS $LIBM"
14621
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014622for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14623do :
14624 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14625ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014626if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014627 cat >>confdefs.h <<_ACEOF
14628#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14629_ACEOF
14630
14631fi
14632done
14633
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014634for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014635do :
14636 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14637ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014638if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014639 cat >>confdefs.h <<_ACEOF
14640#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14641_ACEOF
14642
14643fi
14644done
14645
14646ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14647"
Victor Stinnere0be4232011-10-25 13:06:09 +020014648if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014649 ac_have_decl=1
14650else
14651 ac_have_decl=0
14652fi
14653
14654cat >>confdefs.h <<_ACEOF
14655#define HAVE_DECL_ISINF $ac_have_decl
14656_ACEOF
14657ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14658"
Victor Stinnere0be4232011-10-25 13:06:09 +020014659if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014660 ac_have_decl=1
14661else
14662 ac_have_decl=0
14663fi
14664
14665cat >>confdefs.h <<_ACEOF
14666#define HAVE_DECL_ISNAN $ac_have_decl
14667_ACEOF
14668ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14669"
Victor Stinnere0be4232011-10-25 13:06:09 +020014670if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014671 ac_have_decl=1
14672else
14673 ac_have_decl=0
14674fi
14675
14676cat >>confdefs.h <<_ACEOF
14677#define HAVE_DECL_ISFINITE $ac_have_decl
14678_ACEOF
14679
14680
Mark Dickinsona614f042009-11-28 12:48:43 +000014681# For multiprocessing module, check that sem_open
14682# actually works. For FreeBSD versions <= 7.2,
14683# the kernel module that provides POSIX semaphores
14684# isn't loaded by default, so an attempt to call
14685# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14687$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014688if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014690else
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014692 ac_cv_posix_semaphores_enabled=yes
14693else
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014695/* end confdefs.h. */
14696
14697#include <unistd.h>
14698#include <fcntl.h>
14699#include <stdio.h>
14700#include <semaphore.h>
14701#include <sys/stat.h>
14702
14703int main(void) {
14704 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14705 if (a == SEM_FAILED) {
14706 perror("sem_open");
14707 return 1;
14708 }
14709 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014710 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014711 return 0;
14712}
14713
14714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014715if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014716 ac_cv_posix_semaphores_enabled=yes
14717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014722fi
14723
14724
Mark Dickinsona614f042009-11-28 12:48:43 +000014725fi
14726
Matthias Kloseb9621712010-04-24 17:59:49 +000014727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14728$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014729if test $ac_cv_posix_semaphores_enabled = no
14730then
14731
Matthias Kloseb9621712010-04-24 17:59:49 +000014732$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014733
14734fi
14735
Mark Dickinson10683072009-04-18 21:18:19 +000014736# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14738$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014739if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014741else
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014743 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014744else
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014746/* end confdefs.h. */
14747
14748#include <unistd.h>
14749#include <fcntl.h>
14750#include <stdio.h>
14751#include <semaphore.h>
14752#include <sys/stat.h>
14753
14754int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014755 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014756 int count;
14757 int res;
14758 if(a==SEM_FAILED){
14759 perror("sem_open");
14760 return 1;
14761
14762 }
14763 res = sem_getvalue(a, &count);
14764 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014765 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014766 return res==-1 ? 1 : 0;
14767}
14768
Mark Dickinson10683072009-04-18 21:18:19 +000014769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014770if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014771 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014772else
Matthias Kloseb9621712010-04-24 17:59:49 +000014773 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014777fi
14778
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014779
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014780fi
14781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14783$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014784if test $ac_cv_broken_sem_getvalue = yes
14785then
14786
Matthias Kloseb9621712010-04-24 17:59:49 +000014787$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014788
14789fi
14790
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014791ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14792"
14793if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14794 ac_have_decl=1
14795else
14796 ac_have_decl=0
14797fi
14798
14799cat >>confdefs.h <<_ACEOF
14800#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14801_ACEOF
14802ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14803"
14804if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14805 ac_have_decl=1
14806else
14807 ac_have_decl=0
14808fi
14809
14810cat >>confdefs.h <<_ACEOF
14811#define HAVE_DECL_RTLD_NOW $ac_have_decl
14812_ACEOF
14813ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14814"
14815if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14816 ac_have_decl=1
14817else
14818 ac_have_decl=0
14819fi
14820
14821cat >>confdefs.h <<_ACEOF
14822#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14823_ACEOF
14824ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14825"
14826if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14827 ac_have_decl=1
14828else
14829 ac_have_decl=0
14830fi
14831
14832cat >>confdefs.h <<_ACEOF
14833#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14834_ACEOF
14835ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14836"
14837if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14838 ac_have_decl=1
14839else
14840 ac_have_decl=0
14841fi
14842
14843cat >>confdefs.h <<_ACEOF
14844#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14845_ACEOF
14846ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14847"
14848if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14849 ac_have_decl=1
14850else
14851 ac_have_decl=0
14852fi
14853
14854cat >>confdefs.h <<_ACEOF
14855#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14856_ACEOF
14857ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14858"
14859if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14860 ac_have_decl=1
14861else
14862 ac_have_decl=0
14863fi
14864
14865cat >>confdefs.h <<_ACEOF
14866#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14867_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014868ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14869"
14870if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14871 ac_have_decl=1
14872else
14873 ac_have_decl=0
14874fi
14875
14876cat >>confdefs.h <<_ACEOF
14877#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14878_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014879
14880
Mark Dickinsonbd792642009-03-18 20:06:12 +000014881# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14883$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014884# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014885if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014886 enableval=$enable_big_digits; case $enable_big_digits in
14887yes)
14888 enable_big_digits=30 ;;
14889no)
14890 enable_big_digits=15 ;;
1489115|30)
14892 ;;
14893*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014894 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 +000014895esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14897$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014898
14899cat >>confdefs.h <<_ACEOF
14900#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14901_ACEOF
14902
14903
14904else
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14906$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014907fi
14908
14909
Guido van Rossumef2255b2000-03-10 22:30:29 +000014910# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014911ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014912if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014913
14914
Matthias Kloseb9621712010-04-24 17:59:49 +000014915$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014916
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014917 wchar_h="yes"
14918
Guido van Rossumef2255b2000-03-10 22:30:29 +000014919else
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014921
14922fi
14923
Michael W. Hudson54241132001-12-07 15:38:26 +000014924
Martin v. Löwis11437992002-04-12 09:54:03 +000014925
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014926# determine wchar_t size
14927if test "$wchar_h" = yes
14928then
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14931# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14932# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14934$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014935if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014937else
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14939"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Martin v. Löwis11437992002-04-12 09:54:03 +000014941else
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 if test "$ac_cv_type_wchar_t" = yes; then
14943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014945as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014946See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947 else
14948 ac_cv_sizeof_wchar_t=0
14949 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014951
Martin v. Löwis11437992002-04-12 09:54:03 +000014952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14954$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955
14956
14957
Martin v. Löwis11437992002-04-12 09:54:03 +000014958cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014959#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014960_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014961
Michael W. Hudson54241132001-12-07 15:38:26 +000014962
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014963fi
14964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14966$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014967have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014969/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014970
14971#include <tcl.h>
14972#if TCL_UTF_MAX != 6
14973# error "NOT UCS4_TCL"
14974#endif
14975int
14976main ()
14977{
14978
14979 ;
14980 return 0;
14981}
14982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014984
14985
Matthias Kloseb9621712010-04-24 17:59:49 +000014986$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014987
14988 have_ucs4_tcl=yes
14989
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14993$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014994
Skip Montanaro6dead952003-09-25 14:50:04 +000014995# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014996if test "$wchar_h" = yes
14997then
14998 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15000$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015001 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015003else
15004
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015006 ac_cv_wchar_t_signed=yes
15007else
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015009/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015010
15011 #include <wchar.h>
15012 int main()
15013 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015014 /* Success: exit code 0 */
15015 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015016 }
15017
15018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015019if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015020 ac_cv_wchar_t_signed=yes
15021else
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015026fi
15027
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015028fi
15029
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15031$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032fi
15033
Michael Osipov3738fad2018-08-24 18:17:19 +020015034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15035$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015036# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015037if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015038 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015039then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015040
Matthias Kloseb9621712010-04-24 17:59:49 +000015041$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015042
Michael Osipov3738fad2018-08-24 18:17:19 +020015043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15044$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015045else
Michael Osipov3738fad2018-08-24 18:17:19 +020015046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15047$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015048fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015049
15050# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15052$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015053if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015055else
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 ac_cv_c_bigendian=unknown
15057 # See if we're dealing with a universal compiler.
15058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15059/* end confdefs.h. */
15060#ifndef __APPLE_CC__
15061 not a universal capable compiler
15062 #endif
15063 typedef int dummy;
15064
Skip Montanaro6dead952003-09-25 14:50:04 +000015065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015066if ac_fn_c_try_compile "$LINENO"; then :
15067
15068 # Check for potential -arch flags. It is not universal unless
15069 # there are at least two -arch flags with different values.
15070 ac_arch=
15071 ac_prev=
15072 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15073 if test -n "$ac_prev"; then
15074 case $ac_word in
15075 i?86 | x86_64 | ppc | ppc64)
15076 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15077 ac_arch=$ac_word
15078 else
15079 ac_cv_c_bigendian=universal
15080 break
15081 fi
15082 ;;
15083 esac
15084 ac_prev=
15085 elif test "x$ac_word" = "x-arch"; then
15086 ac_prev=arch
15087 fi
15088 done
15089fi
15090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15091 if test $ac_cv_c_bigendian = unknown; then
15092 # See if sys/param.h defines the BYTE_ORDER macro.
15093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015094/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015095#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015097
Martin v. Löwis11437992002-04-12 09:54:03 +000015098int
15099main ()
15100{
Matthias Kloseb9621712010-04-24 17:59:49 +000015101#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15102 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15103 && LITTLE_ENDIAN)
15104 bogus endian macros
15105 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015106
15107 ;
15108 return 0;
15109}
15110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015111if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015112 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015114/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015115#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015117
Martin v. Löwis11437992002-04-12 09:54:03 +000015118int
15119main ()
15120{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015121#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 not big endian
15123 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015124
15125 ;
15126 return 0;
15127}
15128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015129if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015130 ac_cv_c_bigendian=yes
15131else
Matthias Kloseb9621712010-04-24 17:59:49 +000015132 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015135fi
15136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15137 fi
15138 if test $ac_cv_c_bigendian = unknown; then
15139 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015141/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015142#include <limits.h>
15143
Martin v. Löwis11437992002-04-12 09:54:03 +000015144int
15145main ()
15146{
Matthias Kloseb9621712010-04-24 17:59:49 +000015147#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15148 bogus endian macros
15149 #endif
15150
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 ;
15152 return 0;
15153}
15154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015155if ac_fn_c_try_compile "$LINENO"; then :
15156 # It does; now see whether it defined to _BIG_ENDIAN or not.
15157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15158/* end confdefs.h. */
15159#include <limits.h>
15160
15161int
15162main ()
15163{
15164#ifndef _BIG_ENDIAN
15165 not big endian
15166 #endif
15167
15168 ;
15169 return 0;
15170}
15171_ACEOF
15172if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015174else
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15178fi
15179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15180 fi
15181 if test $ac_cv_c_bigendian = unknown; then
15182 # Compile a test program.
15183 if test "$cross_compiling" = yes; then :
15184 # Try to guess by grepping values from an object file.
15185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15186/* end confdefs.h. */
15187short int ascii_mm[] =
15188 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15189 short int ascii_ii[] =
15190 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15191 int use_ascii (int i) {
15192 return ascii_mm[i] + ascii_ii[i];
15193 }
15194 short int ebcdic_ii[] =
15195 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15196 short int ebcdic_mm[] =
15197 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15198 int use_ebcdic (int i) {
15199 return ebcdic_mm[i] + ebcdic_ii[i];
15200 }
15201 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203int
15204main ()
15205{
15206return use_ascii (foo) == use_ebcdic (foo);
15207 ;
15208 return 0;
15209}
15210_ACEOF
15211if ac_fn_c_try_compile "$LINENO"; then :
15212 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15213 ac_cv_c_bigendian=yes
15214 fi
15215 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15216 if test "$ac_cv_c_bigendian" = unknown; then
15217 ac_cv_c_bigendian=no
15218 else
15219 # finding both strings is unlikely to happen, but who knows?
15220 ac_cv_c_bigendian=unknown
15221 fi
15222 fi
15223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015225else
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015227/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015229int
15230main ()
15231{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232
Matthias Kloseb9621712010-04-24 17:59:49 +000015233 /* Are we little or big endian? From Harbison&Steele. */
15234 union
15235 {
15236 long int l;
15237 char c[sizeof (long int)];
15238 } u;
15239 u.l = 1;
15240 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241
15242 ;
15243 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015244}
Martin v. Löwis11437992002-04-12 09:54:03 +000015245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015246if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015247 ac_cv_c_bigendian=no
15248else
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15258$as_echo "$ac_cv_c_bigendian" >&6; }
15259 case $ac_cv_c_bigendian in #(
15260 yes)
15261 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15262;; #(
15263 no)
15264 ;; #(
15265 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015268
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 ;; #(
15270 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015271 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015272 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015274
Michael W. Hudson54241132001-12-07 15:38:26 +000015275
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015276# ABI version string for Python extension modules. This appears between the
15277# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15278# from the following attributes which affect the ABI of this Python build (in
15279# this order):
15280#
15281# * The Python implementation (always 'cpython-' for us)
15282# * The major and minor version numbers
15283# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015284#
15285# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015286# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15287# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015288#
15289# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15290# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015291
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15293$as_echo_n "checking ABIFLAGS... " >&6; }
15294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15295$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15297$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015298SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15300$as_echo "$SOABI" >&6; }
15301
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015302# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15303if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015304 # Similar to SOABI but remove "d" flag from ABIFLAGS
15305
15306 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15307
15308cat >>confdefs.h <<_ACEOF
15309#define ALT_SOABI "${ALT_SOABI}"
15310_ACEOF
15311
15312fi
15313
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015314
15315case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015316 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015317 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15318 *)
15319 EXT_SUFFIX=${SHLIB_SUFFIX};;
15320esac
15321
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15323$as_echo_n "checking LDVERSION... " >&6; }
15324LDVERSION='$(VERSION)$(ABIFLAGS)'
15325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15326$as_echo "$LDVERSION" >&6; }
15327
E. M. Brayc994c8f2019-05-24 17:33:47 +020015328# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015329
E. M. Brayb1fc4172019-05-24 18:39:39 +020015330if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015331 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015332else
15333 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015334fi
15335
doko@python.org87421192013-01-26 11:39:31 +010015336
Victor Stinner8510f432020-03-10 09:53:09 +010015337# Check for --with-libdir-name
15338# /usr/$LIDIRNAME/python$VERSION
15339
15340PLATLIBDIR="lib"
15341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15342$as_echo_n "checking for --with-platlibdir... " >&6; }
15343
15344# Check whether --with-platlibdir was given.
15345if test "${with_platlibdir+set}" = set; then :
15346 withval=$with_platlibdir;
15347# ignore 3 options:
15348# --with-platlibdir
15349# --with-platlibdir=
15350# --without-platlibdir
15351if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15352then
15353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15354$as_echo "yes" >&6; }
15355 PLATLIBDIR="$withval"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015356else
Victor Stinner8510f432020-03-10 09:53:09 +010015357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15358$as_echo "no" >&6; }
15359fi
15360else
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15362$as_echo "no" >&6; }
15363fi
15364
15365
15366
15367
15368if test x$PLATFORM_TRIPLET = x; then
15369 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15370else
15371 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015372fi
doko@python.org87421192013-01-26 11:39:31 +010015373
15374
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015375# Check whether right shifting a negative integer extends the sign bit
15376# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15378$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015379if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015381else
Martin v. Löwis11437992002-04-12 09:54:03 +000015382
Matthias Kloseb9621712010-04-24 17:59:49 +000015383if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015384 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015385else
Matthias Kloseb9621712010-04-24 17:59:49 +000015386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015387/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015388
15389int main()
15390{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015391 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015392}
15393
Martin v. Löwis11437992002-04-12 09:54:03 +000015394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015395if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015396 ac_cv_rshift_extends_sign=yes
15397else
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15401 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015402fi
15403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015404fi
15405
Matthias Kloseb9621712010-04-24 17:59:49 +000015406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15407$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015408if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015409then
Martin v. Löwis11437992002-04-12 09:54:03 +000015410
Matthias Kloseb9621712010-04-24 17:59:49 +000015411$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015412
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015413fi
15414
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015415# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15417$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015418if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015420else
Martin v. Löwis11437992002-04-12 09:54:03 +000015421
Matthias Kloseb9621712010-04-24 17:59:49 +000015422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015423/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015424#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015425int
15426main ()
15427{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015428
15429 FILE *f = fopen("/dev/null", "r");
15430 flockfile(f);
15431 getc_unlocked(f);
15432 funlockfile(f);
15433
Martin v. Löwis11437992002-04-12 09:54:03 +000015434 ;
15435 return 0;
15436}
15437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015438if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015439 ac_cv_have_getc_unlocked=yes
15440else
Matthias Kloseb9621712010-04-24 17:59:49 +000015441 ac_cv_have_getc_unlocked=no
15442fi
15443rm -f core conftest.err conftest.$ac_objext \
15444 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446
Matthias Kloseb9621712010-04-24 17:59:49 +000015447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15448$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015449if test "$ac_cv_have_getc_unlocked" = yes
15450then
Martin v. Löwis11437992002-04-12 09:54:03 +000015451
Matthias Kloseb9621712010-04-24 17:59:49 +000015452$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015453
15454fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015455
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015456# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015457# save the value of LIBS so we don't actually link Python with readline
15458LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015459
Gregory P. Smith18820942008-09-07 06:24:49 +000015460# On some systems we need to link readline to a termcap compatible
15461# library. NOTE: Keep the precedence of listed libraries synchronised
15462# with setup.py.
15463py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15465$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015466for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015467 if test -z "$py_libtermcap"; then
15468 READLINE_LIBS="-lreadline"
15469 else
15470 READLINE_LIBS="-lreadline -l$py_libtermcap"
15471 fi
15472 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015474/* end confdefs.h. */
15475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476/* Override any GCC internal prototype to avoid an error.
15477 Use char because int might match the return type of a GCC
15478 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015479#ifdef __cplusplus
15480extern "C"
15481#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015482char readline ();
15483int
15484main ()
15485{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015487 ;
15488 return 0;
15489}
15490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015491if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015492 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015494rm -f core conftest.err conftest.$ac_objext \
15495 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015496 if test $py_cv_lib_readline = yes; then
15497 break
15498 fi
15499done
15500# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15501#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015502if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15504$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015505else
Matthias Kloseb9621712010-04-24 17:59:49 +000015506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15507$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015508
Matthias Kloseb9621712010-04-24 17:59:49 +000015509$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015510
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015511fi
15512
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015513# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015515/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015516#include <readline/readline.h>
15517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015518if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015519 have_readline=yes
15520else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015521 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015522
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015523fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015524rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015525if test $have_readline = yes
15526then
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015528/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015529#include <readline/readline.h>
15530
15531_ACEOF
15532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015533 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015536
15537fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015538rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015541/* end confdefs.h. */
15542#include <readline/readline.h>
15543
15544_ACEOF
15545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015547
Matthias Kloseb9621712010-04-24 17:59:49 +000015548$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015549
15550fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015551rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015552
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015553fi
15554
Martin v. Löwis0daad592001-09-30 21:09:59 +000015555# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15557$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015558if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015560else
Martin v. Löwis11437992002-04-12 09:54:03 +000015561 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015562LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015566/* Override any GCC internal prototype to avoid an error.
15567 Use char because int might match the return type of a GCC
15568 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015569#ifdef __cplusplus
15570extern "C"
15571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015572char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015573int
15574main ()
15575{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015576return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015577 ;
15578 return 0;
15579}
15580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015581if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015583else
Matthias Kloseb9621712010-04-24 17:59:49 +000015584 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015586rm -f core conftest.err conftest.$ac_objext \
15587 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015588LIBS=$ac_check_lib_save_LIBS
15589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15591$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015592if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015593
Matthias Kloseb9621712010-04-24 17:59:49 +000015594$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015595
Martin v. Löwis0daad592001-09-30 21:09:59 +000015596fi
15597
Michael W. Hudson54241132001-12-07 15:38:26 +000015598
Thomas Wouters89d996e2007-09-08 17:39:28 +000015599# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15601$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015602if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015604else
15605 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015606LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015608/* end confdefs.h. */
15609
15610/* Override any GCC internal prototype to avoid an error.
15611 Use char because int might match the return type of a GCC
15612 builtin and then its argument prototype would still apply. */
15613#ifdef __cplusplus
15614extern "C"
15615#endif
15616char rl_completion_display_matches_hook ();
15617int
15618main ()
15619{
15620return rl_completion_display_matches_hook ();
15621 ;
15622 return 0;
15623}
15624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015625if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015626 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15627else
Matthias Kloseb9621712010-04-24 17:59:49 +000015628 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015630rm -f core conftest.err conftest.$ac_objext \
15631 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015632LIBS=$ac_check_lib_save_LIBS
15633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15635$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015636if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015639
15640fi
15641
15642
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015643# also in 4.0, but not in editline
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15645$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15646if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15647 $as_echo_n "(cached) " >&6
15648else
15649 ac_check_lib_save_LIBS=$LIBS
15650LIBS="-lreadline $READLINE_LIBS $LIBS"
15651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15652/* end confdefs.h. */
15653
15654/* Override any GCC internal prototype to avoid an error.
15655 Use char because int might match the return type of a GCC
15656 builtin and then its argument prototype would still apply. */
15657#ifdef __cplusplus
15658extern "C"
15659#endif
15660char rl_resize_terminal ();
15661int
15662main ()
15663{
15664return rl_resize_terminal ();
15665 ;
15666 return 0;
15667}
15668_ACEOF
15669if ac_fn_c_try_link "$LINENO"; then :
15670 ac_cv_lib_readline_rl_resize_terminal=yes
15671else
15672 ac_cv_lib_readline_rl_resize_terminal=no
15673fi
15674rm -f core conftest.err conftest.$ac_objext \
15675 conftest$ac_exeext conftest.$ac_ext
15676LIBS=$ac_check_lib_save_LIBS
15677fi
15678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15679$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15680if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15681
15682$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15683
15684fi
15685
15686
Martin v. Löwis0daad592001-09-30 21:09:59 +000015687# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15689$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015690if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015692else
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015694LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015698/* Override any GCC internal prototype to avoid an error.
15699 Use char because int might match the return type of a GCC
15700 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015701#ifdef __cplusplus
15702extern "C"
15703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015704char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015705int
15706main ()
15707{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015709 ;
15710 return 0;
15711}
15712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015713if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015715else
Matthias Kloseb9621712010-04-24 17:59:49 +000015716 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015718rm -f core conftest.err conftest.$ac_objext \
15719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015720LIBS=$ac_check_lib_save_LIBS
15721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15723$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015724if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015727
Guido van Rossum353ae582001-07-10 16:45:32 +000015728fi
15729
Jack Jansendd19cf82001-12-06 22:36:17 +000015730
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015731# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015733/* end confdefs.h. */
15734#include <readline/readline.h>
15735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015736if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015737 have_readline=yes
15738else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015739 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015740
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015741fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015742rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015743if test $have_readline = yes
15744then
Matthias Kloseb9621712010-04-24 17:59:49 +000015745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015746/* end confdefs.h. */
15747#include <readline/readline.h>
15748
15749_ACEOF
15750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015752
Matthias Kloseb9621712010-04-24 17:59:49 +000015753$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015754
15755fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015756rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015757
15758fi
15759
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15761$as_echo_n "checking for append_history in -lreadline... " >&6; }
15762if ${ac_cv_lib_readline_append_history+:} false; then :
15763 $as_echo_n "(cached) " >&6
15764else
15765 ac_check_lib_save_LIBS=$LIBS
15766LIBS="-lreadline $READLINE_LIBS $LIBS"
15767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15768/* end confdefs.h. */
15769
15770/* Override any GCC internal prototype to avoid an error.
15771 Use char because int might match the return type of a GCC
15772 builtin and then its argument prototype would still apply. */
15773#ifdef __cplusplus
15774extern "C"
15775#endif
15776char append_history ();
15777int
15778main ()
15779{
15780return append_history ();
15781 ;
15782 return 0;
15783}
15784_ACEOF
15785if ac_fn_c_try_link "$LINENO"; then :
15786 ac_cv_lib_readline_append_history=yes
15787else
15788 ac_cv_lib_readline_append_history=no
15789fi
15790rm -f core conftest.err conftest.$ac_objext \
15791 conftest$ac_exeext conftest.$ac_ext
15792LIBS=$ac_check_lib_save_LIBS
15793fi
15794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15795$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15796if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15797
15798$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15799
15800fi
15801
15802
Martin v. Löwis82bca632006-02-10 20:49:30 +000015803# End of readline checks: restore LIBS
15804LIBS=$LIBS_no_readline
15805
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15807$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015808if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015810else
Martin v. Löwis11437992002-04-12 09:54:03 +000015811
Matthias Kloseb9621712010-04-24 17:59:49 +000015812if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015813 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015814else
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015816/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015817
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015818#include <stdlib.h>
15819#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015820int main()
15821{
15822 int val1 = nice(1);
15823 if (val1 != -1 && val1 == nice(2))
15824 exit(0);
15825 exit(1);
15826}
15827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015829if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015830 ac_cv_broken_nice=yes
15831else
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015836fi
15837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838fi
15839
Matthias Kloseb9621712010-04-24 17:59:49 +000015840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15841$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015842if test "$ac_cv_broken_nice" = yes
15843then
Martin v. Löwis11437992002-04-12 09:54:03 +000015844
Matthias Kloseb9621712010-04-24 17:59:49 +000015845$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015846
15847fi
15848
Matthias Kloseb9621712010-04-24 17:59:49 +000015849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15850$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015851if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015852 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015853else
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015855 ac_cv_broken_poll=no
15856else
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015858/* end confdefs.h. */
15859
15860#include <poll.h>
15861
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015862int main()
15863{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015864 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015865 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015866
15867 close (42);
15868
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015869 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015870 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015871 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015872 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015873 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015874 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015875 return 1;
15876}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015877
15878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015879if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015880 ac_cv_broken_poll=yes
15881else
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015887
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015888fi
15889
Matthias Kloseb9621712010-04-24 17:59:49 +000015890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15891$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015892if test "$ac_cv_broken_poll" = yes
15893then
15894
Matthias Kloseb9621712010-04-24 17:59:49 +000015895$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015896
15897fi
15898
Martin v. Löwis1d459062005-03-14 21:23:33 +000015899# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15901$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015902if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015903 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015904else
15905
Matthias Kloseb9621712010-04-24 17:59:49 +000015906if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015907 ac_cv_working_tzset=no
15908else
Matthias Kloseb9621712010-04-24 17:59:49 +000015909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015910/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015911
15912#include <stdlib.h>
15913#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015914#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015915
15916#if HAVE_TZNAME
15917extern char *tzname[];
15918#endif
15919
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015920int main()
15921{
Brett Cannon18367812003-09-19 00:59:16 +000015922 /* Note that we need to ensure that not only does tzset(3)
15923 do 'something' with localtime, but it works as documented
15924 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015925 This includes making sure that tzname is set properly if
15926 tm->tm_zone does not exist since it is the alternative way
15927 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015928
15929 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015930 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015931 */
15932
Martin v. Löwis1d459062005-03-14 21:23:33 +000015933 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015934 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15935
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015936 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015937 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015938 if (localtime(&groundhogday)->tm_hour != 0)
15939 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015940#if HAVE_TZNAME
15941 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15942 if (strcmp(tzname[0], "UTC") ||
15943 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15944 exit(1);
15945#endif
Brett Cannon18367812003-09-19 00:59:16 +000015946
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015947 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015948 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015949 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015950 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015951#if HAVE_TZNAME
15952 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15953 exit(1);
15954#endif
Brett Cannon18367812003-09-19 00:59:16 +000015955
15956 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15957 tzset();
15958 if (localtime(&groundhogday)->tm_hour != 11)
15959 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015960#if HAVE_TZNAME
15961 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15962 exit(1);
15963#endif
15964
15965#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015966 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15967 exit(1);
15968 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15969 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015970#endif
Brett Cannon18367812003-09-19 00:59:16 +000015971
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015972 exit(0);
15973}
15974
15975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015976if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015977 ac_cv_working_tzset=yes
15978else
Matthias Kloseb9621712010-04-24 17:59:49 +000015979 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015983fi
15984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015985fi
15986
Matthias Kloseb9621712010-04-24 17:59:49 +000015987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15988$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015989if test "$ac_cv_working_tzset" = yes
15990then
15991
Matthias Kloseb9621712010-04-24 17:59:49 +000015992$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015993
15994fi
15995
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015996# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15998$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015999if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016000 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016001else
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016003/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016004#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016005int
16006main ()
16007{
16008
16009struct stat st;
16010st.st_mtim.tv_nsec = 1;
16011
16012 ;
16013 return 0;
16014}
16015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016016if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016017 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016018else
Matthias Kloseb9621712010-04-24 17:59:49 +000016019 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16022fi
16023
Matthias Kloseb9621712010-04-24 17:59:49 +000016024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16025$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016026if test "$ac_cv_stat_tv_nsec" = yes
16027then
16028
Matthias Kloseb9621712010-04-24 17:59:49 +000016029$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016030
16031fi
16032
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016033# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16035$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016036if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016037 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016038else
Matthias Kloseb9621712010-04-24 17:59:49 +000016039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016040/* end confdefs.h. */
16041#include <sys/stat.h>
16042int
16043main ()
16044{
16045
16046struct stat st;
16047st.st_mtimespec.tv_nsec = 1;
16048
16049 ;
16050 return 0;
16051}
16052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016054 ac_cv_stat_tv_nsec2=yes
16055else
Matthias Kloseb9621712010-04-24 17:59:49 +000016056 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16059fi
16060
Matthias Kloseb9621712010-04-24 17:59:49 +000016061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16062$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016063if test "$ac_cv_stat_tv_nsec2" = yes
16064then
16065
Matthias Kloseb9621712010-04-24 17:59:49 +000016066$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016067
16068fi
16069
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016070# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016071ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016072if test "$cross_compiling" = no; then
16073 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16074fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016075
16076for ac_header in curses.h ncurses.h
16077do :
16078 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16079ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16080if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16081 cat >>confdefs.h <<_ACEOF
16082#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16083_ACEOF
16084
16085fi
16086
16087done
16088
16089
16090# On Solaris, term.h requires curses.h
16091for ac_header in term.h
16092do :
16093 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16094#ifdef HAVE_CURSES_H
16095#include <curses.h>
16096#endif
16097
16098"
16099if test "x$ac_cv_header_term_h" = xyes; then :
16100 cat >>confdefs.h <<_ACEOF
16101#define HAVE_TERM_H 1
16102_ACEOF
16103
16104fi
16105
16106done
16107
16108
Jack Jansen666b1e72001-10-31 12:11:48 +000016109# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16111$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016112if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016113 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016114else
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016116/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016117#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016118int
16119main ()
16120{
Jack Jansen666b1e72001-10-31 12:11:48 +000016121
16122 int rtn;
16123 rtn = mvwdelch(0,0,0);
16124
Martin v. Löwis11437992002-04-12 09:54:03 +000016125 ;
16126 return 0;
16127}
16128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016129if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016130 ac_cv_mvwdelch_is_expression=yes
16131else
Matthias Kloseb9621712010-04-24 17:59:49 +000016132 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16135fi
16136
Matthias Kloseb9621712010-04-24 17:59:49 +000016137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16138$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016139
16140if test "$ac_cv_mvwdelch_is_expression" = yes
16141then
Martin v. Löwis11437992002-04-12 09:54:03 +000016142
Matthias Kloseb9621712010-04-24 17:59:49 +000016143$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016144
16145fi
16146
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016147# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16148# structs since version 5.7. If the macro is defined as zero before including
16149# [n]curses.h, ncurses will expose fields of the structs regardless of the
16150# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16152$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016153if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016154 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016155else
Matthias Kloseb9621712010-04-24 17:59:49 +000016156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016157/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016158
16159 #define NCURSES_OPAQUE 0
16160 #include <curses.h>
16161
Martin v. Löwis11437992002-04-12 09:54:03 +000016162int
16163main ()
16164{
Jack Jansen666b1e72001-10-31 12:11:48 +000016165
16166 WINDOW *w;
16167 w->_flags = 0;
16168
Martin v. Löwis11437992002-04-12 09:54:03 +000016169 ;
16170 return 0;
16171}
16172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016173if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016174 ac_cv_window_has_flags=yes
16175else
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16179fi
16180
Matthias Kloseb9621712010-04-24 17:59:49 +000016181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16182$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016183
Jack Jansen666b1e72001-10-31 12:11:48 +000016184
16185if test "$ac_cv_window_has_flags" = yes
16186then
Martin v. Löwis11437992002-04-12 09:54:03 +000016187
Matthias Kloseb9621712010-04-24 17:59:49 +000016188$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016189
16190fi
16191
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16193$as_echo_n "checking for is_pad... " >&6; }
16194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16195/* end confdefs.h. */
16196#include <curses.h>
16197int
16198main ()
16199{
16200
16201#ifndef is_pad
16202void *x=is_pad
16203#endif
16204
16205 ;
16206 return 0;
16207}
16208_ACEOF
16209if ac_fn_c_try_compile "$LINENO"; then :
16210
16211$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16212
16213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16214$as_echo "yes" >&6; }
16215else
16216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16217$as_echo "no" >&6; }
16218
16219fi
16220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16221
Matthias Kloseb9621712010-04-24 17:59:49 +000016222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16223$as_echo_n "checking for is_term_resized... " >&6; }
16224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016225/* end confdefs.h. */
16226#include <curses.h>
16227int
16228main ()
16229{
16230void *x=is_term_resized
16231 ;
16232 return 0;
16233}
16234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016236
Matthias Kloseb9621712010-04-24 17:59:49 +000016237$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016238
Matthias Kloseb159a552010-04-25 21:00:44 +000016239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016240$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016241else
Matthias Kloseb9621712010-04-24 17:59:49 +000016242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16243$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016244
16245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16249$as_echo_n "checking for resize_term... " >&6; }
16250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016251/* end confdefs.h. */
16252#include <curses.h>
16253int
16254main ()
16255{
16256void *x=resize_term
16257 ;
16258 return 0;
16259}
16260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016261if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016262
Matthias Kloseb9621712010-04-24 17:59:49 +000016263$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016264
Matthias Kloseb159a552010-04-25 21:00:44 +000016265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016266$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016267else
Matthias Kloseb9621712010-04-24 17:59:49 +000016268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16269$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016270
16271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16273
Matthias Kloseb9621712010-04-24 17:59:49 +000016274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16275$as_echo_n "checking for resizeterm... " >&6; }
16276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016277/* end confdefs.h. */
16278#include <curses.h>
16279int
16280main ()
16281{
16282void *x=resizeterm
16283 ;
16284 return 0;
16285}
16286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016287if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016288
Matthias Kloseb9621712010-04-24 17:59:49 +000016289$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016290
Matthias Kloseb159a552010-04-25 21:00:44 +000016291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016292$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016293else
Matthias Kloseb9621712010-04-24 17:59:49 +000016294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16295$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016296
16297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016299
16300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16301$as_echo_n "checking for immedok... " >&6; }
16302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16303/* end confdefs.h. */
16304#include <curses.h>
16305int
16306main ()
16307{
16308
16309#ifndef immedok
16310void *x=immedok
16311#endif
16312
16313 ;
16314 return 0;
16315}
16316_ACEOF
16317if ac_fn_c_try_compile "$LINENO"; then :
16318
16319$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16320
16321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16322$as_echo "yes" >&6; }
16323else
16324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16325$as_echo "no" >&6; }
16326
16327fi
16328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16329
16330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16331$as_echo_n "checking for syncok... " >&6; }
16332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16333/* end confdefs.h. */
16334#include <curses.h>
16335int
16336main ()
16337{
16338
16339#ifndef syncok
16340void *x=syncok
16341#endif
16342
16343 ;
16344 return 0;
16345}
16346_ACEOF
16347if ac_fn_c_try_compile "$LINENO"; then :
16348
16349$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16350
16351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16352$as_echo "yes" >&6; }
16353else
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16355$as_echo "no" >&6; }
16356
16357fi
16358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16359
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16361$as_echo_n "checking for wchgat... " >&6; }
16362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16363/* end confdefs.h. */
16364#include <curses.h>
16365int
16366main ()
16367{
16368
16369#ifndef wchgat
16370void *x=wchgat
16371#endif
16372
16373 ;
16374 return 0;
16375}
16376_ACEOF
16377if ac_fn_c_try_compile "$LINENO"; then :
16378
16379$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16380
16381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16382$as_echo "yes" >&6; }
16383else
16384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16385$as_echo "no" >&6; }
16386
16387fi
16388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16389
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16391$as_echo_n "checking for filter... " >&6; }
16392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16393/* end confdefs.h. */
16394#include <curses.h>
16395int
16396main ()
16397{
16398
16399#ifndef filter
16400void *x=filter
16401#endif
16402
16403 ;
16404 return 0;
16405}
16406_ACEOF
16407if ac_fn_c_try_compile "$LINENO"; then :
16408
16409$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16410
16411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16412$as_echo "yes" >&6; }
16413else
16414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16415$as_echo "no" >&6; }
16416
16417fi
16418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16419
16420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16421$as_echo_n "checking for has_key... " >&6; }
16422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16423/* end confdefs.h. */
16424#include <curses.h>
16425int
16426main ()
16427{
16428
16429#ifndef has_key
16430void *x=has_key
16431#endif
16432
16433 ;
16434 return 0;
16435}
16436_ACEOF
16437if ac_fn_c_try_compile "$LINENO"; then :
16438
16439$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16440
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16442$as_echo "yes" >&6; }
16443else
16444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16445$as_echo "no" >&6; }
16446
16447fi
16448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16449
16450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16451$as_echo_n "checking for typeahead... " >&6; }
16452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16453/* end confdefs.h. */
16454#include <curses.h>
16455int
16456main ()
16457{
16458
16459#ifndef typeahead
16460void *x=typeahead
16461#endif
16462
16463 ;
16464 return 0;
16465}
16466_ACEOF
16467if ac_fn_c_try_compile "$LINENO"; then :
16468
16469$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16470
16471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16472$as_echo "yes" >&6; }
16473else
16474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16475$as_echo "no" >&6; }
16476
16477fi
16478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16479
16480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16481$as_echo_n "checking for use_env... " >&6; }
16482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16483/* end confdefs.h. */
16484#include <curses.h>
16485int
16486main ()
16487{
16488
16489#ifndef use_env
16490void *x=use_env
16491#endif
16492
16493 ;
16494 return 0;
16495}
16496_ACEOF
16497if ac_fn_c_try_compile "$LINENO"; then :
16498
16499$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16500
16501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16502$as_echo "yes" >&6; }
16503else
16504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16505$as_echo "no" >&6; }
16506
16507fi
16508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016509# last curses configure check
16510CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16513$as_echo "$as_me: checking for device files" >&6;}
16514
16515if test "x$cross_compiling" = xyes; then
16516 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16518$as_echo_n "checking for /dev/ptmx... " >&6; }
16519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16520$as_echo "not set" >&6; }
16521 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16522 fi
16523 if test "${ac_cv_file__dev_ptc+set}" != set; then
16524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16525$as_echo_n "checking for /dev/ptc... " >&6; }
16526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16527$as_echo "not set" >&6; }
16528 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16529 fi
16530fi
16531
Matthias Kloseb9621712010-04-24 17:59:49 +000016532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16533$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016534if ${ac_cv_file__dev_ptmx+:} false; then :
16535 $as_echo_n "(cached) " >&6
16536else
16537 test "$cross_compiling" = yes &&
16538 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16539if test -r "/dev/ptmx"; then
16540 ac_cv_file__dev_ptmx=yes
16541else
16542 ac_cv_file__dev_ptmx=no
16543fi
16544fi
16545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16546$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16547if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016548
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016549fi
16550
16551if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016552
Matthias Kloseb9621712010-04-24 17:59:49 +000016553$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016554
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16557$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016558if ${ac_cv_file__dev_ptc+:} false; then :
16559 $as_echo_n "(cached) " >&6
16560else
16561 test "$cross_compiling" = yes &&
16562 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16563if test -r "/dev/ptc"; then
16564 ac_cv_file__dev_ptc=yes
16565else
16566 ac_cv_file__dev_ptc=no
16567fi
16568fi
16569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16570$as_echo "$ac_cv_file__dev_ptc" >&6; }
16571if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016572
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016573fi
16574
16575if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016576
Matthias Kloseb9621712010-04-24 17:59:49 +000016577$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016578
Neal Norwitz865400f2003-03-21 01:42:58 +000016579fi
16580
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016581if test $ac_sys_system = Darwin
16582then
16583 LIBS="$LIBS -framework CoreFoundation"
16584fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016585
Matthias Kloseb9621712010-04-24 17:59:49 +000016586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16587$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016588if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016589 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016590else
Matthias Kloseb9621712010-04-24 17:59:49 +000016591 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016592 ac_cv_have_size_t_format="cross -- assuming yes"
16593
Thomas Wouters477c8d52006-05-27 19:21:47 +000016594else
Matthias Kloseb9621712010-04-24 17:59:49 +000016595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016596/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016597
Thomas Wouters477c8d52006-05-27 19:21:47 +000016598#include <stdio.h>
16599#include <stddef.h>
16600#include <string.h>
16601
Christian Heimes2c181612007-12-17 20:04:13 +000016602#ifdef HAVE_SYS_TYPES_H
16603#include <sys/types.h>
16604#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016605
16606#ifdef HAVE_SSIZE_T
16607typedef ssize_t Py_ssize_t;
16608#elif SIZEOF_VOID_P == SIZEOF_LONG
16609typedef long Py_ssize_t;
16610#else
16611typedef int Py_ssize_t;
16612#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016613
Christian Heimes2c181612007-12-17 20:04:13 +000016614int main()
16615{
16616 char buffer[256];
16617
Thomas Wouters477c8d52006-05-27 19:21:47 +000016618 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16619 return 1;
16620
Thomas Wouters89f507f2006-12-13 04:49:30 +000016621 if (strcmp(buffer, "123"))
16622 return 1;
16623
16624 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16625 return 1;
16626
16627 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016628 return 1;
16629
16630 return 0;
16631}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016632
Thomas Wouters477c8d52006-05-27 19:21:47 +000016633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016634if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016635 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016636else
Matthias Kloseb9621712010-04-24 17:59:49 +000016637 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16640 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016641fi
16642
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16645$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016646if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016647
Matthias Kloseb9621712010-04-24 17:59:49 +000016648$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016649
16650fi
16651
Matthias Kloseb9621712010-04-24 17:59:49 +000016652ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016653#ifdef HAVE_SYS_TYPES_H
16654#include <sys/types.h>
16655#endif
16656#ifdef HAVE_SYS_SOCKET_H
16657#include <sys/socket.h>
16658#endif
16659
Matthias Kloseb9621712010-04-24 17:59:49 +000016660"
Victor Stinnere0be4232011-10-25 13:06:09 +020016661if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016662
Martin v. Löwis11437992002-04-12 09:54:03 +000016663else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016664
Matthias Kloseb9621712010-04-24 17:59:49 +000016665$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016666
16667fi
16668
Michael W. Hudson54241132001-12-07 15:38:26 +000016669
Matthias Kloseb9621712010-04-24 17:59:49 +000016670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16671$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016672if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016673 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016674else
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016676 ac_cv_broken_mbstowcs=no
16677else
Matthias Kloseb9621712010-04-24 17:59:49 +000016678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016679/* end confdefs.h. */
16680
Stefan Krah19c21392012-11-22 23:47:32 +010016681#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016682#include<stdlib.h>
16683int main() {
16684 size_t len = -1;
16685 const char *str = "text";
16686 len = mbstowcs(NULL, str, 0);
16687 return (len != 4);
16688}
16689
16690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016691if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016692 ac_cv_broken_mbstowcs=no
16693else
Matthias Kloseb9621712010-04-24 17:59:49 +000016694 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016698fi
16699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016700fi
16701
Matthias Kloseb9621712010-04-24 17:59:49 +000016702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16703$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016704if test "$ac_cv_broken_mbstowcs" = yes
16705then
16706
Matthias Kloseb9621712010-04-24 17:59:49 +000016707$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016708
16709fi
16710
Antoine Pitroub52ec782009-01-25 16:34:23 +000016711# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16713$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016714
16715# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016716if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016717 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016718if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016719then
16720
Matthias Kloseb9621712010-04-24 17:59:49 +000016721$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016722
Matthias Kloseb9621712010-04-24 17:59:49 +000016723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16724$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016725fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016726if test "$withval" = no
16727then
16728
16729$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16730
Matthias Kloseb9621712010-04-24 17:59:49 +000016731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16732$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016733fi
16734
Antoine Pitrou042b1282010-08-13 21:15:58 +000016735else
16736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16737$as_echo "no value specified" >&6; }
16738fi
16739
Antoine Pitroub52ec782009-01-25 16:34:23 +000016740
Matthias Kloseb17289e2012-03-15 19:51:34 +010016741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16742$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16743if ${ac_cv_computed_gotos+:} false; then :
16744 $as_echo_n "(cached) " >&6
16745else
16746 if test "$cross_compiling" = yes; then :
16747 if test "${with_computed_gotos+set}" = set; then
16748 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16749 else
16750 ac_cv_computed_gotos=no
16751 fi
16752else
16753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16754/* end confdefs.h. */
16755
16756int main(int argc, char **argv)
16757{
16758 static void *targets[1] = { &&LABEL1 };
16759 goto LABEL2;
16760LABEL1:
16761 return 0;
16762LABEL2:
16763 goto *targets[0];
16764 return 1;
16765}
16766
16767_ACEOF
16768if ac_fn_c_try_run "$LINENO"; then :
16769 ac_cv_computed_gotos=yes
16770else
16771 ac_cv_computed_gotos=no
16772fi
16773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16774 conftest.$ac_objext conftest.beam conftest.$ac_ext
16775fi
16776
16777fi
16778
16779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16780$as_echo "$ac_cv_computed_gotos" >&6; }
16781case "$ac_cv_computed_gotos" in yes*)
16782
16783$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16784
16785esac
16786
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016787case $ac_sys_system in
16788AIX*)
16789
16790$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16791 ;;
16792esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016793
Michael W. Hudson54241132001-12-07 15:38:26 +000016794
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016795
16796
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016797for h in `(cd $srcdir;echo Python/thread_*.h)`
16798do
16799 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16800done
16801
Michael W. Hudson54241132001-12-07 15:38:26 +000016802
Pablo Galindoa25f3c42020-04-23 01:38:11 +010016803SRCDIRS="Parser Parser/pegen Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16805$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016806for dir in $SRCDIRS; do
16807 if test ! -d $dir; then
16808 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016809 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016810done
Matthias Kloseb9621712010-04-24 17:59:49 +000016811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16812$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016813
Stefan Krah1919b7e2012-03-21 18:25:23 +010016814# Availability of -O2:
16815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16816$as_echo_n "checking for -O2... " >&6; }
16817saved_cflags="$CFLAGS"
16818CFLAGS="-O2"
16819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16820/* end confdefs.h. */
16821
16822int
16823main ()
16824{
16825
16826
16827 ;
16828 return 0;
16829}
16830_ACEOF
16831if ac_fn_c_try_compile "$LINENO"; then :
16832 have_O2=yes
16833else
16834 have_O2=no
16835fi
16836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16838$as_echo "$have_O2" >&6; }
16839CFLAGS="$saved_cflags"
16840
16841# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16842# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16844$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16845saved_cflags="$CFLAGS"
16846CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16847if test "$have_O2" = no; then
16848 CFLAGS=""
16849fi
16850if test "$cross_compiling" = yes; then :
16851 have_glibc_memmove_bug=undefined
16852else
16853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16854/* end confdefs.h. */
16855
16856#include <stdio.h>
16857#include <stdlib.h>
16858#include <string.h>
16859void foo(void *p, void *q) { memmove(p, q, 19); }
16860int main() {
16861 char a[32] = "123456789000000000";
16862 foo(&a[9], a);
16863 if (strcmp(a, "123456789123456789000000000") != 0)
16864 return 1;
16865 foo(a, &a[9]);
16866 if (strcmp(a, "123456789000000000") != 0)
16867 return 1;
16868 return 0;
16869}
16870
16871_ACEOF
16872if ac_fn_c_try_run "$LINENO"; then :
16873 have_glibc_memmove_bug=no
16874else
16875 have_glibc_memmove_bug=yes
16876fi
16877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16878 conftest.$ac_objext conftest.beam conftest.$ac_ext
16879fi
16880
16881CFLAGS="$saved_cflags"
16882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16883$as_echo "$have_glibc_memmove_bug" >&6; }
16884if test "$have_glibc_memmove_bug" = yes; then
16885
16886$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16887
16888fi
16889
16890if test "$have_gcc_asm_for_x87" = yes; then
16891 # Some versions of gcc miscompile inline asm:
16892 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16893 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16894 case $CC in
16895 *gcc*)
16896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16897$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16898 saved_cflags="$CFLAGS"
16899 CFLAGS="-O2"
16900 if test "$cross_compiling" = yes; then :
16901 have_ipa_pure_const_bug=undefined
16902else
16903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16904/* end confdefs.h. */
16905
16906 __attribute__((noinline)) int
16907 foo(int *p) {
16908 int r;
16909 asm ( "movl \$6, (%1)\n\t"
16910 "xorl %0, %0\n\t"
16911 : "=r" (r) : "r" (p) : "memory"
16912 );
16913 return r;
16914 }
16915 int main() {
16916 int p = 8;
16917 if ((foo(&p) ? : p) != 6)
16918 return 1;
16919 return 0;
16920 }
16921
16922_ACEOF
16923if ac_fn_c_try_run "$LINENO"; then :
16924 have_ipa_pure_const_bug=no
16925else
16926 have_ipa_pure_const_bug=yes
16927fi
16928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16929 conftest.$ac_objext conftest.beam conftest.$ac_ext
16930fi
16931
16932 CFLAGS="$saved_cflags"
16933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16934$as_echo "$have_ipa_pure_const_bug" >&6; }
16935 if test "$have_ipa_pure_const_bug" = yes; then
16936
16937$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16938
16939 fi
16940 ;;
16941 esac
16942fi
16943
Victor Stinner4f5366e2015-01-09 02:13:19 +010016944# Check for stdatomic.h
16945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16946$as_echo_n "checking for stdatomic.h... " >&6; }
16947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16948/* end confdefs.h. */
16949
16950
16951 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016952 atomic_int int_var;
16953 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016954 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016955 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16956 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16957 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016958 return 0;
16959 }
16960
16961
16962_ACEOF
16963if ac_fn_c_try_link "$LINENO"; then :
16964 have_stdatomic_h=yes
16965else
16966 have_stdatomic_h=no
16967fi
16968rm -f core conftest.err conftest.$ac_objext \
16969 conftest$ac_exeext conftest.$ac_ext
16970
16971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16972$as_echo "$have_stdatomic_h" >&6; }
16973
16974if test "$have_stdatomic_h" = yes; then
16975
16976$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16977
16978fi
16979
16980# Check for GCC >= 4.7 __atomic builtins
16981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16982$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16984/* end confdefs.h. */
16985
16986
16987 volatile int val = 1;
16988 int main() {
16989 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16990 return 0;
16991 }
16992
16993
16994_ACEOF
16995if ac_fn_c_try_link "$LINENO"; then :
16996 have_builtin_atomic=yes
16997else
16998 have_builtin_atomic=no
16999fi
17000rm -f core conftest.err conftest.$ac_objext \
17001 conftest$ac_exeext conftest.$ac_ext
17002
17003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17004$as_echo "$have_builtin_atomic" >&6; }
17005
17006if test "$have_builtin_atomic" = yes; then
17007
17008$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17009
17010fi
17011
Ned Deily322f5ba2013-11-21 23:01:59 -080017012# ensurepip option
17013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17014$as_echo_n "checking for ensurepip... " >&6; }
17015
17016# Check whether --with-ensurepip was given.
17017if test "${with_ensurepip+set}" = set; then :
17018 withval=$with_ensurepip;
17019else
17020 with_ensurepip=upgrade
17021fi
17022
17023case $with_ensurepip in #(
17024 yes|upgrade) :
17025 ENSUREPIP=upgrade ;; #(
17026 install) :
17027 ENSUREPIP=install ;; #(
17028 no) :
17029 ENSUREPIP=no ;; #(
17030 *) :
17031 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17032esac
17033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17034$as_echo "$ENSUREPIP" >&6; }
17035
17036
Victor Stinner35a97c02015-03-08 02:59:09 +010017037# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17039$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17041/* end confdefs.h. */
17042
17043
17044 #include <dirent.h>
17045
17046 int main() {
17047 struct dirent entry;
17048 return entry.d_type == DT_UNKNOWN;
17049 }
17050
17051
17052_ACEOF
17053if ac_fn_c_try_link "$LINENO"; then :
17054 have_dirent_d_type=yes
17055else
17056 have_dirent_d_type=no
17057fi
17058rm -f core conftest.err conftest.$ac_objext \
17059 conftest$ac_exeext conftest.$ac_ext
17060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17061$as_echo "$have_dirent_d_type" >&6; }
17062
17063if test "$have_dirent_d_type" = yes; then
17064
17065$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17066
17067fi
17068
Victor Stinner9eb57c52015-03-19 22:21:49 +010017069# check if the Linux getrandom() syscall is available
17070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17071$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17073/* end confdefs.h. */
17074
17075
Victor Stinner1b80b242016-04-12 22:34:58 +020017076 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017077 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017078 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017079
17080 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017081 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017082 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017083 const int flags = GRND_NONBLOCK;
17084 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017085 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017086 return 0;
17087 }
17088
17089
17090_ACEOF
17091if ac_fn_c_try_link "$LINENO"; then :
17092 have_getrandom_syscall=yes
17093else
17094 have_getrandom_syscall=no
17095fi
17096rm -f core conftest.err conftest.$ac_objext \
17097 conftest$ac_exeext conftest.$ac_ext
17098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17099$as_echo "$have_getrandom_syscall" >&6; }
17100
17101if test "$have_getrandom_syscall" = yes; then
17102
17103$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17104
17105fi
17106
Victor Stinner3abf44e2015-09-18 15:38:37 +020017107# check if the getrandom() function is available
17108# the test was written for the Solaris function of <sys/random.h>
17109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17110$as_echo_n "checking for the getrandom() function... " >&6; }
17111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17112/* end confdefs.h. */
17113
17114
17115 #include <sys/random.h>
17116
17117 int main() {
17118 char buffer[1];
17119 const size_t buflen = sizeof(buffer);
17120 const int flags = 0;
17121 /* ignore the result, Python checks for ENOSYS at runtime */
17122 (void)getrandom(buffer, buflen, flags);
17123 return 0;
17124 }
17125
17126
17127_ACEOF
17128if ac_fn_c_try_link "$LINENO"; then :
17129 have_getrandom=yes
17130else
17131 have_getrandom=no
17132fi
17133rm -f core conftest.err conftest.$ac_objext \
17134 conftest$ac_exeext conftest.$ac_ext
17135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17136$as_echo "$have_getrandom" >&6; }
17137
17138if test "$have_getrandom" = yes; then
17139
17140$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17141
17142fi
17143
Neil Schemenauer5741c452019-02-08 10:48:46 -080017144# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17145# shm_* may only be available if linking against librt
17146save_LIBS="$LIBS"
17147save_includes_default="$ac_includes_default"
17148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17149$as_echo_n "checking for library containing shm_open... " >&6; }
17150if ${ac_cv_search_shm_open+:} false; then :
17151 $as_echo_n "(cached) " >&6
17152else
17153 ac_func_search_save_LIBS=$LIBS
17154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17155/* end confdefs.h. */
17156
17157/* Override any GCC internal prototype to avoid an error.
17158 Use char because int might match the return type of a GCC
17159 builtin and then its argument prototype would still apply. */
17160#ifdef __cplusplus
17161extern "C"
17162#endif
17163char shm_open ();
17164int
17165main ()
17166{
17167return shm_open ();
17168 ;
17169 return 0;
17170}
17171_ACEOF
17172for ac_lib in '' rt; do
17173 if test -z "$ac_lib"; then
17174 ac_res="none required"
17175 else
17176 ac_res=-l$ac_lib
17177 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17178 fi
17179 if ac_fn_c_try_link "$LINENO"; then :
17180 ac_cv_search_shm_open=$ac_res
17181fi
17182rm -f core conftest.err conftest.$ac_objext \
17183 conftest$ac_exeext
17184 if ${ac_cv_search_shm_open+:} false; then :
17185 break
17186fi
17187done
17188if ${ac_cv_search_shm_open+:} false; then :
17189
17190else
17191 ac_cv_search_shm_open=no
17192fi
17193rm conftest.$ac_ext
17194LIBS=$ac_func_search_save_LIBS
17195fi
17196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17197$as_echo "$ac_cv_search_shm_open" >&6; }
17198ac_res=$ac_cv_search_shm_open
17199if test "$ac_res" != no; then :
17200 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17201
17202fi
17203
17204if test "$ac_cv_search_shm_open" = "-lrt"; then
17205
17206$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17207
17208fi
17209for ac_header in sys/mman.h
17210do :
17211 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17212if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17213 cat >>confdefs.h <<_ACEOF
17214#define HAVE_SYS_MMAN_H 1
17215_ACEOF
17216
17217fi
17218
17219done
17220
17221# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17222ac_includes_default="\
17223${ac_includes_default}
17224#ifndef __cplusplus
17225# ifdef HAVE_SYS_MMAN_H
17226# include <sys/mman.h>
17227# endif
17228#endif
17229"
17230for ac_func in shm_open shm_unlink
17231do :
17232 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17233ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17234if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17235 cat >>confdefs.h <<_ACEOF
17236#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17237_ACEOF
17238
17239fi
17240done
17241
17242# we don't want to link with librt always, restore LIBS
17243LIBS="$save_LIBS"
17244ac_includes_default="$save_includes_default"
17245
Christian Heimesff5be6e2018-01-20 13:19:21 +010017246# Check for usable OpenSSL
17247
17248 found=false
17249
17250# Check whether --with-openssl was given.
17251if test "${with_openssl+set}" = set; then :
17252 withval=$with_openssl;
17253 case "$withval" in
17254 "" | y | ye | yes | n | no)
17255 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17256 ;;
17257 *) ssldirs="$withval"
17258 ;;
17259 esac
17260
17261else
17262
17263 # if pkg-config is installed and openssl has installed a .pc file,
17264 # then use that information and don't search ssldirs
17265 if test -n "$ac_tool_prefix"; then
17266 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17267set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17269$as_echo_n "checking for $ac_word... " >&6; }
17270if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17271 $as_echo_n "(cached) " >&6
17272else
17273 if test -n "$PKG_CONFIG"; then
17274 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17275else
17276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17277for as_dir in $PATH
17278do
17279 IFS=$as_save_IFS
17280 test -z "$as_dir" && as_dir=.
17281 for ac_exec_ext in '' $ac_executable_extensions; do
17282 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17283 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17285 break 2
17286 fi
17287done
17288 done
17289IFS=$as_save_IFS
17290
17291fi
17292fi
17293PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17294if test -n "$PKG_CONFIG"; then
17295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17296$as_echo "$PKG_CONFIG" >&6; }
17297else
17298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17299$as_echo "no" >&6; }
17300fi
17301
17302
17303fi
17304if test -z "$ac_cv_prog_PKG_CONFIG"; then
17305 ac_ct_PKG_CONFIG=$PKG_CONFIG
17306 # Extract the first word of "pkg-config", so it can be a program name with args.
17307set dummy pkg-config; ac_word=$2
17308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17309$as_echo_n "checking for $ac_word... " >&6; }
17310if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17311 $as_echo_n "(cached) " >&6
17312else
17313 if test -n "$ac_ct_PKG_CONFIG"; then
17314 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17315else
17316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17317for as_dir in $PATH
17318do
17319 IFS=$as_save_IFS
17320 test -z "$as_dir" && as_dir=.
17321 for ac_exec_ext in '' $ac_executable_extensions; do
17322 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17323 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17325 break 2
17326 fi
17327done
17328 done
17329IFS=$as_save_IFS
17330
17331fi
17332fi
17333ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17334if test -n "$ac_ct_PKG_CONFIG"; then
17335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17336$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17337else
17338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17339$as_echo "no" >&6; }
17340fi
17341
17342 if test "x$ac_ct_PKG_CONFIG" = x; then
17343 PKG_CONFIG=""
17344 else
17345 case $cross_compiling:$ac_tool_warned in
17346yes:)
17347{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17348$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17349ac_tool_warned=yes ;;
17350esac
17351 PKG_CONFIG=$ac_ct_PKG_CONFIG
17352 fi
17353else
17354 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17355fi
17356
17357 if test x"$PKG_CONFIG" != x""; then
17358 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17359 if test $? = 0; then
17360 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17361 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17362 found=true
17363 fi
17364 fi
17365
17366 # no such luck; use some default ssldirs
17367 if ! $found; then
17368 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17369 fi
17370
17371
17372fi
17373
17374
17375
17376 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17377 # an 'openssl' subdirectory
17378
17379 if ! $found; then
17380 OPENSSL_INCLUDES=
17381 for ssldir in $ssldirs; do
17382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17383$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17384 if test -f "$ssldir/include/openssl/ssl.h"; then
17385 OPENSSL_INCLUDES="-I$ssldir/include"
17386 OPENSSL_LDFLAGS="-L$ssldir/lib"
17387 OPENSSL_LIBS="-lssl -lcrypto"
17388 found=true
17389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17390$as_echo "yes" >&6; }
17391 break
17392 else
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17394$as_echo "no" >&6; }
17395 fi
17396 done
17397
17398 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17399 # it will just work!
17400 fi
17401
17402 # try the preprocessor and linker with our new flags,
17403 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17404
17405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17406$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17407 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17408 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17409
17410 save_LIBS="$LIBS"
17411 save_LDFLAGS="$LDFLAGS"
17412 save_CPPFLAGS="$CPPFLAGS"
17413 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17414 LIBS="$OPENSSL_LIBS $LIBS"
17415 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17417/* end confdefs.h. */
17418#include <openssl/ssl.h>
17419int
17420main ()
17421{
17422SSL_new(NULL)
17423 ;
17424 return 0;
17425}
17426_ACEOF
17427if ac_fn_c_try_link "$LINENO"; then :
17428
17429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17430$as_echo "yes" >&6; }
17431 have_openssl=yes
17432
17433else
17434
17435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17436$as_echo "no" >&6; }
17437 have_openssl=no
17438
17439fi
17440rm -f core conftest.err conftest.$ac_objext \
17441 conftest$ac_exeext conftest.$ac_ext
17442 CPPFLAGS="$save_CPPFLAGS"
17443 LDFLAGS="$save_LDFLAGS"
17444 LIBS="$save_LIBS"
17445
17446
17447
17448
17449
17450
17451if test "$have_openssl" = yes; then
17452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17453$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17454
17455 save_LIBS="$LIBS"
17456 save_LDFLAGS="$LDFLAGS"
17457 save_CPPFLAGS="$CPPFLAGS"
17458 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17459 LIBS="$OPENSSL_LIBS $LIBS"
17460 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17461
17462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17463/* end confdefs.h. */
17464
17465 #include <openssl/x509_vfy.h>
17466
17467int
17468main ()
17469{
17470
17471 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17472 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17473 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17474 X509_VERIFY_PARAM_set_hostflags(p, 0);
17475
17476 ;
17477 return 0;
17478}
17479
17480_ACEOF
17481if ac_fn_c_try_link "$LINENO"; then :
17482
17483 ac_cv_has_x509_verify_param_set1_host=yes
17484
17485else
17486
17487 ac_cv_has_x509_verify_param_set1_host=no
17488
17489fi
17490rm -f core conftest.err conftest.$ac_objext \
17491 conftest$ac_exeext conftest.$ac_ext
17492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17493$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17494 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17495
17496$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17497
17498 fi
17499
17500 CPPFLAGS="$save_CPPFLAGS"
17501 LDFLAGS="$save_LDFLAGS"
17502 LIBS="$save_LIBS"
17503fi
17504
Christian Heimes892d66e2018-01-29 14:10:18 +010017505# ssl module default cipher suite string
17506
17507
17508
17509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17510$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17511
17512# Check whether --with-ssl-default-suites was given.
17513if test "${with_ssl_default_suites+set}" = set; then :
17514 withval=$with_ssl_default_suites;
17515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17516$as_echo "$withval" >&6; }
17517case "$withval" in
17518 python)
17519 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17520
17521 ;;
17522 openssl)
17523 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17524
17525 ;;
17526 *)
17527 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17528
17529 cat >>confdefs.h <<_ACEOF
17530#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17531_ACEOF
17532
17533 ;;
17534esac
17535
17536else
17537
17538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17539$as_echo "python" >&6; }
17540$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17541
17542
17543fi
17544
17545
Christian Heimes9b60e552020-05-15 23:54:53 +020017546# builtin hash modules
17547default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17548
17549$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17550
17551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17552$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17553
17554# Check whether --with-builtin-hashlib-hashes was given.
17555if test "${with_builtin_hashlib_hashes+set}" = set; then :
17556 withval=$with_builtin_hashlib_hashes;
17557case "$withval" in
17558 yes)
17559 withval=$default_hashlib_hashes
17560 ;;
17561 no)
17562 withval=""
17563 ;;
17564esac
17565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17566$as_echo "$withval" >&6; }
17567cat >>confdefs.h <<_ACEOF
17568#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17569_ACEOF
17570
17571
17572else
17573
17574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17575$as_echo "$default_hashlib_hashes" >&6; };
17576cat >>confdefs.h <<_ACEOF
17577#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17578_ACEOF
17579
17580
17581fi
17582
17583
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017584# --with-experimental-isolated-subinterpreters
17585
17586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17587$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17588
17589# Check whether --with-experimental-isolated-subinterpreters was given.
17590if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17591 withval=$with_experimental_isolated_subinterpreters;
17592if test "$withval" != no
17593then
17594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17595$as_echo "yes" >&6; };
17596 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17597
17598else
17599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17600$as_echo "no" >&6; };
17601fi
17602else
17603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17604$as_echo "no" >&6; }
17605fi
17606
17607
Christian Heimes892d66e2018-01-29 14:10:18 +010017608
Guido van Rossum627b2d71993-12-24 10:39:16 +000017609# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017610ac_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 +000017611
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017612ac_config_files="$ac_config_files Modules/ld_so_aix"
17613
Martin v. Löwis11437992002-04-12 09:54:03 +000017614cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017615# This file is a shell script that caches the results of configure
17616# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017617# scripts and configure runs, see configure's option --config-cache.
17618# It is not useful on other systems. If it contains results you don't
17619# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017620#
Martin v. Löwis11437992002-04-12 09:54:03 +000017621# config.status only pays attention to the cache file if you give it
17622# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017623#
Skip Montanaro6dead952003-09-25 14:50:04 +000017624# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017625# loading this file, other *unset* `ac_cv_foo' will be assigned the
17626# following values.
17627
17628_ACEOF
17629
Guido van Rossumf78abae1997-01-21 22:02:36 +000017630# The following way of writing the cache mishandles newlines in values,
17631# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017633# Ultrix sh set writes to stderr and can't be redirected directly,
17634# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635(
17636 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17637 eval ac_val=\$$ac_var
17638 case $ac_val in #(
17639 *${as_nl}*)
17640 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017641 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17642$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 esac
17644 case $ac_var in #(
17645 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017646 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17647 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648 esac ;;
17649 esac
17650 done
17651
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17654 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017655 # `set' does not quote correctly, so add quotes: double-quote
17656 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017657 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017658 "s/'/'\\\\''/g;
17659 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017661 *)
17662 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017664 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665 esac |
17666 sort
17667) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017670 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017672 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17673 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17675 :end' >>confcache
17676if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17677 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017678 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017679 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17680$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017681 if test ! -f "$cache_file" || test -h "$cache_file"; then
17682 cat confcache >"$cache_file"
17683 else
17684 case $cache_file in #(
17685 */* | ?:*)
17686 mv -f confcache "$cache_file"$$ &&
17687 mv -f "$cache_file"$$ "$cache_file" ;; #(
17688 *)
17689 mv -f confcache "$cache_file" ;;
17690 esac
17691 fi
17692 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017693 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017694 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17695$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017696 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017697fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017698rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017699
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017700test "x$prefix" = xNONE && prefix=$ac_default_prefix
17701# Let make expand exec_prefix.
17702test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017703
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017704DEFS=-DHAVE_CONFIG_H
17705
Skip Montanaro6dead952003-09-25 14:50:04 +000017706ac_libobjs=
17707ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017708U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017709for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17710 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017712 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17714 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017715 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17716 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017717done
17718LIBOBJS=$ac_libobjs
17719
17720LTLIBOBJS=$ac_ltlibobjs
17721
17722
Martin v. Löwis11437992002-04-12 09:54:03 +000017723
Matthias Kloseb9621712010-04-24 17:59:49 +000017724
Victor Stinnere0be4232011-10-25 13:06:09 +020017725: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017726ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017727ac_clean_files_save=$ac_clean_files
17728ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017729{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17730$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17731as_write_fail=0
17732cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017733#! $SHELL
17734# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017735# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017736# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017737# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017738
Martin v. Löwis11437992002-04-12 09:54:03 +000017739debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017740ac_cs_recheck=false
17741ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017742
Matthias Kloseb9621712010-04-24 17:59:49 +000017743SHELL=\${CONFIG_SHELL-$SHELL}
17744export SHELL
17745_ASEOF
17746cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17747## -------------------- ##
17748## M4sh Initialization. ##
17749## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751# Be more Bourne compatible
17752DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017753if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017754 emulate sh
17755 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017756 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017757 # is contrary to our usage. Disable this feature.
17758 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017760else
Matthias Kloseb9621712010-04-24 17:59:49 +000017761 case `(set -o) 2>/dev/null` in #(
17762 *posix*) :
17763 set -o posix ;; #(
17764 *) :
17765 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017767fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017768
17769
Matthias Kloseb9621712010-04-24 17:59:49 +000017770as_nl='
17771'
17772export as_nl
17773# Printing a long string crashes Solaris 7 /usr/bin/printf.
17774as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17775as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17776as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17777# Prefer a ksh shell builtin over an external printf program on Solaris,
17778# but without wasting forks for bash or zsh.
17779if test -z "$BASH_VERSION$ZSH_VERSION" \
17780 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17781 as_echo='print -r --'
17782 as_echo_n='print -rn --'
17783elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17784 as_echo='printf %s\n'
17785 as_echo_n='printf %s'
17786else
17787 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17788 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17789 as_echo_n='/usr/ucb/echo -n'
17790 else
17791 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17792 as_echo_n_body='eval
17793 arg=$1;
17794 case $arg in #(
17795 *"$as_nl"*)
17796 expr "X$arg" : "X\\(.*\\)$as_nl";
17797 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17798 esac;
17799 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17800 '
17801 export as_echo_n_body
17802 as_echo_n='sh -c $as_echo_n_body as_echo'
17803 fi
17804 export as_echo_body
17805 as_echo='sh -c $as_echo_body as_echo'
17806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017807
17808# The user is always right.
17809if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017810 PATH_SEPARATOR=:
17811 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17812 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17813 PATH_SEPARATOR=';'
17814 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817
17818# IFS
17819# We need space, tab and new line, in precisely that order. Quoting is
17820# there to prevent editors from complaining about space-tab.
17821# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17822# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823IFS=" "" $as_nl"
17824
17825# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017826as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017827case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828 *[\\/]* ) as_myself=$0 ;;
17829 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017830for as_dir in $PATH
17831do
17832 IFS=$as_save_IFS
17833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017834 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17835 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838 ;;
17839esac
17840# We did not find ourselves, most probably we were run as `sh COMMAND'
17841# in which case we are not to be found in the path.
17842if test "x$as_myself" = x; then
17843 as_myself=$0
17844fi
17845if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017846 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17847 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848fi
17849
Matthias Kloseb9621712010-04-24 17:59:49 +000017850# Unset variables that we do not need and which cause bugs (e.g. in
17851# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17852# suppresses any "Segmentation fault" message there. '((' could
17853# trigger a bug in pdksh 5.2.14.
17854for as_var in BASH_ENV ENV MAIL MAILPATH
17855do eval test x\${$as_var+set} = xset \
17856 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857done
17858PS1='$ '
17859PS2='> '
17860PS4='+ '
17861
17862# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017863LC_ALL=C
17864export LC_ALL
17865LANGUAGE=C
17866export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867
Matthias Kloseb9621712010-04-24 17:59:49 +000017868# CDPATH.
17869(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17870
17871
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017872# as_fn_error STATUS ERROR [LINENO LOG_FD]
17873# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017874# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17875# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017876# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017877as_fn_error ()
17878{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017879 as_status=$1; test $as_status -eq 0 && as_status=1
17880 if test "$4"; then
17881 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17882 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017883 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017884 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 as_fn_exit $as_status
17886} # as_fn_error
17887
17888
17889# as_fn_set_status STATUS
17890# -----------------------
17891# Set $? to STATUS, without forking.
17892as_fn_set_status ()
17893{
17894 return $1
17895} # as_fn_set_status
17896
17897# as_fn_exit STATUS
17898# -----------------
17899# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17900as_fn_exit ()
17901{
17902 set +e
17903 as_fn_set_status $1
17904 exit $1
17905} # as_fn_exit
17906
17907# as_fn_unset VAR
17908# ---------------
17909# Portably unset VAR.
17910as_fn_unset ()
17911{
17912 { eval $1=; unset $1;}
17913}
17914as_unset=as_fn_unset
17915# as_fn_append VAR VALUE
17916# ----------------------
17917# Append the text in VALUE to the end of the definition contained in VAR. Take
17918# advantage of any shell optimizations that allow amortized linear growth over
17919# repeated appends, instead of the typical quadratic growth present in naive
17920# implementations.
17921if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17922 eval 'as_fn_append ()
17923 {
17924 eval $1+=\$2
17925 }'
17926else
17927 as_fn_append ()
17928 {
17929 eval $1=\$$1\$2
17930 }
17931fi # as_fn_append
17932
17933# as_fn_arith ARG...
17934# ------------------
17935# Perform arithmetic evaluation on the ARGs, and store the result in the
17936# global $as_val. Take advantage of shells that can avoid forks. The arguments
17937# must be portable across $(()) and expr.
17938if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17939 eval 'as_fn_arith ()
17940 {
17941 as_val=$(( $* ))
17942 }'
17943else
17944 as_fn_arith ()
17945 {
17946 as_val=`expr "$@" || test $? -eq 1`
17947 }
17948fi # as_fn_arith
17949
17950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951if expr a : '\(a\)' >/dev/null 2>&1 &&
17952 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17953 as_expr=expr
17954else
17955 as_expr=false
17956fi
17957
17958if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17959 as_basename=basename
17960else
17961 as_basename=false
17962fi
17963
Matthias Kloseb9621712010-04-24 17:59:49 +000017964if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17965 as_dirname=dirname
17966else
17967 as_dirname=false
17968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970as_me=`$as_basename -- "$0" ||
17971$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17972 X"$0" : 'X\(//\)$' \| \
17973 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017974$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975 sed '/^.*\/\([^/][^/]*\)\/*$/{
17976 s//\1/
17977 q
17978 }
17979 /^X\/\(\/\/\)$/{
17980 s//\1/
17981 q
17982 }
17983 /^X\/\(\/\).*/{
17984 s//\1/
17985 q
17986 }
17987 s/.*/./; q'`
17988
Matthias Kloseb9621712010-04-24 17:59:49 +000017989# Avoid depending upon Character Ranges.
17990as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17991as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17992as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17993as_cr_digits='0123456789'
17994as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995
17996ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017997case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017999 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018001 xy) ECHO_C='\c';;
18002 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18003 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018004 esac;;
18005*)
18006 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018008
Martin v. Löwis11437992002-04-12 09:54:03 +000018009rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010if test -d conf$$.dir; then
18011 rm -f conf$$.dir/conf$$.file
18012else
18013 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018014 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018016if (echo >conf$$.file) 2>/dev/null; then
18017 if ln -s conf$$.file conf$$ 2>/dev/null; then
18018 as_ln_s='ln -s'
18019 # ... but there are two gotchas:
18020 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18021 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018022 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018023 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018024 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018025 elif ln conf$$.file conf$$ 2>/dev/null; then
18026 as_ln_s=ln
18027 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018028 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018029 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018030else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018031 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18034rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018035
Matthias Kloseb9621712010-04-24 17:59:49 +000018036
18037# as_fn_mkdir_p
18038# -------------
18039# Create "$as_dir" as a directory, including parents if necessary.
18040as_fn_mkdir_p ()
18041{
18042
18043 case $as_dir in #(
18044 -*) as_dir=./$as_dir;;
18045 esac
18046 test -d "$as_dir" || eval $as_mkdir_p || {
18047 as_dirs=
18048 while :; do
18049 case $as_dir in #(
18050 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18051 *) as_qdir=$as_dir;;
18052 esac
18053 as_dirs="'$as_qdir' $as_dirs"
18054 as_dir=`$as_dirname -- "$as_dir" ||
18055$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18056 X"$as_dir" : 'X\(//\)[^/]' \| \
18057 X"$as_dir" : 'X\(//\)$' \| \
18058 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18059$as_echo X"$as_dir" |
18060 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18061 s//\1/
18062 q
18063 }
18064 /^X\(\/\/\)[^/].*/{
18065 s//\1/
18066 q
18067 }
18068 /^X\(\/\/\)$/{
18069 s//\1/
18070 q
18071 }
18072 /^X\(\/\).*/{
18073 s//\1/
18074 q
18075 }
18076 s/.*/./; q'`
18077 test -d "$as_dir" && break
18078 done
18079 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018080 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018081
18082
18083} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018084if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018085 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018086else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018087 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018088 as_mkdir_p=false
18089fi
18090
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018091
18092# as_fn_executable_p FILE
18093# -----------------------
18094# Test if FILE is an executable regular file.
18095as_fn_executable_p ()
18096{
18097 test -f "$1" && test -x "$1"
18098} # as_fn_executable_p
18099as_test_x='test -x'
18100as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018101
18102# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018103as_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 +000018104
18105# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018106as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018107
18108
Martin v. Löwis11437992002-04-12 09:54:03 +000018109exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018110## ----------------------------------- ##
18111## Main body of $CONFIG_STATUS script. ##
18112## ----------------------------------- ##
18113_ASEOF
18114test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018115
Matthias Kloseb9621712010-04-24 17:59:49 +000018116cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18117# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018118# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119# values after options handling.
18120ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018121This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018122generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018123
18124 CONFIG_FILES = $CONFIG_FILES
18125 CONFIG_HEADERS = $CONFIG_HEADERS
18126 CONFIG_LINKS = $CONFIG_LINKS
18127 CONFIG_COMMANDS = $CONFIG_COMMANDS
18128 $ $0 $@
18129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130on `(hostname || uname -n) 2>/dev/null | sed 1q`
18131"
18132
Martin v. Löwis11437992002-04-12 09:54:03 +000018133_ACEOF
18134
Matthias Kloseb9621712010-04-24 17:59:49 +000018135case $ac_config_files in *"
18136"*) set x $ac_config_files; shift; ac_config_files=$*;;
18137esac
18138
18139case $ac_config_headers in *"
18140"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18141esac
18142
18143
18144cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018145# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018146config_files="$ac_config_files"
18147config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018150
Matthias Kloseb9621712010-04-24 17:59:49 +000018151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018152ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018153\`$as_me' instantiates files and other configuration actions
18154from templates according to the current configuration. Unless the files
18155and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018156
Matthias Kloseb9621712010-04-24 17:59:49 +000018157Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018158
18159 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018161 --config print configuration, then exit
18162 -q, --quiet, --silent
18163 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018164 -d, --debug don't remove temporary files
18165 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018166 --file=FILE[:TEMPLATE]
18167 instantiate the configuration file FILE
18168 --header=FILE[:TEMPLATE]
18169 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018170
18171Configuration files:
18172$config_files
18173
18174Configuration headers:
18175$config_headers
18176
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018177Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018180cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18181ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018182ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018183python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018184configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018185 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018186
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018187Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018188This config.status script is free software; the Free Software Foundation
18189gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018190
18191ac_pwd='$ac_pwd'
18192srcdir='$srcdir'
18193INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018194MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018195test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018196_ACEOF
18197
Matthias Kloseb9621712010-04-24 17:59:49 +000018198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18199# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018200ac_need_defaults=:
18201while test $# != 0
18202do
18203 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018204 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018205 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18206 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018207 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018208 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018209 --*=)
18210 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18211 ac_optarg=
18212 ac_shift=:
18213 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018214 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018215 ac_option=$1
18216 ac_optarg=$2
18217 ac_shift=shift
18218 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018219 esac
18220
Skip Montanaro6dead952003-09-25 14:50:04 +000018221 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018222 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018223 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18224 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018225 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018226 $as_echo "$ac_cs_version"; exit ;;
18227 --config | --confi | --conf | --con | --co | --c )
18228 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018229 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018230 debug=: ;;
18231 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018232 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018233 case $ac_optarg in
18234 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018235 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018236 esac
18237 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018238 ac_need_defaults=false;;
18239 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018240 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018241 case $ac_optarg in
18242 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18243 esac
18244 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018245 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246 --he | --h)
18247 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018248 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018249Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018251 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018252 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18253 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18254 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018255
18256 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018257 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018258Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018259
Matthias Kloseb9621712010-04-24 17:59:49 +000018260 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018262
18263 esac
18264 shift
18265done
18266
Skip Montanaro6dead952003-09-25 14:50:04 +000018267ac_configure_extra_args=
18268
18269if $ac_cs_silent; then
18270 exec 6>/dev/null
18271 ac_configure_extra_args="$ac_configure_extra_args --silent"
18272fi
18273
18274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018275cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018276if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018277 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018278 shift
18279 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18280 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018281 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018282 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018283fi
18284
Martin v. Löwis11437992002-04-12 09:54:03 +000018285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018286cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287exec 5>>config.log
18288{
18289 echo
18290 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18291## Running $as_me. ##
18292_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018293 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018297cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018298_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018299
Matthias Kloseb9621712010-04-24 17:59:49 +000018300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018301
18302# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018303for ac_config_target in $ac_config_targets
18304do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305 case $ac_config_target in
18306 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18307 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18308 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018309 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18310 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018312 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018313 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018314 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018315 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018316
Victor Stinnere0be4232011-10-25 13:06:09 +020018317 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 esac
18319done
18320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018321
Martin v. Löwis11437992002-04-12 09:54:03 +000018322# If the user did not use the arguments to specify the items to instantiate,
18323# then the envvar interface is used. Set only those that are not.
18324# We use the long form for the default assignment because of an extremely
18325# bizarre bug on SunOS 4.1.3.
18326if $ac_need_defaults; then
18327 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18328 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18329fi
18330
Skip Montanaro6dead952003-09-25 14:50:04 +000018331# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018332# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018333# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018334# Hook for its removal unless debugging.
18335# Note that there is a small window in which the directory will not be cleaned:
18336# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018337$debug ||
18338{
Victor Stinnere0be4232011-10-25 13:06:09 +020018339 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018341 : "${ac_tmp:=$tmp}"
18342 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018343' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018344 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018345}
Martin v. Löwis11437992002-04-12 09:54:03 +000018346# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018347
Martin v. Löwis11437992002-04-12 09:54:03 +000018348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018350 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018351} ||
18352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353 tmp=./conf$$-$RANDOM
18354 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018355} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018356ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018357
Matthias Kloseb9621712010-04-24 17:59:49 +000018358# Set up the scripts for CONFIG_FILES section.
18359# No need to generate them if there are no CONFIG_FILES.
18360# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018361if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018362
Matthias Kloseb9621712010-04-24 17:59:49 +000018363
18364ac_cr=`echo X | tr X '\015'`
18365# On cygwin, bash can eat \r inside `` if the user requested igncr.
18366# But we know of no other shell where ac_cr would be empty at this
18367# point, so we can use a bashism as a fallback.
18368if test "x$ac_cr" = x; then
18369 eval ac_cr=\$\'\\r\'
18370fi
18371ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18372if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018373 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018374else
18375 ac_cs_awk_cr=$ac_cr
18376fi
18377
Victor Stinnere0be4232011-10-25 13:06:09 +020018378echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018379_ACEOF
18380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018381
Matthias Kloseb9621712010-04-24 17:59:49 +000018382{
18383 echo "cat >conf$$subs.awk <<_ACEOF" &&
18384 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18385 echo "_ACEOF"
18386} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018387 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18388ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389ac_delim='%!_!# '
18390for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018391 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018392 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018393
Matthias Kloseb9621712010-04-24 17:59:49 +000018394 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18395 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 break
18397 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018398 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018399 else
18400 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402done
Matthias Kloseb9621712010-04-24 17:59:49 +000018403rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404
Matthias Kloseb9621712010-04-24 17:59:49 +000018405cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018406cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018408sed -n '
18409h
18410s/^/S["/; s/!.*/"]=/
18411p
18412g
18413s/^[^!]*!//
18414:repl
18415t repl
18416s/'"$ac_delim"'$//
18417t delim
18418:nl
18419h
18420s/\(.\{148\}\)..*/\1/
18421t more1
18422s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18423p
18424n
18425b repl
18426:more1
18427s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18428p
18429g
18430s/.\{148\}//
18431t nl
18432:delim
18433h
18434s/\(.\{148\}\)..*/\1/
18435t more2
18436s/["\\]/\\&/g; s/^/"/; s/$/"/
18437p
18438b
18439:more2
18440s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18441p
18442g
18443s/.\{148\}//
18444t delim
18445' <conf$$subs.awk | sed '
18446/^[^""]/{
18447 N
18448 s/\n//
18449}
18450' >>$CONFIG_STATUS || ac_write_fail=1
18451rm -f conf$$subs.awk
18452cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18453_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018454cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018455 for (key in S) S_is_set[key] = 1
18456 FS = ""
18457
18458}
18459{
18460 line = $ 0
18461 nfields = split(line, field, "@")
18462 substed = 0
18463 len = length(field[1])
18464 for (i = 2; i < nfields; i++) {
18465 key = field[i]
18466 keylen = length(key)
18467 if (S_is_set[key]) {
18468 value = S[key]
18469 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18470 len += length(value) + length(field[++i])
18471 substed = 1
18472 } else
18473 len += 1 + keylen
18474 }
18475
18476 print line
18477}
18478
18479_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018481cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18482if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18483 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18484else
18485 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018486fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018487 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018488_ACEOF
18489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018490# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18491# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492# trailing colons and then remove the whole line if VPATH becomes empty
18493# (actually we leave an empty line to preserve line numbers).
18494if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018495 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18496h
18497s///
18498s/^/:/
18499s/[ ]*$/:/
18500s/:\$(srcdir):/:/g
18501s/:\${srcdir}:/:/g
18502s/:@srcdir@:/:/g
18503s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018504s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018505x
18506s/\(=[ ]*\).*/\1/
18507G
18508s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509s/^[^=]*=[ ]*$//
18510}'
18511fi
18512
Matthias Kloseb9621712010-04-24 17:59:49 +000018513cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018514fi # test -n "$CONFIG_FILES"
18515
Matthias Kloseb9621712010-04-24 17:59:49 +000018516# Set up the scripts for CONFIG_HEADERS section.
18517# No need to generate them if there are no CONFIG_HEADERS.
18518# This happens for instance with `./config.status Makefile'.
18519if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018520cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018521BEGIN {
18522_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523
Matthias Kloseb9621712010-04-24 17:59:49 +000018524# Transform confdefs.h into an awk script `defines.awk', embedded as
18525# here-document in config.status, that substitutes the proper values into
18526# config.h.in to produce config.h.
18527
18528# Create a delimiter string that does not exist in confdefs.h, to ease
18529# handling of long lines.
18530ac_delim='%!_!# '
18531for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018532 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18533 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018534 break
18535 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018536 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018537 else
18538 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18539 fi
18540done
18541
18542# For the awk script, D is an array of macro values keyed by name,
18543# likewise P contains macro parameters if any. Preserve backslash
18544# newline sequences.
18545
18546ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18547sed -n '
18548s/.\{148\}/&'"$ac_delim"'/g
18549t rset
18550:rset
18551s/^[ ]*#[ ]*define[ ][ ]*/ /
18552t def
18553d
18554:def
18555s/\\$//
18556t bsnl
18557s/["\\]/\\&/g
18558s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18559D["\1"]=" \3"/p
18560s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18561d
18562:bsnl
18563s/["\\]/\\&/g
18564s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18565D["\1"]=" \3\\\\\\n"\\/p
18566t cont
18567s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18568t cont
18569d
18570:cont
18571n
18572s/.\{148\}/&'"$ac_delim"'/g
18573t clear
18574:clear
18575s/\\$//
18576t bsnlc
18577s/["\\]/\\&/g; s/^/"/; s/$/"/p
18578d
18579:bsnlc
18580s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18581b cont
18582' <confdefs.h | sed '
18583s/'"$ac_delim"'/"\\\
18584"/g' >>$CONFIG_STATUS || ac_write_fail=1
18585
18586cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18587 for (key in D) D_is_set[key] = 1
18588 FS = ""
18589}
18590/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18591 line = \$ 0
18592 split(line, arg, " ")
18593 if (arg[1] == "#") {
18594 defundef = arg[2]
18595 mac1 = arg[3]
18596 } else {
18597 defundef = substr(arg[1], 2)
18598 mac1 = arg[2]
18599 }
18600 split(mac1, mac2, "(") #)
18601 macro = mac2[1]
18602 prefix = substr(line, 1, index(line, defundef) - 1)
18603 if (D_is_set[macro]) {
18604 # Preserve the white space surrounding the "#".
18605 print prefix "define", macro P[macro] D[macro]
18606 next
18607 } else {
18608 # Replace #undef with comments. This is necessary, for example,
18609 # in the case of _POSIX_SOURCE, which is predefined and required
18610 # on some systems where configure will not decide to define it.
18611 if (defundef == "undef") {
18612 print "/*", prefix defundef, macro, "*/"
18613 next
18614 }
18615 }
18616}
18617{ print }
18618_ACAWK
18619_ACEOF
18620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018621 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018622fi # test -n "$CONFIG_HEADERS"
18623
18624
18625eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18626shift
18627for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018628do
18629 case $ac_tag in
18630 :[FHLC]) ac_mode=$ac_tag; continue;;
18631 esac
18632 case $ac_mode$ac_tag in
18633 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018634 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635 :[FH]-) ac_tag=-:-;;
18636 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18637 esac
18638 ac_save_IFS=$IFS
18639 IFS=:
18640 set x $ac_tag
18641 IFS=$ac_save_IFS
18642 shift
18643 ac_file=$1
18644 shift
18645
18646 case $ac_mode in
18647 :L) ac_source=$1;;
18648 :[FH])
18649 ac_file_inputs=
18650 for ac_f
18651 do
18652 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018653 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018654 *) # Look for the file first in the build tree, then in the source tree
18655 # (if the path is not absolute). The absolute path cannot be DOS-style,
18656 # because $ac_f cannot contain `:'.
18657 test -f "$ac_f" ||
18658 case $ac_f in
18659 [\\/$]*) false;;
18660 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18661 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018662 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018663 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018664 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18665 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018666 done
18667
18668 # Let's still pretend it is `configure' which instantiates (i.e., don't
18669 # use $as_me), people would be surprised to read:
18670 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018671 configure_input='Generated from '`
18672 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18673 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018674 if test x"$ac_file" != x-; then
18675 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018676 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18677$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018678 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018679 # Neutralize special characters interpreted by sed in replacement strings.
18680 case $configure_input in #(
18681 *\&* | *\|* | *\\* )
18682 ac_sed_conf_input=`$as_echo "$configure_input" |
18683 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18684 *) ac_sed_conf_input=$configure_input;;
18685 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018686
18687 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018688 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18689 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018690 esac
18691 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018692 esac
18693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018694 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018695$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018696 X"$ac_file" : 'X\(//\)[^/]' \| \
18697 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018698 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018699$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018700 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18701 s//\1/
18702 q
18703 }
18704 /^X\(\/\/\)[^/].*/{
18705 s//\1/
18706 q
18707 }
18708 /^X\(\/\/\)$/{
18709 s//\1/
18710 q
18711 }
18712 /^X\(\/\).*/{
18713 s//\1/
18714 q
18715 }
18716 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018717 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018718 ac_builddir=.
18719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018720case "$ac_dir" in
18721.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18722*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018723 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018724 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018725 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018726 case $ac_top_builddir_sub in
18727 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18728 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18729 esac ;;
18730esac
18731ac_abs_top_builddir=$ac_pwd
18732ac_abs_builddir=$ac_pwd$ac_dir_suffix
18733# for backward compatibility:
18734ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018735
18736case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018737 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018738 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018739 ac_top_srcdir=$ac_top_builddir_sub
18740 ac_abs_top_srcdir=$ac_pwd ;;
18741 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018742 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018743 ac_top_srcdir=$srcdir
18744 ac_abs_top_srcdir=$srcdir ;;
18745 *) # Relative name.
18746 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18747 ac_top_srcdir=$ac_top_build_prefix$srcdir
18748 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018749esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018750ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018751
Martin v. Löwis11437992002-04-12 09:54:03 +000018752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018753 case $ac_mode in
18754 :F)
18755 #
18756 # CONFIG_FILE
18757 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018758
18759 case $INSTALL in
18760 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018761 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018762 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018763 ac_MKDIR_P=$MKDIR_P
18764 case $MKDIR_P in
18765 [\\/$]* | ?:[\\/]* ) ;;
18766 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18767 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018768_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018769
Matthias Kloseb9621712010-04-24 17:59:49 +000018770cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018771# If the template does not know about datarootdir, expand it.
18772# FIXME: This hack should be removed a few years after 2.60.
18773ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018774ac_sed_dataroot='
18775/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018776 p
18777 q
18778}
18779/@datadir@/p
18780/@docdir@/p
18781/@infodir@/p
18782/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018783/@mandir@/p'
18784case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018785*datarootdir*) ac_datarootdir_seen=yes;;
18786*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18788$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018790cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018791 ac_datarootdir_hack='
18792 s&@datadir@&$datadir&g
18793 s&@docdir@&$docdir&g
18794 s&@infodir@&$infodir&g
18795 s&@localedir@&$localedir&g
18796 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018797 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018798esac
18799_ACEOF
18800
18801# Neutralize VPATH when `$srcdir' = `.'.
18802# Shell code in configure.ac might set extrasub.
18803# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018804cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18805ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018806$extrasub
18807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018808cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018809:t
18810/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018811s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018812s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018813s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018814s&@srcdir@&$ac_srcdir&;t t
18815s&@abs_srcdir@&$ac_abs_srcdir&;t t
18816s&@top_srcdir@&$ac_top_srcdir&;t t
18817s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18818s&@builddir@&$ac_builddir&;t t
18819s&@abs_builddir@&$ac_abs_builddir&;t t
18820s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18821s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018822s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018823$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018824"
Victor Stinnere0be4232011-10-25 13:06:09 +020018825eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18826 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018828test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018829 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18830 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18831 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018833which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018834$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018835which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018836
Victor Stinnere0be4232011-10-25 13:06:09 +020018837 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018838 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018839 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18840 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018841 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018842 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018843 ;;
18844 :H)
18845 #
18846 # CONFIG_HEADER
18847 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018848 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018849 {
18850 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018851 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18852 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018853 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018854 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018855 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18856$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018857 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018858 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018859 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018860 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018861 fi
18862 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018863 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018864 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018865 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018866 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018867 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869
18870 esac
18871
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018872
18873 case $ac_file$ac_mode in
18874 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18875
18876 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018877done # for ac_tag
18878
Guido van Rossum627b2d71993-12-24 10:39:16 +000018879
Matthias Kloseb9621712010-04-24 17:59:49 +000018880as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018881_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018882ac_clean_files=$ac_clean_files_save
18883
Matthias Kloseb9621712010-04-24 17:59:49 +000018884test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018885 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018886
Martin v. Löwis11437992002-04-12 09:54:03 +000018887
18888# configure is writing to config.log, and then calls config.status.
18889# config.status does its own redirection, appending to config.log.
18890# Unfortunately, on DOS this fails, as config.log is still kept open
18891# by configure, so config.status won't be able to write to it; its
18892# output is simply discarded. So we exec the FD to /dev/null,
18893# effectively closing config.log, so it can be properly (re)opened and
18894# appended to by config.status. When coming back to configure, we
18895# need to make the FD available again.
18896if test "$no_create" != yes; then
18897 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018898 ac_config_status_args=
18899 test "$silent" = yes &&
18900 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018901 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018902 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018903 exec 5>>config.log
18904 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18905 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018906 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018907fi
18908if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18910$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018911fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018912
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018913
Christian Heimes75ed8902013-11-20 01:11:18 +010018914echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018915if test ! -f Modules/Setup.local
18916then
18917 echo "# Edit this file for local setup changes" >Modules/Setup.local
18918fi
18919
Christian Heimes75ed8902013-11-20 01:11:18 +010018920echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018921$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018922 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018923 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018924mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018925
18926if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18927 echo "" >&6
18928 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018929 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 +000018930 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018931 echo "" >&6
18932 echo "" >&6
18933fi
18934