blob: df7118f68d3bb484148f8b719b1550676c029493 [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.
Pablo Galindod4fe0982020-05-19 03:33:01 +01003# Generated by GNU Autoconf 2.69 for python 3.10.
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'
Pablo Galindod4fe0982020-05-19 03:33:01 +0100583PACKAGE_VERSION='3.10'
584PACKAGE_STRING='python 3.10'
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
Victor Stinner51ae31e2020-06-09 15:32:43 +0200635BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200636LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700637EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200638ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000639SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000640LIBC
641LIBM
642HAVE_GETHOSTBYNAME
643HAVE_GETHOSTBYNAME_R
644HAVE_GETHOSTBYNAME_R_3_ARG
645HAVE_GETHOSTBYNAME_R_5_ARG
646HAVE_GETHOSTBYNAME_R_6_ARG
647LIBOBJS
648TRUE
649MACHDEP_OBJS
650DYNLOADFILE
651DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700652DTRACE_OBJS
653DTRACE_HEADERS
654DFLAGS
655DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700656TCLTK_LIBS
657TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000658LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800659PKG_CONFIG_LIBDIR
660PKG_CONFIG_PATH
661PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400662TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000663SHLIBS
664CFLAGSFORSHARED
665LINKFORSHARED
666CCSHARED
667BLDSHARED
668LDCXXSHARED
669LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700670SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LIBTOOL_CRUFT
672OTHER_LIBTOOL_OPT
673UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100674LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700675CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000676BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200677CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000678OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700680LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700681LLVM_PROF_ERR
682LLVM_PROF_FILE
683LLVM_PROF_MERGER
684PGO_PROF_USE_FLAG
685PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200686LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200687LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700688PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700689DEF_MAKE_RULE
690DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000691ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000692LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100693MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000694INSTALL_DATA
695INSTALL_SCRIPT
696INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200697ac_ct_READELF
698READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000699ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200703EXPORTSFROM
704EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000705LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000706LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000707RUNSHARED
708INSTSONAME
709LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000710PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000711BLDLIBRARY
712DLLLIBRARY
713LDLIBRARY
714LIBRARY
715BUILDEXEEXT
716EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200717NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200718MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719PLATFORM_TRIPLET
720MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200721ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000722MAINCC
723CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700724SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200725GREP
726CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000727OBJEXT
728EXEEXT
729ac_ct_CC
730CPPFLAGS
731LDFLAGS
732CFLAGS
733CC
734EXPORT_MACOSX_DEPLOYMENT_TARGET
735CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200736_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000737MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000738FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800740FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000741FRAMEWORKALTINSTALLLAST
742FRAMEWORKALTINSTALLFIRST
743FRAMEWORKINSTALLLAST
744FRAMEWORKINSTALLFIRST
745PYTHONFRAMEWORKINSTALLDIR
746PYTHONFRAMEWORKPREFIX
747PYTHONFRAMEWORKDIR
748PYTHONFRAMEWORKIDENTIFIER
749PYTHONFRAMEWORK
750LIPO_32BIT_FLAGS
751ARCH_RUN_32BIT
752UNIVERSALSDK
753CONFIG_ARGS
754SOVERSION
755VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200756PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200757PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100758host_os
759host_vendor
760host_cpu
761host
762build_os
763build_vendor
764build_cpu
765build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500766HAS_GIT
767GITBRANCH
768GITTAG
769GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400770BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000771target_alias
772host_alias
773build_alias
774LIBS
775ECHO_T
776ECHO_N
777ECHO_C
778DEFS
779mandir
780localedir
781libdir
782psdir
783pdfdir
784dvidir
785htmldir
786infodir
787docdir
788oldincludedir
789includedir
790localstatedir
791sharedstatedir
792sysconfdir
793datadir
794datarootdir
795libexecdir
796sbindir
797bindir
798program_transform_name
799prefix
800exec_prefix
801PACKAGE_URL
802PACKAGE_BUGREPORT
803PACKAGE_STRING
804PACKAGE_VERSION
805PACKAGE_TARNAME
806PACKAGE_NAME
807PATH_SEPARATOR
808SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000809ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000810ac_user_opts='
811enable_option_checking
812enable_universalsdk
813with_universal_archs
814with_framework_name
815enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200821with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200822with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000823enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700824with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100825with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400826with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100827with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800828with_memory_sanitizer
829with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_libs
831with_system_expat
832with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100833with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100834with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000835enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700836with_tcltk_includes
837with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000839enable_ipv6
840with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000842with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700844with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_libm
846with_libc
847enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100848with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000849with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800850with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100851with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100852with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200853with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200854with_experimental_isolated_subinterpreters
Matthias Kloseb9621712010-04-24 17:59:49 +0000855'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856 ac_precious_vars='build_alias
857host_alias
858target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100859MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860CC
861CFLAGS
862LDFLAGS
863LIBS
864CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800865CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700866PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800867PKG_CONFIG
868PKG_CONFIG_PATH
869PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000873ac_init_help=
874ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000875ac_unrecognized_opts=
876ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877# The variables have the same names as the options, with
878# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000879cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882no_recursion=
883prefix=NONE
884program_prefix=NONE
885program_suffix=NONE
886program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891x_includes=NONE
892x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000893
894# Installation directory options.
895# These are left unexpanded so users can "make install exec_prefix=/foo"
896# and all the variables that are supposed to be based on exec_prefix
897# by default will actually change.
898# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900bindir='${exec_prefix}/bin'
901sbindir='${exec_prefix}/sbin'
902libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903datarootdir='${prefix}/share'
904datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905sysconfdir='${prefix}/etc'
906sharedstatedir='${prefix}/com'
907localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908includedir='${prefix}/include'
909oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
911infodir='${datarootdir}/info'
912htmldir='${docdir}'
913dvidir='${docdir}'
914pdfdir='${docdir}'
915psdir='${docdir}'
916libdir='${exec_prefix}/lib'
917localedir='${datarootdir}/locale'
918mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000923do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924 # If the previous option needs an argument, assign it.
925 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927 ac_prev=
928 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000929 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200932 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
933 *=) ac_optarg= ;;
934 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937 # Accept the important Cygnus configure options, so we can diagnose typos.
938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 case $ac_dashdash$ac_option in
940 --)
941 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -bindir | --bindir | --bindi | --bind | --bin | --bi)
944 ac_prev=bindir ;;
945 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 -cache-file | --cache-file | --cache-fil | --cache-fi \
954 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
955 ac_prev=cache_file ;;
956 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
957 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 cache_file=$ac_optarg ;;
959
960 --config-cache | -C)
961 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000963 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000968 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
969 | --dataroo | --dataro | --datar)
970 ac_prev=datarootdir ;;
971 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
972 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
973 datarootdir=$ac_optarg ;;
974
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000976 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000977 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000978 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200979 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000980 ac_useropt_orig=$ac_useropt
981 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
982 case $ac_user_opts in
983 *"
984"enable_$ac_useropt"
985"*) ;;
986 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
987 ac_unrecognized_sep=', ';;
988 esac
989 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990
991 -docdir | --docdir | --docdi | --doc | --do)
992 ac_prev=docdir ;;
993 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
994 docdir=$ac_optarg ;;
995
996 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
997 ac_prev=dvidir ;;
998 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
999 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001002 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001004 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001005 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001006 ac_useropt_orig=$ac_useropt
1007 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1008 case $ac_user_opts in
1009 *"
1010"enable_$ac_useropt"
1011"*) ;;
1012 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1013 ac_unrecognized_sep=', ';;
1014 esac
1015 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1018 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1019 | --exec | --exe | --ex)
1020 ac_prev=exec_prefix ;;
1021 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1022 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1023 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001027 # Obsolete; use --with-gas.
1028 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 -help | --help | --hel | --he | -h)
1031 ac_init_help=long ;;
1032 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1033 ac_init_help=recursive ;;
1034 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1035 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036
1037 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1043 ac_prev=htmldir ;;
1044 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1045 | --ht=*)
1046 htmldir=$ac_optarg ;;
1047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -includedir | --includedir | --includedi | --included | --include \
1049 | --includ | --inclu | --incl | --inc)
1050 ac_prev=includedir ;;
1051 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1052 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -infodir | --infodir | --infodi | --infod | --info | --inf)
1056 ac_prev=infodir ;;
1057 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
1060 -libdir | --libdir | --libdi | --libd)
1061 ac_prev=libdir ;;
1062 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1066 | --libexe | --libex | --libe)
1067 ac_prev=libexecdir ;;
1068 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1069 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 -localedir | --localedir | --localedi | --localed | --locale)
1073 ac_prev=localedir ;;
1074 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1075 localedir=$ac_optarg ;;
1076
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001078 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079 ac_prev=localstatedir ;;
1080 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001081 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
1084 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1085 ac_prev=mandir ;;
1086 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 # Obsolete; use --without-fp.
1091 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 no_create=yes ;;
1096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1098 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1099 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1102 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1103 | --oldin | --oldi | --old | --ol | --o)
1104 ac_prev=oldincludedir ;;
1105 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1106 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1107 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1111 ac_prev=prefix ;;
1112 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1116 | --program-pre | --program-pr | --program-p)
1117 ac_prev=program_prefix ;;
1118 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1119 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1123 | --program-suf | --program-su | --program-s)
1124 ac_prev=program_suffix ;;
1125 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1126 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128
1129 -program-transform-name | --program-transform-name \
1130 | --program-transform-nam | --program-transform-na \
1131 | --program-transform-n | --program-transform- \
1132 | --program-transform | --program-transfor \
1133 | --program-transfo | --program-transf \
1134 | --program-trans | --program-tran \
1135 | --progr-tra | --program-tr | --program-t)
1136 ac_prev=program_transform_name ;;
1137 -program-transform-name=* | --program-transform-name=* \
1138 | --program-transform-nam=* | --program-transform-na=* \
1139 | --program-transform-n=* | --program-transform-=* \
1140 | --program-transform=* | --program-transfor=* \
1141 | --program-transfo=* | --program-transf=* \
1142 | --program-trans=* | --program-tran=* \
1143 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001146 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1147 ac_prev=pdfdir ;;
1148 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1149 pdfdir=$ac_optarg ;;
1150
1151 -psdir | --psdir | --psdi | --psd | --ps)
1152 ac_prev=psdir ;;
1153 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1154 psdir=$ac_optarg ;;
1155
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1157 | -silent | --silent | --silen | --sile | --sil)
1158 silent=yes ;;
1159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1161 ac_prev=sbindir ;;
1162 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1163 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
1166 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1167 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1168 | --sharedst | --shareds | --shared | --share | --shar \
1169 | --sha | --sh)
1170 ac_prev=sharedstatedir ;;
1171 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1172 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1173 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1174 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 -site | --site | --sit)
1178 ac_prev=site ;;
1179 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1183 ac_prev=srcdir ;;
1184 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1188 | --syscon | --sysco | --sysc | --sys | --sy)
1189 ac_prev=sysconfdir ;;
1190 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1191 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1200 verbose=yes ;;
1201
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 -version | --version | --versio | --versi | --vers | -V)
1203 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
1234 esac
1235 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 --x)
1238 # Obsolete; use --with-x.
1239 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1242 | --x-incl | --x-inc | --x-in | --x-i)
1243 ac_prev=x_includes ;;
1244 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1245 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
1248 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1249 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1250 ac_prev=x_libraries ;;
1251 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1252 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1256Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 ;;
1258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 *=*)
1260 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 case $ac_envvar in #(
1263 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 export $ac_envvar ;;
1268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001269 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001274 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ;;
1276
1277 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278done
1279
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283fi
1284
Matthias Kloseb9621712010-04-24 17:59:49 +00001285if test -n "$ac_unrecognized_opts"; then
1286 case $enable_option_checking in
1287 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1290 esac
1291fi
1292
1293# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1295 datadir sysconfdir sharedstatedir localstatedir includedir \
1296 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001297 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 # Remove trailing slashes.
1301 case $ac_val in
1302 */ )
1303 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1304 eval $ac_var=\$ac_val;;
1305 esac
1306 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 [\\/$]* | ?:[\\/]* ) continue;;
1309 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001312done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# There might be people who depend on the old broken behavior: `$host'
1315# used to hold the argument of --host etc.
1316# FIXME: To remove some day.
1317build=$build_alias
1318host=$host_alias
1319target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
Martin v. Löwis11437992002-04-12 09:54:03 +00001321# FIXME: To remove some day.
1322if test "x$host_alias" != x; then
1323 if test "x$build_alias" = x; then
1324 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 elif test "x$build_alias" != "x$host_alias"; then
1326 cross_compiling=yes
1327 fi
1328fi
1329
1330ac_tool_prefix=
1331test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333test "$silent" = yes && exec 6>/dev/null
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337ac_ls_di=`ls -di .` &&
1338ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342
1343
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344# Find the source files, if location was not specified.
1345if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 ac_confdir=`$as_dirname -- "$as_myself" ||
1349$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350 X"$as_myself" : 'X\(//\)[^/]' \| \
1351 X"$as_myself" : 'X\(//\)$' \| \
1352 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)[^/].*/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\).*/{
1367 s//\1/
1368 q
1369 }
1370 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373 srcdir=..
1374 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378if test ! -r "$srcdir/$ac_unique_file"; then
1379 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1383ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001384 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385 pwd)`
1386# When building in place, set srcdir=.
1387if test "$ac_abs_confdir" = "$ac_pwd"; then
1388 srcdir=.
1389fi
1390# Remove unnecessary trailing slashes from srcdir.
1391# Double slashes in file names in object file debugging info
1392# mess up M-x gdb in Emacs.
1393case $srcdir in
1394*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1395esac
1396for ac_var in $ac_precious_vars; do
1397 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_env_${ac_var}_value=\$${ac_var}
1399 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1401done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402
Martin v. Löwis11437992002-04-12 09:54:03 +00001403#
1404# Report the --help message.
1405#
1406if test "$ac_init_help" = "long"; then
1407 # Omit some internal or obsolete options to make the list less imposing.
1408 # This message is too long to be a string in the A/UX 3.1 sh.
1409 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001410\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412Usage: $0 [OPTION]... [VAR=VALUE]...
1413
1414To assign environment variables (e.g., CC, CFLAGS...), specify them as
1415VAR=VALUE. See below for descriptions of some of the useful variables.
1416
1417Defaults for the options are specified in brackets.
1418
1419Configuration:
1420 -h, --help display this help and exit
1421 --help=short display options specific to this package
1422 --help=recursive display the short help of all the included packages
1423 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001424 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --cache-file=FILE cache test results in FILE [disabled]
1426 -C, --config-cache alias for \`--cache-file=config.cache'
1427 -n, --no-create do not create output files
1428 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1429
Martin v. Löwis11437992002-04-12 09:54:03 +00001430Installation directories:
1431 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436By default, \`make install' will install all the files in
1437\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1438an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439for instance \`--prefix=\$HOME'.
1440
1441For better control, use the options below.
1442
1443Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --bindir=DIR user executables [EPREFIX/bin]
1445 --sbindir=DIR system admin executables [EPREFIX/sbin]
1446 --libexecdir=DIR program executables [EPREFIX/libexec]
1447 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1448 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1449 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1450 --libdir=DIR object code libraries [EPREFIX/lib]
1451 --includedir=DIR C header files [PREFIX/include]
1452 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1453 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1454 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1455 --infodir=DIR info documentation [DATAROOTDIR/info]
1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1457 --mandir=DIR man documentation [DATAROOTDIR/man]
1458 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1459 --htmldir=DIR html documentation [DOCDIR]
1460 --dvidir=DIR dvi documentation [DOCDIR]
1461 --pdfdir=DIR pdf documentation [DOCDIR]
1462 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464
1465 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001466
1467System types:
1468 --build=BUILD configure for building on BUILD [guessed]
1469 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001470_ACEOF
1471fi
1472
1473if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001475 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 cat <<\_ACEOF
1478
1479Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001480 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1482 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001483 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001484 create a universal binary build. SDKDIR specifies
1485 which macOS SDK should be used to perform the build,
1486 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001488 create a Python.framework rather than a traditional
1489 Unix install. optional INSTALLDIR specifies the
1490 installation path. see Mac/README.rst (default is
1491 no)
1492 --enable-shared enable building a shared Python library (default is
1493 no)
1494 --enable-profiling enable C-level code profiling with gprof (default is
1495 no)
1496 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1497 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001498 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001499 support loadable extensions in _sqlite module, see
1500 Doc/library/sqlite3.rst (default is no)
1501 --enable-ipv6 enable ipv6 (with ipv4) support, see
1502 Doc/library/socket.rst (default is yes if supported)
1503 --enable-big-digits[=15|30]
1504 use big digits (30 or 15 bits) for Python longs
1505 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
1507Optional Packages:
1508 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1509 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001510 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001511 specify the kind of universal binary that should be
1512 created. this option is only valid when
1513 --enable-universalsdk is set; options are:
1514 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1515 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001516 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001517 specify the name for the python framework on macOS
1518 only valid when --enable-framework is set. see
1519 Mac/README.rst (default is 'Python')
1520 --with-cxx-main[=COMPILER]
1521 compile main() and link Python executable with C++
1522 compiler specified in COMPILER (default is $CXX)
1523 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1524 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001525 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001526 (default is no)
1527 --with-assertions build with C assertions enabled (default is no)
1528 --with-lto enable Link-Time-Optimization in any build (default
1529 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001530 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001531 select hash algorithm for use in Python/pyhash.c
1532 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001533 --with-tzpath=<list of absolute paths separated by pathsep>
1534 Select the default time zone search path for zoneinfo.TZPATH
1535
Charles-François Natalid30b0222014-05-08 23:08:51 +01001536 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001537 enable AddressSanitizer memory error detector,
1538 'asan' (default is no)
1539 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1540 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001541 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001542 enable UndefinedBehaviorSanitizer undefined
1543 behaviour detector, 'ubsan' (default is no)
1544 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001545 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001546 library, see Doc/library/pyexpat.rst (default is no)
1547 --with-system-ffi build _ctypes module using an installed ffi library,
1548 see Doc/library/ctypes.rst (default is
1549 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001550 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001551 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001552 --with-decimal-contextvar
1553 build _decimal module using a coroutine-local rather
1554 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001555 --with-tcltk-includes='-I...'
1556 override search for Tcl and Tk include files
1557 --with-tcltk-libs='-L...'
1558 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001559 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001560 override order to check db backends for dbm; a valid
1561 value is a colon separated string with the backend
1562 names `ndbm', `gdbm' and `bdb'.
1563 --with-doc-strings enable documentation strings (default is yes)
1564 --with-pymalloc enable specialized mallocs (default is yes)
1565 --with-c-locale-coercion
1566 enable C locale coercion to a UTF-8 based locale
1567 (default is yes)
1568 --with-valgrind enable Valgrind support (default is no)
1569 --with-dtrace enable DTrace support (default is no)
1570 --with-libm=STRING override libm math library to STRING (default is
1571 system-dependent)
1572 --with-libc=STRING override libc C library to STRING (default is
1573 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001574 --with-platlibdir=DIRNAME
1575 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001576 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001577 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001578 --with-ensurepip[=install|upgrade|no]
1579 "install" or "upgrade" using bundled pip (default is
1580 upgrade)
1581 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001582 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001583 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001584 Python's preferred selection (default), openssl:
1585 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001586 custom string, PROTOCOL_SSLv2 ignores the setting,
1587 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001588 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1589 builtin hash modules, md5, sha1, sha256, sha512,
1590 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001591 --with-experimental-isolated-subinterpreters
1592 better isolate subinterpreters, experimental build
1593 mode (default is no)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
1595Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001596 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 CC C compiler command
1598 CFLAGS C compiler flags
1599 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1600 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001605 PROFILE_TASK
1606 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001607 PKG_CONFIG path to pkg-config utility
1608 PKG_CONFIG_PATH
1609 directories to add to pkg-config's search path
1610 PKG_CONFIG_LIBDIR
1611 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001612
1613Use these variables to override the choices made by `configure' or to help
1614it to find libraries and programs with nonstandard names/locations.
1615
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001616Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001619fi
1620
1621if test "$ac_init_help" = "recursive"; then
1622 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 test -d "$ac_dir" ||
1625 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1626 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 ac_builddir=.
1628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629case "$ac_dir" in
1630.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1631*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635 case $ac_top_builddir_sub in
1636 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1637 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1638 esac ;;
1639esac
1640ac_abs_top_builddir=$ac_pwd
1641ac_abs_builddir=$ac_pwd$ac_dir_suffix
1642# for backward compatibility:
1643ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001644
1645case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001648 ac_top_srcdir=$ac_top_builddir_sub
1649 ac_abs_top_srcdir=$ac_pwd ;;
1650 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001652 ac_top_srcdir=$srcdir
1653 ac_abs_top_srcdir=$srcdir ;;
1654 *) # Relative name.
1655 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1656 ac_top_srcdir=$ac_top_build_prefix$srcdir
1657 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001658esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661 cd "$ac_dir" || { ac_status=$?; continue; }
1662 # Check for guested configure.
1663 if test -f "$ac_srcdir/configure.gnu"; then
1664 echo &&
1665 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1666 elif test -f "$ac_srcdir/configure"; then
1667 echo &&
1668 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001669 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001670 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001671 fi || ac_status=$?
1672 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 done
1674fi
1675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001676test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001677if $ac_init_version; then
1678 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001679python configure 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001680generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001681
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001682Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001683This configure script is free software; the Free Software Foundation
1684gives unlimited permission to copy, distribute and modify it.
1685_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001686 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001688
1689## ------------------------ ##
1690## Autoconf initialization. ##
1691## ------------------------ ##
1692
1693# ac_fn_c_try_compile LINENO
1694# --------------------------
1695# Try to compile conftest.$ac_ext, and return whether this succeeded.
1696ac_fn_c_try_compile ()
1697{
1698 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699 rm -f conftest.$ac_objext
1700 if { { ac_try="$ac_compile"
1701case "(($ac_try" in
1702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1703 *) ac_try_echo=$ac_try;;
1704esac
1705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1706$as_echo "$ac_try_echo"; } >&5
1707 (eval "$ac_compile") 2>conftest.err
1708 ac_status=$?
1709 if test -s conftest.err; then
1710 grep -v '^ *+' conftest.err >conftest.er1
1711 cat conftest.er1 >&5
1712 mv -f conftest.er1 conftest.err
1713 fi
1714 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1715 test $ac_status = 0; } && {
1716 test -z "$ac_c_werror_flag" ||
1717 test ! -s conftest.err
1718 } && test -s conftest.$ac_objext; then :
1719 ac_retval=0
1720else
1721 $as_echo "$as_me: failed program was:" >&5
1722sed 's/^/| /' conftest.$ac_ext >&5
1723
1724 ac_retval=1
1725fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001726 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001727 as_fn_set_status $ac_retval
1728
1729} # ac_fn_c_try_compile
1730
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001731# ac_fn_c_try_cpp LINENO
1732# ----------------------
1733# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1734ac_fn_c_try_cpp ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737 if { { ac_try="$ac_cpp conftest.$ac_ext"
1738case "(($ac_try" in
1739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1740 *) ac_try_echo=$ac_try;;
1741esac
1742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1743$as_echo "$ac_try_echo"; } >&5
1744 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1745 ac_status=$?
1746 if test -s conftest.err; then
1747 grep -v '^ *+' conftest.err >conftest.er1
1748 cat conftest.er1 >&5
1749 mv -f conftest.er1 conftest.err
1750 fi
1751 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1752 test $ac_status = 0; } > conftest.i && {
1753 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1754 test ! -s conftest.err
1755 }; then :
1756 ac_retval=0
1757else
1758 $as_echo "$as_me: failed program was:" >&5
1759sed 's/^/| /' conftest.$ac_ext >&5
1760
1761 ac_retval=1
1762fi
1763 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1764 as_fn_set_status $ac_retval
1765
1766} # ac_fn_c_try_cpp
1767
Matthias Kloseb9621712010-04-24 17:59:49 +00001768# ac_fn_c_try_link LINENO
1769# -----------------------
1770# Try to link conftest.$ac_ext, and return whether this succeeded.
1771ac_fn_c_try_link ()
1772{
1773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1774 rm -f conftest.$ac_objext conftest$ac_exeext
1775 if { { ac_try="$ac_link"
1776case "(($ac_try" in
1777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1778 *) ac_try_echo=$ac_try;;
1779esac
1780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1781$as_echo "$ac_try_echo"; } >&5
1782 (eval "$ac_link") 2>conftest.err
1783 ac_status=$?
1784 if test -s conftest.err; then
1785 grep -v '^ *+' conftest.err >conftest.er1
1786 cat conftest.er1 >&5
1787 mv -f conftest.er1 conftest.err
1788 fi
1789 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1790 test $ac_status = 0; } && {
1791 test -z "$ac_c_werror_flag" ||
1792 test ! -s conftest.err
1793 } && test -s conftest$ac_exeext && {
1794 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001795 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001796 }; then :
1797 ac_retval=0
1798else
1799 $as_echo "$as_me: failed program was:" >&5
1800sed 's/^/| /' conftest.$ac_ext >&5
1801
1802 ac_retval=1
1803fi
1804 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1805 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1806 # interfere with the next link command; also delete a directory that is
1807 # left behind by Apple's compiler. We do this before executing the actions.
1808 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001810 as_fn_set_status $ac_retval
1811
1812} # ac_fn_c_try_link
1813
Matthias Kloseb9621712010-04-24 17:59:49 +00001814# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1815# -------------------------------------------------------
1816# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1817# the include files in INCLUDES and setting the cache variable VAR
1818# accordingly.
1819ac_fn_c_check_header_mongrel ()
1820{
1821 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001822 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001825if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 $as_echo_n "(cached) " >&6
1827fi
1828eval ac_res=\$$3
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1830$as_echo "$ac_res" >&6; }
1831else
1832 # Is the header compilable?
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1834$as_echo_n "checking $2 usability... " >&6; }
1835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837$4
1838#include <$2>
1839_ACEOF
1840if ac_fn_c_try_compile "$LINENO"; then :
1841 ac_header_compiler=yes
1842else
1843 ac_header_compiler=no
1844fi
1845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1847$as_echo "$ac_header_compiler" >&6; }
1848
1849# Is the header present?
1850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1851$as_echo_n "checking $2 presence... " >&6; }
1852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1853/* end confdefs.h. */
1854#include <$2>
1855_ACEOF
1856if ac_fn_c_try_cpp "$LINENO"; then :
1857 ac_header_preproc=yes
1858else
1859 ac_header_preproc=no
1860fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001861rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1863$as_echo "$ac_header_preproc" >&6; }
1864
1865# So? What about this header?
1866case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1867 yes:no: )
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1869$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1871$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1872 ;;
1873 no:yes:* )
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1875$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1877$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1879$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1881$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1883$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001884( $as_echo "## --------------------------------------- ##
1885## Report this to https://bugs.python.org/ ##
1886## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 ) | sed "s/^/$as_me: WARNING: /" >&2
1888 ;;
1889esac
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001892if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 $as_echo_n "(cached) " >&6
1894else
1895 eval "$3=\$ac_header_compiler"
1896fi
1897eval ac_res=\$$3
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1899$as_echo "$ac_res" >&6; }
1900fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001902
1903} # ac_fn_c_check_header_mongrel
1904
1905# ac_fn_c_try_run LINENO
1906# ----------------------
1907# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1908# that executables *can* be run.
1909ac_fn_c_try_run ()
1910{
1911 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912 if { { ac_try="$ac_link"
1913case "(($ac_try" in
1914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1915 *) ac_try_echo=$ac_try;;
1916esac
1917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1918$as_echo "$ac_try_echo"; } >&5
1919 (eval "$ac_link") 2>&5
1920 ac_status=$?
1921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1922 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1923 { { case "(($ac_try" in
1924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1925 *) ac_try_echo=$ac_try;;
1926esac
1927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1928$as_echo "$ac_try_echo"; } >&5
1929 (eval "$ac_try") 2>&5
1930 ac_status=$?
1931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932 test $ac_status = 0; }; }; then :
1933 ac_retval=0
1934else
1935 $as_echo "$as_me: program exited with status $ac_status" >&5
1936 $as_echo "$as_me: failed program was:" >&5
1937sed 's/^/| /' conftest.$ac_ext >&5
1938
1939 ac_retval=$ac_status
1940fi
1941 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001942 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 as_fn_set_status $ac_retval
1944
1945} # ac_fn_c_try_run
1946
1947# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1948# -------------------------------------------------------
1949# Tests whether HEADER exists and can be compiled using the include files in
1950# INCLUDES, setting the cache variable VAR accordingly.
1951ac_fn_c_check_header_compile ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1955$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001956if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001957 $as_echo_n "(cached) " >&6
1958else
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962#include <$2>
1963_ACEOF
1964if ac_fn_c_try_compile "$LINENO"; then :
1965 eval "$3=yes"
1966else
1967 eval "$3=no"
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971eval ac_res=\$$3
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1973$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001974 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001975
1976} # ac_fn_c_check_header_compile
1977
Matthias Kloseb9621712010-04-24 17:59:49 +00001978# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1979# -------------------------------------------
1980# Tests whether TYPE exists after having included INCLUDES, setting cache
1981# variable VAR accordingly.
1982ac_fn_c_check_type ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1986$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001987if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001988 $as_echo_n "(cached) " >&6
1989else
1990 eval "$3=no"
1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992/* end confdefs.h. */
1993$4
1994int
1995main ()
1996{
1997if (sizeof ($2))
1998 return 0;
1999 ;
2000 return 0;
2001}
2002_ACEOF
2003if ac_fn_c_try_compile "$LINENO"; then :
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010if (sizeof (($2)))
2011 return 0;
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017
2018else
2019 eval "$3=yes"
2020fi
2021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022fi
2023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024fi
2025eval ac_res=\$$3
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2027$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002029
2030} # ac_fn_c_check_type
2031
Matthias Kloseb9621712010-04-24 17:59:49 +00002032# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2033# --------------------------------------------
2034# Tries to find the compile-time value of EXPR in a program that includes
2035# INCLUDES, setting VAR accordingly. Returns whether the value could be
2036# computed
2037ac_fn_c_compute_int ()
2038{
2039 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040 if test "$cross_compiling" = yes; then
2041 # Depending upon the size, compute the lo and hi bounds.
2042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_lo=0 ac_mid=0
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_hi=$ac_mid; break
2075else
2076 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2077 if test $ac_lo -le $ac_mid; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087/* end confdefs.h. */
2088$4
2089int
2090main ()
2091{
2092static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002093test_array [0] = 0;
2094return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002095
2096 ;
2097 return 0;
2098}
2099_ACEOF
2100if ac_fn_c_try_compile "$LINENO"; then :
2101 ac_hi=-1 ac_mid=-1
2102 while :; do
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002110test_array [0] = 0;
2111return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_lo=$ac_mid; break
2119else
2120 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2121 if test $ac_mid -le $ac_hi; then
2122 ac_lo= ac_hi=
2123 break
2124 fi
2125 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2126fi
2127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128 done
2129else
2130 ac_lo= ac_hi=
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133fi
2134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135# Binary search between lo and hi bounds.
2136while test "x$ac_lo" != "x$ac_hi"; do
2137 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
2144static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002145test_array [0] = 0;
2146return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_hi=$ac_mid
2154else
2155 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2156fi
2157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2158done
2159case $ac_lo in #((
2160?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2161'') ac_retval=1 ;;
2162esac
2163 else
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166$4
2167static long int longval () { return $2; }
2168static unsigned long int ulongval () { return $2; }
2169#include <stdio.h>
2170#include <stdlib.h>
2171int
2172main ()
2173{
2174
2175 FILE *f = fopen ("conftest.val", "w");
2176 if (! f)
2177 return 1;
2178 if (($2) < 0)
2179 {
2180 long int i = longval ();
2181 if (i != ($2))
2182 return 1;
2183 fprintf (f, "%ld", i);
2184 }
2185 else
2186 {
2187 unsigned long int i = ulongval ();
2188 if (i != ($2))
2189 return 1;
2190 fprintf (f, "%lu", i);
2191 }
2192 /* Do not output a trailing newline, as this causes \r\n confusion
2193 on some platforms. */
2194 return ferror (f) || fclose (f) != 0;
2195
2196 ;
2197 return 0;
2198}
2199_ACEOF
2200if ac_fn_c_try_run "$LINENO"; then :
2201 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2202else
2203 ac_retval=1
2204fi
2205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2206 conftest.$ac_objext conftest.beam conftest.$ac_ext
2207rm -f conftest.val
2208
2209 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002210 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002211 as_fn_set_status $ac_retval
2212
2213} # ac_fn_c_compute_int
2214
2215# ac_fn_c_check_func LINENO FUNC VAR
2216# ----------------------------------
2217# Tests whether FUNC exists, setting the cache variable VAR accordingly
2218ac_fn_c_check_func ()
2219{
2220 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2222$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002223if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002224 $as_echo_n "(cached) " >&6
2225else
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2229 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2230#define $2 innocuous_$2
2231
2232/* System header to define __stub macros and hopefully few prototypes,
2233 which can conflict with char $2 (); below.
2234 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2235 <limits.h> exists even on freestanding compilers. */
2236
2237#ifdef __STDC__
2238# include <limits.h>
2239#else
2240# include <assert.h>
2241#endif
2242
2243#undef $2
2244
2245/* Override any GCC internal prototype to avoid an error.
2246 Use char because int might match the return type of a GCC
2247 builtin and then its argument prototype would still apply. */
2248#ifdef __cplusplus
2249extern "C"
2250#endif
2251char $2 ();
2252/* The GNU C library defines this for functions which it implements
2253 to always fail with ENOSYS. Some functions are actually named
2254 something starting with __ and the normal name is an alias. */
2255#if defined __stub_$2 || defined __stub___$2
2256choke me
2257#endif
2258
2259int
2260main ()
2261{
2262return $2 ();
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_link "$LINENO"; then :
2268 eval "$3=yes"
2269else
2270 eval "$3=no"
2271fi
2272rm -f core conftest.err conftest.$ac_objext \
2273 conftest$ac_exeext conftest.$ac_ext
2274fi
2275eval ac_res=\$$3
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2277$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002278 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002279
2280} # ac_fn_c_check_func
2281
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002282# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2283# ---------------------------------------------
2284# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2285# accordingly.
2286ac_fn_c_check_decl ()
2287{
2288 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289 as_decl_name=`echo $2|sed 's/ *(.*//'`
2290 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2292$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2293if eval \${$3+:} false; then :
2294 $as_echo_n "(cached) " >&6
2295else
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$4
2299int
2300main ()
2301{
2302#ifndef $as_decl_name
2303#ifdef __cplusplus
2304 (void) $as_decl_use;
2305#else
2306 (void) $as_decl_name;
2307#endif
2308#endif
2309
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$3=yes"
2316else
2317 eval "$3=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
2324 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2325
2326} # ac_fn_c_check_decl
2327
Matthias Kloseb9621712010-04-24 17:59:49 +00002328# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2329# ----------------------------------------------------
2330# Tries to find if the field MEMBER exists in type AGGR, after including
2331# INCLUDES, setting cache variable VAR accordingly.
2332ac_fn_c_check_member ()
2333{
2334 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2336$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002338 $as_echo_n "(cached) " >&6
2339else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341/* end confdefs.h. */
2342$5
2343int
2344main ()
2345{
2346static $2 ac_aggr;
2347if (ac_aggr.$3)
2348return 0;
2349 ;
2350 return 0;
2351}
2352_ACEOF
2353if ac_fn_c_try_compile "$LINENO"; then :
2354 eval "$4=yes"
2355else
2356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357/* end confdefs.h. */
2358$5
2359int
2360main ()
2361{
2362static $2 ac_aggr;
2363if (sizeof ac_aggr.$3)
2364return 0;
2365 ;
2366 return 0;
2367}
2368_ACEOF
2369if ac_fn_c_try_compile "$LINENO"; then :
2370 eval "$4=yes"
2371else
2372 eval "$4=no"
2373fi
2374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2375fi
2376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2377fi
2378eval ac_res=\$$4
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2380$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002381 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002382
2383} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002385This file contains any messages produced by compilers while
2386running configure, to aid debugging if configure makes a mistake.
2387
Pablo Galindod4fe0982020-05-19 03:33:01 +01002388It was created by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002389generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002390
2391 $ $0 $@
2392
2393_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002395{
2396cat <<_ASUNAME
2397## --------- ##
2398## Platform. ##
2399## --------- ##
2400
2401hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2402uname -m = `(uname -m) 2>/dev/null || echo unknown`
2403uname -r = `(uname -r) 2>/dev/null || echo unknown`
2404uname -s = `(uname -s) 2>/dev/null || echo unknown`
2405uname -v = `(uname -v) 2>/dev/null || echo unknown`
2406
2407/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2408/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2409
2410/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2411/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2412/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002414/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2415/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2416/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2417
2418_ASUNAME
2419
2420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2421for as_dir in $PATH
2422do
2423 IFS=$as_save_IFS
2424 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 $as_echo "PATH: $as_dir"
2426 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002427IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429} >&5
2430
2431cat >&5 <<_ACEOF
2432
2433
2434## ----------- ##
2435## Core tests. ##
2436## ----------- ##
2437
2438_ACEOF
2439
2440
2441# Keep a trace of the command line.
2442# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002443# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002444# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002445# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002446ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002447ac_configure_args0=
2448ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002449ac_must_keep_next=false
2450for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002451do
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 for ac_arg
2453 do
2454 case $ac_arg in
2455 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2456 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2457 | -silent | --silent | --silen | --sile | --sil)
2458 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 esac
2462 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002467 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002469 case $ac_arg in
2470 *=* | --config-cache | -C | -disable-* | --disable-* \
2471 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2472 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2473 | -with-* | --with-* | -without-* | --without-* | --x)
2474 case "$ac_configure_args0 " in
2475 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2476 esac
2477 ;;
2478 -* ) ac_must_keep_next=true ;;
2479 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485done
Matthias Kloseb9621712010-04-24 17:59:49 +00002486{ ac_configure_args0=; unset ac_configure_args0;}
2487{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002488
2489# When interrupted or exit'd, cleanup temporary files, and complete
2490# config.log. We remove comments because anyway the quotes in there
2491# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492# WARNING: Use '\'' to represent an apostrophe within the trap.
2493# 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 +00002494trap 'exit_status=$?
2495 # Save into config.log some information that might help in debugging.
2496 {
2497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002500## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 echo
2503 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504(
2505 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2506 eval ac_val=\$$ac_var
2507 case $ac_val in #(
2508 *${as_nl}*)
2509 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2511$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 esac
2513 case $ac_var in #(
2514 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2516 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 esac ;;
2518 esac
2519 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2522 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 "s/'\''/'\''\\\\'\'''\''/g;
2525 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2526 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002527 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002529 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac |
2531 sort
2532)
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002534
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002535 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002536## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 echo
2539 for ac_var in $ac_subst_vars
2540 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 eval ac_val=\$$ac_var
2542 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 done | sort
2547 echo
2548
2549 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 echo
2554 for ac_var in $ac_subst_files
2555 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 eval ac_val=\$$ac_var
2557 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002561 done | sort
2562 echo
2563 fi
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002566 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002567## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 echo
2572 fi
2573 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 $as_echo "$as_me: caught signal $ac_signal"
2575 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577 rm -f core *.core core.conftest.* &&
2578 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002581for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002583done
2584ac_signal=0
2585
2586# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002588
Matthias Kloseb9621712010-04-24 17:59:49 +00002589$as_echo "/* confdefs.h */" > confdefs.h
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591# Predefined preprocessor variables.
2592
2593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_NAME "$PACKAGE_NAME"
2595_ACEOF
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2599_ACEOF
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_VERSION "$PACKAGE_VERSION"
2603_ACEOF
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_STRING "$PACKAGE_STRING"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2611_ACEOF
2612
Matthias Kloseb9621712010-04-24 17:59:49 +00002613cat >>confdefs.h <<_ACEOF
2614#define PACKAGE_URL "$PACKAGE_URL"
2615_ACEOF
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617
2618# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002619# Prefer an explicitly selected file to automatically selected ones.
2620ac_site_file1=NONE
2621ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002623 # We do not want a PATH search for config.site.
2624 case $CONFIG_SITE in #((
2625 -*) ac_site_file1=./$CONFIG_SITE;;
2626 */*) ac_site_file1=$CONFIG_SITE;;
2627 *) ac_site_file1=./$CONFIG_SITE;;
2628 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 ac_site_file1=$prefix/share/config.site
2631 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632else
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 ac_site_file1=$ac_default_prefix/share/config.site
2634 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002636for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637do
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 test "x$ac_site_file" = xNONE && continue
2639 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2641$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002643 . "$ac_site_file" \
2644 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2646as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002647See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648 fi
2649done
2650
2651if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 # Some versions of bash will fail to source /dev/null (special files
2653 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2654 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2656$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2659 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002662else
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2664$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 >$cache_file
2666fi
2667
2668# Check that the precious variables saved in the cache have kept the same
2669# value.
2670ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2673 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2675 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 case $ac_old_set,$ac_new_set in
2677 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2679$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 +00002680 ac_cache_corrupted=: ;;
2681 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2683$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 ac_cache_corrupted=: ;;
2685 ,);;
2686 *)
2687 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002688 # differences in whitespace do not lead to failure.
2689 ac_old_val_w=`echo x $ac_old_val`
2690 ac_new_val_w=`echo x $ac_new_val`
2691 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2693$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2694 ac_cache_corrupted=:
2695 else
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2697$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2698 eval $ac_var=\$ac_old_val
2699 fi
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2701$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2703$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 fi;;
2705 esac
2706 # Pass precious variables to config.status.
2707 if test "$ac_new_set" = set; then
2708 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002709 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 *) ac_arg=$ac_var=$ac_new_val ;;
2711 esac
2712 case " $ac_configure_args " in
2713 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 esac
2716 fi
2717done
2718if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002719 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2722$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002723 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002725## -------------------- ##
2726## Main body of script. ##
2727## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002728
Guido van Rossum7f43da71994-08-01 12:15:30 +00002729ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002730ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002731ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2732ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2733ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002734
Guido van Rossum627b2d71993-12-24 10:39:16 +00002735
Michael W. Hudson54241132001-12-07 15:38:26 +00002736
Trent Nelson4d4ec652012-10-16 08:51:24 -04002737
Christian Heimesff5be6e2018-01-20 13:19:21 +01002738
2739
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002740if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002741 # If we're building out-of-tree, we need to make sure the following
2742 # resources get picked up before their $srcdir counterparts.
2743 # Objects/ -> typeslots.inc
Lysandros Nikolaou314858e2020-06-20 21:07:25 +03002744 # Include/ -> Python-ast.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002745 # Python/ -> importlib.h
2746 # (A side effect of this is that these resources will automatically be
2747 # regenerated when building out-of-tree, regardless of whether or not
2748 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2749 # off.)
2750 BASECPPFLAGS="-IObjects -IInclude -IPython"
2751else
2752 BASECPPFLAGS=""
2753fi
2754
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755
2756
2757
2758
Victor Stinner9ed34a82017-05-02 22:35:58 +02002759if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761# Extract the first word of "git", so it can be a program name with args.
2762set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2764$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002765if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766 $as_echo_n "(cached) " >&6
2767else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768 if test -n "$HAS_GIT"; then
2769 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770else
2771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2772for as_dir in $PATH
2773do
2774 IFS=$as_save_IFS
2775 test -z "$as_dir" && as_dir=.
2776 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002778 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2780 break 2
2781 fi
2782done
2783 done
2784IFS=$as_save_IFS
2785
Ned Deily5c4b0d02017-03-04 00:19:55 -05002786 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787fi
2788fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002789HAS_GIT=$ac_cv_prog_HAS_GIT
2790if test -n "$HAS_GIT"; then
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2792$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002793else
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2795$as_echo "no" >&6; }
2796fi
2797
2798
2799else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002800HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002801fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002802if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803then
Xiang Zhang4c855572018-08-20 22:36:19 +08002804 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2805 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2806 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002807else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002808 GITVERSION=""
2809 GITTAG=""
2810 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002811fi
2812
2813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002815
2816
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002817ac_aux_dir=
2818for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2819 if test -f "$ac_dir/install-sh"; then
2820 ac_aux_dir=$ac_dir
2821 ac_install_sh="$ac_aux_dir/install-sh -c"
2822 break
2823 elif test -f "$ac_dir/install.sh"; then
2824 ac_aux_dir=$ac_dir
2825 ac_install_sh="$ac_aux_dir/install.sh -c"
2826 break
2827 elif test -f "$ac_dir/shtool"; then
2828 ac_aux_dir=$ac_dir
2829 ac_install_sh="$ac_aux_dir/shtool install -c"
2830 break
2831 fi
2832done
2833if test -z "$ac_aux_dir"; then
2834 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2835fi
2836
2837# These three variables are undocumented and unsupported,
2838# and are intended to be withdrawn in a future Autoconf release.
2839# They can cause serious problems if a builder's source tree is in a directory
2840# whose full name contains unusual characters.
2841ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2842ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2843ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2844
2845
2846# Make sure we can run config.sub.
2847$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2848 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2849
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2851$as_echo_n "checking build system type... " >&6; }
2852if ${ac_cv_build+:} false; then :
2853 $as_echo_n "(cached) " >&6
2854else
2855 ac_build_alias=$build_alias
2856test "x$ac_build_alias" = x &&
2857 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2858test "x$ac_build_alias" = x &&
2859 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2860ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2861 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2862
2863fi
2864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2865$as_echo "$ac_cv_build" >&6; }
2866case $ac_cv_build in
2867*-*-*) ;;
2868*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2869esac
2870build=$ac_cv_build
2871ac_save_IFS=$IFS; IFS='-'
2872set x $ac_cv_build
2873shift
2874build_cpu=$1
2875build_vendor=$2
2876shift; shift
2877# Remember, the first character of IFS is used to create $*,
2878# except with old shells:
2879build_os=$*
2880IFS=$ac_save_IFS
2881case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2882
2883
2884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2885$as_echo_n "checking host system type... " >&6; }
2886if ${ac_cv_host+:} false; then :
2887 $as_echo_n "(cached) " >&6
2888else
2889 if test "x$host_alias" = x; then
2890 ac_cv_host=$ac_cv_build
2891else
2892 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2893 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2894fi
2895
2896fi
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2898$as_echo "$ac_cv_host" >&6; }
2899case $ac_cv_host in
2900*-*-*) ;;
2901*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2902esac
2903host=$ac_cv_host
2904ac_save_IFS=$IFS; IFS='-'
2905set x $ac_cv_host
2906shift
2907host_cpu=$1
2908host_vendor=$2
2909shift; shift
2910# Remember, the first character of IFS is used to create $*,
2911# except with old shells:
2912host_os=$*
2913IFS=$ac_save_IFS
2914case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2915
2916
2917
doko@python.orga10e4a92013-01-25 18:45:12 +01002918
2919
Ned Deilyfcbc2462014-08-22 13:32:49 -07002920# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2921rm -f pybuilddir.txt
2922
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002923for ac_prog in python$PACKAGE_VERSION python3 python
2924do
2925 # Extract the first word of "$ac_prog", so it can be a program name with args.
2926set dummy $ac_prog; ac_word=$2
2927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2928$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002929if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002930 $as_echo_n "(cached) " >&6
2931else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002932 if test -n "$PYTHON_FOR_REGEN"; then
2933 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002934else
2935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2936for as_dir in $PATH
2937do
2938 IFS=$as_save_IFS
2939 test -z "$as_dir" && as_dir=.
2940 for ac_exec_ext in '' $ac_executable_extensions; do
2941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002942 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2944 break 2
2945 fi
2946done
2947 done
2948IFS=$as_save_IFS
2949
2950fi
2951fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002952PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2953if test -n "$PYTHON_FOR_REGEN"; then
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2955$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002956else
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2958$as_echo "no" >&6; }
2959fi
2960
2961
Victor Stinnera5c62a82017-05-03 18:21:48 +02002962 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002963done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002964test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002965
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002966
2967
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002968if test "$cross_compiling" = yes; then
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2970$as_echo_n "checking for python interpreter for cross build... " >&6; }
2971 if test -z "$PYTHON_FOR_BUILD"; then
2972 for interp in python$PACKAGE_VERSION python3 python; do
2973 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002974 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 +02002975 break
2976 fi
2977 interp=
2978 done
2979 if test x$interp = x; then
2980 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2981 fi
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2983$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002984 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 +02002985 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002986elif test "$cross_compiling" = maybe; then
2987 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002988else
2989 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2990fi
2991
2992
Martin v. Löwis11437992002-04-12 09:54:03 +00002993
Benjamin Petersond23f8222009-04-05 19:13:16 +00002994if test "$prefix" != "/"; then
2995 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2996fi
2997
2998
Martin v. Löwis11437992002-04-12 09:54:03 +00002999
3000
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003001# We don't use PACKAGE_ variables, and they cause conflicts
3002# with other autoconf-based packages that include Python.h
3003grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3004rm confdefs.h
3005mv confdefs.h.new confdefs.h
3006
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003007
Pablo Galindod4fe0982020-05-19 03:33:01 +01003008VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003009
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003010# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003011
3012SOVERSION=1.0
3013
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003014# The later defininition of _XOPEN_SOURCE disables certain features
3015# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003018
3019
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003020# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3021# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3022# them.
3023
Matthias Kloseb9621712010-04-24 17:59:49 +00003024$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003025
3026
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003027# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3028# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3029# them.
3030
Matthias Kloseb9621712010-04-24 17:59:49 +00003031$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003032
3033
Martin v. Löwisd6320502004-08-12 13:45:08 +00003034# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003035# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3036# them.
3037
Matthias Kloseb9621712010-04-24 17:59:49 +00003038$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003039
3040
3041
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003042define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003043
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003044# Arguments passed to configure.
3045
3046CONFIG_ARGS="$ac_configure_args"
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3049$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003051if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003052 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053 case $enableval in
3054 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003055 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056 # information
3057 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003058 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3061 if test ! -d "${enableval}"
3062 then
3063 enableval=/
3064 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003066 ;;
3067 esac
3068 case $enableval in
3069 no)
3070 UNIVERSALSDK=
3071 enable_universalsdk=
3072 ;;
3073 *)
3074 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075 if test ! -d "${UNIVERSALSDK}"
3076 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003077 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003078 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003079 ;;
3080 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003081
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083else
3084
3085 UNIVERSALSDK=
3086 enable_universalsdk=
3087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003088fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003090if test -n "${UNIVERSALSDK}"
3091then
Matthias Kloseb9621712010-04-24 17:59:49 +00003092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3093$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003094else
Matthias Kloseb9621712010-04-24 17:59:49 +00003095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3096$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003097fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003099
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003100
Ned Deily87adb6e2013-10-18 21:09:56 -07003101ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003102
Ned Deilycbfb9a52012-06-23 16:02:19 -07003103# For backward compatibility reasons we prefer to select '32-bit' if available,
3104# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003106if test "`uname -s`" = "Darwin"
3107then
3108 if test -n "${UNIVERSALSDK}"
3109 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003110 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003111 then
3112 UNIVERSAL_ARCHS="intel"
3113 fi
3114 fi
3115fi
3116
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003117
Matthias Kloseb9621712010-04-24 17:59:49 +00003118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3119$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120
3121# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003122if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003123 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124 UNIVERSAL_ARCHS="$withval"
3125
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003126fi
3127
Ned Deily87adb6e2013-10-18 21:09:56 -07003128if test -n "${UNIVERSALSDK}"
3129then
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3131$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3132else
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3134$as_echo "no" >&6; }
3135fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003136
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003137
3138# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003140 withval=$with_framework_name;
3141 PYTHONFRAMEWORK=${withval}
3142 PYTHONFRAMEWORKDIR=${withval}.framework
3143 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3144
3145else
3146
3147 PYTHONFRAMEWORK=Python
3148 PYTHONFRAMEWORKDIR=Python.framework
3149 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3150
3151fi
3152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003154if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003155 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003156 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003157 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003158 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003159 esac
3160 case $enableval in
3161 no)
3162 PYTHONFRAMEWORK=
3163 PYTHONFRAMEWORKDIR=no-framework
3164 PYTHONFRAMEWORKPREFIX=
3165 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003166 FRAMEWORKINSTALLFIRST=
3167 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003168 FRAMEWORKALTINSTALLFIRST=
3169 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003170 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003171 if test "x${prefix}" = "xNONE"; then
3172 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3173 else
3174 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3175 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003176 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003177 ;;
3178 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003179 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003182 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003183 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3184 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003185 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003186 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003187
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003188 if test "x${prefix}" = "xNONE" ; then
3189 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003190
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003191 else
3192 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3193 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003194
3195 case "${enableval}" in
3196 /System*)
3197 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3198 if test "${prefix}" = "NONE" ; then
3199 # See below
3200 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3201 fi
3202 ;;
3203
3204 /Library*)
3205 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3206 ;;
3207
3208 */Library/Frameworks)
3209 MDIR="`dirname "${enableval}"`"
3210 MDIR="`dirname "${MDIR}"`"
3211 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3212
3213 if test "${prefix}" = "NONE"; then
3214 # User hasn't specified the
3215 # --prefix option, but wants to install
3216 # the framework in a non-default location,
3217 # ensure that the compatibility links get
3218 # installed relative to that prefix as well
3219 # instead of in /usr/local.
3220 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3221 fi
3222 ;;
3223
3224 *)
3225 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3226 ;;
3227 esac
3228
Jack Jansen127e56e2001-09-11 14:41:54 +00003229 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003235 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3238
3239 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3240
Jack Jansene578a632001-08-15 01:27:14 +00003241 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003242
Guido van Rossum563e7081996-09-10 18:20:48 +00003243else
Martin v. Löwis11437992002-04-12 09:54:03 +00003244
Jack Jansene578a632001-08-15 01:27:14 +00003245 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003246 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003247 PYTHONFRAMEWORKPREFIX=
3248 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003249 FRAMEWORKINSTALLFIRST=
3250 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003251 FRAMEWORKALTINSTALLFIRST=
3252 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003253 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003254 if test "x${prefix}" = "xNONE" ; then
3255 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3256 else
3257 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3258 fi
Jack Jansene578a632001-08-15 01:27:14 +00003259 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003260
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262fi
3263
Thomas Wouters477c8d52006-05-27 19:21:47 +00003264
3265
Michael W. Hudson54241132001-12-07 15:38:26 +00003266
3267
3268
3269
Jack Jansene578a632001-08-15 01:27:14 +00003270
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003271
3272
3273
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003274
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003275
Ned Deilyb8f944f2013-11-21 22:42:25 -08003276
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003277
3278cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003279#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003280_ACEOF
3281
3282
Jack Jansene578a632001-08-15 01:27:14 +00003283##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003284## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003285## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003286##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287# Set name for machine-dependent library files
3288
Matthias Kloseb9621712010-04-24 17:59:49 +00003289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3290$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291if test -z "$MACHDEP"
3292then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003293 # avoid using uname for cross builds
3294 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003295 # ac_sys_system and ac_sys_release are used for setting
3296 # a lot of different things including 'define_xopen_source'
3297 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003299 *-*-linux-android*)
3300 ac_sys_system=Linux-android
3301 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003302 *-*-linux*)
3303 ac_sys_system=Linux
3304 ;;
3305 *-*-cygwin*)
3306 ac_sys_system=Cygwin
3307 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003308 *-*-vxworks*)
3309 ac_sys_system=VxWorks
3310 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003311 *)
3312 # for now, limit cross builds to known configurations
3313 MACHDEP="unknown"
3314 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3315 esac
3316 ac_sys_release=
3317 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003318 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003319 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003320 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003321 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003323 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003324 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003325 fi
3326 ac_md_system=`echo $ac_sys_system |
3327 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3328 ac_md_release=`echo $ac_sys_release |
3329 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3330 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003331
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003332 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003333 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003334 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003335 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003336 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003337 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003338 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003339fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3341$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003342
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003343
3344if test "$cross_compiling" = yes; then
3345 case "$host" in
3346 *-*-linux*)
3347 case "$host_cpu" in
3348 arm*)
3349 _host_cpu=arm
3350 ;;
3351 *)
3352 _host_cpu=$host_cpu
3353 esac
3354 ;;
3355 *-*-cygwin*)
3356 _host_cpu=
3357 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003358 *-*-vxworks*)
3359 _host_cpu=$host_cpu
3360 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003361 *)
3362 # for now, limit cross builds to known configurations
3363 MACHDEP="unknown"
3364 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3365 esac
3366 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3367fi
3368
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003369# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3370# disable features if it is defined, without any means to access these
3371# features as extensions. For these systems, we skip the definition of
3372# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3373# some feature, make sure there is no alternative way to access this
3374# feature. Also, when using wildcards, make sure you have verified the
3375# need for not defining _XOPEN_SOURCE on all systems matching the
3376# wildcard, and that the wildcard does not include future systems
3377# (which may remove their limitations).
3378case $ac_sys_system/$ac_sys_release in
3379 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3380 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003381 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003382 # In addition, Stefan Krah confirms that issue #1244610 exists through
3383 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003384 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003385 define_xopen_source=no
3386 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3387 # also defined. This can be overridden by defining _BSD_SOURCE
3388 # As this has a different meaning on Linux, only define it on OpenBSD
3389
Matthias Kloseb9621712010-04-24 17:59:49 +00003390$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003391
3392 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003393 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003394 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3395 # also defined. This can be overridden by defining _BSD_SOURCE
3396 # As this has a different meaning on Linux, only define it on OpenBSD
3397
Matthias Kloseb9621712010-04-24 17:59:49 +00003398$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003399
3400 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003401 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3402 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3403 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003404 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 +00003405 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003406 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3407 # request to enable features supported by the standard as a request
3408 # to disable features not supported by the standard. The best way
3409 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3410 # entirely and define __EXTENSIONS__ instead.
3411 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003412 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003413 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3414 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003415 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003416 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003417 define_xopen_source=no;;
3418 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003419 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003420 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003421 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003422 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3423 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3424 # identifies itself as Darwin/7.*
3425 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3426 # disables platform specific features beyond repair.
3427 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3428 # has no effect, don't bother defining them
3429 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003430 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003431 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003432 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003433 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3434 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3435 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003436 AIX/4)
3437 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003438 AIX/5)
3439 if test `uname -r` -eq 1; then
3440 define_xopen_source=no
3441 fi
3442 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003443 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3444 # defining NI_NUMERICHOST.
3445 QNX/6.3.2)
3446 define_xopen_source=no
3447 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003448 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3449 # in network headers still using system V types.
3450 VxWorks/*)
3451 define_xopen_source=no
3452 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003453
Ian Nortona9edf442020-02-14 03:09:11 +00003454 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3455 # chroot() and other functions
3456 hp*|HP*)
3457 define_xopen_source=no
3458 ;;
3459
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003460esac
3461
3462if test $define_xopen_source = yes
3463then
Victor Stinner14d098d2011-09-07 22:29:43 +02003464 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Victor Stinner14d098d2011-09-07 22:29:43 +02003466$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003467
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003468
3469 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3470 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3471 # several APIs are not declared. Since this is also needed in some
3472 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003475
3476
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003477
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003478$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003479
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003480fi
3481
Christian Heimes647cd872013-12-07 23:39:33 +01003482# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3483case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003484 hp*|HP*)
3485 define_stdc_a1=yes;;
3486 *)
3487 define_stdc_a1=no;;
3488esac
3489
3490if test $define_stdc_a1 = yes
3491then
Christian Heimes647cd872013-12-07 23:39:33 +01003492
3493$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3494
Christian Heimesb02bcae2013-12-08 15:21:08 +01003495fi
Christian Heimes647cd872013-12-07 23:39:33 +01003496
Jack Jansen6b08a402004-06-03 12:41:45 +00003497# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3498# it may influence the way we can build extensions, so distutils
3499# needs to check it
3500
Thomas Wouters477c8d52006-05-27 19:21:47 +00003501
Jack Jansen6b08a402004-06-03 12:41:45 +00003502CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003503EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003504
Guido van Rossum627b2d71993-12-24 10:39:16 +00003505# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003506
3507# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3508# for debug/optimization stuff. BASECFLAGS is for flags that are required
3509# just to get things to compile and link. Users are free to override OPT
3510# when running configure or make. The build should not break if they do.
3511# BASECFLAGS should generally not be messed with, however.
3512
Guido van Rossum8b131c51995-03-09 14:10:13 +00003513# If the user switches compilers, we can't believe the cache
3514if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3515then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003516 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003517(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003518fi
3519
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003520# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3521# when the compiler supports them, but we don't always want -O2, and
3522# we set -g later.
3523if test -z "$CFLAGS"; then
3524 CFLAGS=
3525fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003526
3527if test "$ac_sys_system" = "Darwin"
3528then
3529 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003530 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003531 # information
3532 if test -z "${CC}"
3533 then
3534 found_gcc=
3535 found_clang=
3536 as_save_IFS=$IFS; IFS=:
3537 for as_dir in $PATH
3538 do
3539 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003540 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003541 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003542 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543 fi
3544 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003545 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003546 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003547 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003548 fi
3549 fi
3550 done
3551 IFS=$as_save_IFS
3552
3553 if test -n "$found_gcc" -a -n "$found_clang"
3554 then
3555 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3556 then
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3558$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3559 CC="$found_clang"
3560 CXX="$found_clang++"
3561 fi
3562
3563
3564 elif test -z "$found_gcc" -a -n "$found_clang"
3565 then
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3567$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3568 CC="$found_clang"
3569 CXX="$found_clang++"
3570
3571 elif test -z "$found_gcc" -a -z "$found_clang"
3572 then
3573 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3574 if test -n "${found_clang}"
3575 then
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3577$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3578 CC="${found_clang}"
3579 CXX="`/usr/bin/xcrun -find clang++`"
3580
3581 # else: use default behaviour
3582 fi
3583 fi
3584 fi
3585fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003586ac_ext=c
3587ac_cpp='$CPP $CPPFLAGS'
3588ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3589ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3590ac_compiler_gnu=$ac_cv_c_compiler_gnu
3591if test -n "$ac_tool_prefix"; then
3592 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3593set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003596if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003598else
3599 if test -n "$CC"; then
3600 ac_cv_prog_CC="$CC" # Let the user override the test.
3601else
Martin v. Löwis11437992002-04-12 09:54:03 +00003602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3603for as_dir in $PATH
3604do
3605 IFS=$as_save_IFS
3606 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 break 2
3612 fi
3613done
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003616
Jack Jansendd19cf82001-12-06 22:36:17 +00003617fi
3618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003619CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003620if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3622$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003623else
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628
Martin v. Löwis11437992002-04-12 09:54:03 +00003629fi
3630if test -z "$ac_cv_prog_CC"; then
3631 ac_ct_CC=$CC
3632 # Extract the first word of "gcc", so it can be a program name with args.
3633set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3635$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003636if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003638else
3639 if test -n "$ac_ct_CC"; then
3640 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3641else
3642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3643for as_dir in $PATH
3644do
3645 IFS=$as_save_IFS
3646 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $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 +00003651 break 2
3652 fi
3653done
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003656
3657fi
3658fi
3659ac_ct_CC=$ac_cv_prog_ac_ct_CC
3660if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3662$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663else
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3665$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003666fi
3667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 if test "x$ac_ct_CC" = x; then
3669 CC=""
3670 else
3671 case $cross_compiling:$ac_tool_warned in
3672yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675ac_tool_warned=yes ;;
3676esac
3677 CC=$ac_ct_CC
3678 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003679else
3680 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003681fi
3682
Jack Jansendd19cf82001-12-06 22:36:17 +00003683if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684 if test -n "$ac_tool_prefix"; then
3685 # 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 +00003686set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3688$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003689if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003691else
3692 if test -n "$CC"; then
3693 ac_cv_prog_CC="$CC" # Let the user override the test.
3694else
Martin v. Löwis11437992002-04-12 09:54:03 +00003695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3696for as_dir in $PATH
3697do
3698 IFS=$as_save_IFS
3699 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 $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 +00003704 break 2
3705 fi
3706done
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003709
3710fi
3711fi
3712CC=$ac_cv_prog_CC
3713if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3715$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003716else
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3718$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003719fi
3720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003723fi
3724if test -z "$CC"; then
3725 # Extract the first word of "cc", so it can be a program name with args.
3726set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3728$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003729if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003731else
3732 if test -n "$CC"; then
3733 ac_cv_prog_CC="$CC" # Let the user override the test.
3734else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3744 ac_prog_rejected=yes
3745 continue
3746 fi
3747 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 $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 +00003749 break 2
3750 fi
3751done
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003754
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755if test $ac_prog_rejected = yes; then
3756 # We found a bogon in the path, so make sure we never use it.
3757 set dummy $ac_cv_prog_CC
3758 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760 # We chose a different compiler from the bogus one.
3761 # However, it has the same basename, so the bogon will be chosen
3762 # first if we set CC to just the basename; use the full file name.
3763 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003764 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003765 fi
3766fi
3767fi
3768fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003769CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3772$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773else
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3775$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776fi
3777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778
Martin v. Löwis11437992002-04-12 09:54:03 +00003779fi
3780if test -z "$CC"; then
3781 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 do
3784 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3785set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3787$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003788if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003790else
3791 if test -n "$CC"; then
3792 ac_cv_prog_CC="$CC" # Let the user override the test.
3793else
Martin v. Löwis11437992002-04-12 09:54:03 +00003794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3795for as_dir in $PATH
3796do
3797 IFS=$as_save_IFS
3798 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 $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 +00003803 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805done
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003808
3809fi
3810fi
3811CC=$ac_cv_prog_CC
3812if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3814$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003815else
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3817$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003818fi
3819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 test -n "$CC" && break
3822 done
3823fi
3824if test -z "$CC"; then
3825 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003827do
3828 # Extract the first word of "$ac_prog", so it can be a program name with args.
3829set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3831$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003832if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003834else
3835 if test -n "$ac_ct_CC"; then
3836 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3837else
3838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839for as_dir in $PATH
3840do
3841 IFS=$as_save_IFS
3842 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 $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 +00003847 break 2
3848 fi
3849done
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853fi
3854fi
3855ac_ct_CC=$ac_cv_prog_ac_ct_CC
3856if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3858$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003859else
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3861$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 test -n "$ac_ct_CC" && break
3866done
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868 if test "x$ac_ct_CC" = x; then
3869 CC=""
3870 else
3871 case $cross_compiling:$ac_tool_warned in
3872yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875ac_tool_warned=yes ;;
3876esac
3877 CC=$ac_ct_CC
3878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
3880
3881fi
3882
3883
Matthias Kloseb9621712010-04-24 17:59:49 +00003884test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003886as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003887See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
3889# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003890$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3891set X $ac_compile
3892ac_compiler=$2
3893for ac_option in --version -v -V -qversion; do
3894 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895case "(($ac_try" in
3896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897 *) ac_try_echo=$ac_try;;
3898esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3900$as_echo "$ac_try_echo"; } >&5
3901 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 if test -s conftest.err; then
3904 sed '10a\
3905... rest of stderr output deleted ...
3906 10q' conftest.err >conftest.er1
3907 cat conftest.er1 >&5
3908 fi
3909 rm -f conftest.er1 conftest.err
3910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3911 test $ac_status = 0; }
3912done
Martin v. Löwis11437992002-04-12 09:54:03 +00003913
Matthias Kloseb9621712010-04-24 17:59:49 +00003914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003915/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003916
Martin v. Löwis11437992002-04-12 09:54:03 +00003917int
3918main ()
3919{
3920
3921 ;
3922 return 0;
3923}
3924_ACEOF
3925ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003926ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003927# Try to create an executable without -o first, disregard a.out.
3928# It will help us diagnose broken compilers, and finding out an intuition
3929# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3931$as_echo_n "checking whether the C compiler works... " >&6; }
3932ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3933
3934# The possible output files:
3935ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937ac_rmfiles=
3938for ac_file in $ac_files
3939do
3940 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3943 esac
3944done
3945rm -f $ac_rmfiles
3946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948case "(($ac_try" in
3949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950 *) ac_try_echo=$ac_try;;
3951esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3953$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3957 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3959# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3960# in a Makefile. We should not override ac_cv_exeext if it was cached,
3961# so that the user can short-circuit this test for compilers unknown to
3962# Autoconf.
3963for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003964do
3965 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003966 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003968 ;;
3969 [ab].out )
3970 # We found the default executable, but exeext='' is most
3971 # certainly right.
3972 break;;
3973 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 then :; else
3976 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3977 fi
3978 # We set ac_cv_exeext here because the later test for it is not
3979 # safe: cross compilers may not add the suffix if given an `-o'
3980 # argument, so we may need to know it at that point already.
3981 # Even if this section looks crufty: it has the advantage of
3982 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983 break;;
3984 * )
3985 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 esac
3987done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988test "$ac_cv_exeext" = no && ac_cv_exeext=
3989
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003990else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991 ac_file=''
3992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003993if test -z "$ac_file"; then :
3994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3995$as_echo "no" >&6; }
3996$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003997sed 's/^/| /' conftest.$ac_ext >&5
3998
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004001as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004002See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004003else
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4005$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4008$as_echo_n "checking for C compiler default output file name... " >&6; }
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4010$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012
Matthias Kloseb9621712010-04-24 17:59:49 +00004013rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4016$as_echo_n "checking for suffix of executables... " >&6; }
4017if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018case "(($ac_try" in
4019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4020 *) ac_try_echo=$ac_try;;
4021esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4023$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4027 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4029# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4030# work properly (i.e., refer to `conftest.exe'), while it won't with
4031# `rm'.
4032for ac_file in conftest.exe conftest conftest.*; do
4033 test -f "$ac_file" || continue
4034 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4037 break;;
4038 * ) break;;
4039 esac
4040done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004041else
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004044as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004045See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004047rm -f conftest conftest$ac_cv_exeext
4048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4049$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050
4051rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004052EXEEXT=$ac_cv_exeext
4053ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4055/* end confdefs.h. */
4056#include <stdio.h>
4057int
4058main ()
4059{
4060FILE *f = fopen ("conftest.out", "w");
4061 return ferror (f) || fclose (f) != 0;
4062
4063 ;
4064 return 0;
4065}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004067ac_clean_files="$ac_clean_files conftest.out"
4068# Check that the compiler produces executables we can run. If not, either
4069# the compiler is broken, or we cross compile.
4070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4071$as_echo_n "checking whether we are cross compiling... " >&6; }
4072if test "$cross_compiling" != yes; then
4073 { { ac_try="$ac_link"
4074case "(($ac_try" in
4075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076 *) ac_try_echo=$ac_try;;
4077esac
4078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079$as_echo "$ac_try_echo"; } >&5
4080 (eval "$ac_link") 2>&5
4081 ac_status=$?
4082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083 test $ac_status = 0; }
4084 if { ac_try='./conftest$ac_cv_exeext'
4085 { { case "(($ac_try" in
4086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087 *) ac_try_echo=$ac_try;;
4088esac
4089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4090$as_echo "$ac_try_echo"; } >&5
4091 (eval "$ac_try") 2>&5
4092 ac_status=$?
4093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4094 test $ac_status = 0; }; }; then
4095 cross_compiling=no
4096 else
4097 if test "$cross_compiling" = maybe; then
4098 cross_compiling=yes
4099 else
4100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004102as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004103If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004104See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 fi
4106 fi
4107fi
4108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4109$as_echo "$cross_compiling" >&6; }
4110
4111rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4112ac_clean_files=$ac_clean_files_save
4113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4114$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004115if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 $as_echo_n "(cached) " >&6
4117else
4118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004119/* end confdefs.h. */
4120
4121int
4122main ()
4123{
4124
4125 ;
4126 return 0;
4127}
4128_ACEOF
4129rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004130if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131case "(($ac_try" in
4132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4133 *) ac_try_echo=$ac_try;;
4134esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004135eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4136$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004138 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4140 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141 for ac_file in conftest.o conftest.obj conftest.*; do
4142 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4146 break;;
4147 esac
4148done
4149else
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004151sed 's/^/| /' conftest.$ac_ext >&5
4152
Matthias Kloseb9621712010-04-24 17:59:49 +00004153{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004155as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004156See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004158rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4161$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004162OBJEXT=$ac_cv_objext
4163ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4165$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004166if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004168else
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004171
Martin v. Löwis11437992002-04-12 09:54:03 +00004172int
4173main ()
4174{
4175#ifndef __GNUC__
4176 choke me
4177#endif
4178
4179 ;
4180 return 0;
4181}
4182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004183if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 ac_compiler_gnu=yes
4185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004189ac_cv_c_compiler_gnu=$ac_compiler_gnu
4190
4191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4193$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4194if test $ac_compiler_gnu = yes; then
4195 GCC=yes
4196else
4197 GCC=
4198fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004199ac_test_CFLAGS=${CFLAGS+set}
4200ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4202$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004203if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004205else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206 ac_save_c_werror_flag=$ac_c_werror_flag
4207 ac_c_werror_flag=yes
4208 ac_cv_prog_cc_g=no
4209 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004212
Martin v. Löwis11437992002-04-12 09:54:03 +00004213int
4214main ()
4215{
4216
4217 ;
4218 return 0;
4219}
4220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004221if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004222 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223else
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 CFLAGS=""
4225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226/* end confdefs.h. */
4227
4228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004236if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237
Matthias Kloseb9621712010-04-24 17:59:49 +00004238else
4239 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242/* end confdefs.h. */
4243
4244int
4245main ()
4246{
4247
4248 ;
4249 return 0;
4250}
4251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4260 ac_c_werror_flag=$ac_save_c_werror_flag
4261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4263$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004264if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004265 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004266elif test $ac_cv_prog_cc_g = yes; then
4267 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004268 CFLAGS="-g -O2"
4269 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271 fi
4272else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273 if test "$GCC" = yes; then
4274 CFLAGS="-O2"
4275 else
4276 CFLAGS=
4277 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4280$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004281if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004282 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004283else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004285ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004287/* end confdefs.h. */
4288#include <stdarg.h>
4289#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004290struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004291/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4292struct buf { int x; };
4293FILE * (*rcsopen) (struct buf *, struct stat *, int);
4294static char *e (p, i)
4295 char **p;
4296 int i;
4297{
4298 return p[i];
4299}
4300static char *f (char * (*g) (char **, int), char **p, ...)
4301{
4302 char *s;
4303 va_list v;
4304 va_start (v,p);
4305 s = g (p, va_arg (v,int));
4306 va_end (v);
4307 return s;
4308}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004309
4310/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4311 function prototypes and stuff, but not '\xHH' hex character constants.
4312 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004314 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4315 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004317int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4320 inside strings and character constants. */
4321#define FOO(x) 'x'
4322int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4323
Skip Montanaro6dead952003-09-25 14:50:04 +00004324int test (int i, double x);
4325struct s1 {int (*f) (int a);};
4326struct s2 {int (*f) (double a);};
4327int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4328int argc;
4329char **argv;
4330int
4331main ()
4332{
4333return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4334 ;
4335 return 0;
4336}
4337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4339 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004340do
4341 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345rm -f core conftest.err conftest.$ac_objext
4346 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004347done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004349CC=$ac_save_CC
4350
4351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352# AC_CACHE_VAL
4353case "x$ac_cv_prog_cc_c89" in
4354 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4356$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4359$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004360 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4363$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004364esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004365if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004366
Matthias Kloseb9621712010-04-24 17:59:49 +00004367fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004368
Martin v. Löwis11437992002-04-12 09:54:03 +00004369ac_ext=c
4370ac_cpp='$CPP $CPPFLAGS'
4371ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4372ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4373ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004374
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004375ac_ext=c
4376ac_cpp='$CPP $CPPFLAGS'
4377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4379ac_compiler_gnu=$ac_cv_c_compiler_gnu
4380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4381$as_echo_n "checking how to run the C preprocessor... " >&6; }
4382# On Suns, sometimes $CPP names a directory.
4383if test -n "$CPP" && test -d "$CPP"; then
4384 CPP=
4385fi
4386if test -z "$CPP"; then
4387 if ${ac_cv_prog_CPP+:} false; then :
4388 $as_echo_n "(cached) " >&6
4389else
4390 # Double quotes because CPP needs to be expanded
4391 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4392 do
4393 ac_preproc_ok=false
4394for ac_c_preproc_warn_flag in '' yes
4395do
4396 # Use a header file that comes with gcc, so configuring glibc
4397 # with a fresh cross-compiler works.
4398 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4399 # <limits.h> exists even on freestanding compilers.
4400 # On the NeXT, cc -E runs the code through the compiler's parser,
4401 # not just through cpp. "Syntax error" is here to catch this case.
4402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4403/* end confdefs.h. */
4404#ifdef __STDC__
4405# include <limits.h>
4406#else
4407# include <assert.h>
4408#endif
4409 Syntax error
4410_ACEOF
4411if ac_fn_c_try_cpp "$LINENO"; then :
4412
4413else
4414 # Broken: fails on valid input.
4415continue
4416fi
4417rm -f conftest.err conftest.i conftest.$ac_ext
4418
4419 # OK, works on sane cases. Now check whether nonexistent headers
4420 # can be detected and how.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
4423#include <ac_nonexistent.h>
4424_ACEOF
4425if ac_fn_c_try_cpp "$LINENO"; then :
4426 # Broken: success on invalid input.
4427continue
4428else
4429 # Passes both tests.
4430ac_preproc_ok=:
4431break
4432fi
4433rm -f conftest.err conftest.i conftest.$ac_ext
4434
4435done
4436# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4437rm -f conftest.i conftest.err conftest.$ac_ext
4438if $ac_preproc_ok; then :
4439 break
4440fi
4441
4442 done
4443 ac_cv_prog_CPP=$CPP
4444
4445fi
4446 CPP=$ac_cv_prog_CPP
4447else
4448 ac_cv_prog_CPP=$CPP
4449fi
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4451$as_echo "$CPP" >&6; }
4452ac_preproc_ok=false
4453for ac_c_preproc_warn_flag in '' yes
4454do
4455 # Use a header file that comes with gcc, so configuring glibc
4456 # with a fresh cross-compiler works.
4457 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4458 # <limits.h> exists even on freestanding compilers.
4459 # On the NeXT, cc -E runs the code through the compiler's parser,
4460 # not just through cpp. "Syntax error" is here to catch this case.
4461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462/* end confdefs.h. */
4463#ifdef __STDC__
4464# include <limits.h>
4465#else
4466# include <assert.h>
4467#endif
4468 Syntax error
4469_ACEOF
4470if ac_fn_c_try_cpp "$LINENO"; then :
4471
4472else
4473 # Broken: fails on valid input.
4474continue
4475fi
4476rm -f conftest.err conftest.i conftest.$ac_ext
4477
4478 # OK, works on sane cases. Now check whether nonexistent headers
4479 # can be detected and how.
4480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4481/* end confdefs.h. */
4482#include <ac_nonexistent.h>
4483_ACEOF
4484if ac_fn_c_try_cpp "$LINENO"; then :
4485 # Broken: success on invalid input.
4486continue
4487else
4488 # Passes both tests.
4489ac_preproc_ok=:
4490break
4491fi
4492rm -f conftest.err conftest.i conftest.$ac_ext
4493
4494done
4495# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4496rm -f conftest.i conftest.err conftest.$ac_ext
4497if $ac_preproc_ok; then :
4498
4499else
4500 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4501$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4502as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4503See \`config.log' for more details" "$LINENO" 5; }
4504fi
4505
4506ac_ext=c
4507ac_cpp='$CPP $CPPFLAGS'
4508ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4509ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4510ac_compiler_gnu=$ac_cv_c_compiler_gnu
4511
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4513$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4514if ${ac_cv_path_GREP+:} false; then :
4515 $as_echo_n "(cached) " >&6
4516else
4517 if test -z "$GREP"; then
4518 ac_path_GREP_found=false
4519 # Loop through the user's path and test for each of PROGNAME-LIST
4520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4521for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4522do
4523 IFS=$as_save_IFS
4524 test -z "$as_dir" && as_dir=.
4525 for ac_prog in grep ggrep; do
4526 for ac_exec_ext in '' $ac_executable_extensions; do
4527 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4528 as_fn_executable_p "$ac_path_GREP" || continue
4529# Check for GNU ac_path_GREP and select it if it is found.
4530 # Check for GNU $ac_path_GREP
4531case `"$ac_path_GREP" --version 2>&1` in
4532*GNU*)
4533 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4534*)
4535 ac_count=0
4536 $as_echo_n 0123456789 >"conftest.in"
4537 while :
4538 do
4539 cat "conftest.in" "conftest.in" >"conftest.tmp"
4540 mv "conftest.tmp" "conftest.in"
4541 cp "conftest.in" "conftest.nl"
4542 $as_echo 'GREP' >> "conftest.nl"
4543 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4544 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4545 as_fn_arith $ac_count + 1 && ac_count=$as_val
4546 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4547 # Best one so far, save it but keep looking for a better one
4548 ac_cv_path_GREP="$ac_path_GREP"
4549 ac_path_GREP_max=$ac_count
4550 fi
4551 # 10*(2^10) chars as input seems more than enough
4552 test $ac_count -gt 10 && break
4553 done
4554 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4555esac
4556
4557 $ac_path_GREP_found && break 3
4558 done
4559 done
4560 done
4561IFS=$as_save_IFS
4562 if test -z "$ac_cv_path_GREP"; then
4563 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4564 fi
4565else
4566 ac_cv_path_GREP=$GREP
4567fi
4568
4569fi
4570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4571$as_echo "$ac_cv_path_GREP" >&6; }
4572 GREP="$ac_cv_path_GREP"
4573
4574
Łukasz Langaa785c872016-09-09 17:37:37 -07004575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4576$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4577if ${ac_cv_path_SED+:} false; then :
4578 $as_echo_n "(cached) " >&6
4579else
4580 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4581 for ac_i in 1 2 3 4 5 6 7; do
4582 ac_script="$ac_script$as_nl$ac_script"
4583 done
4584 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4585 { ac_script=; unset ac_script;}
4586 if test -z "$SED"; then
4587 ac_path_SED_found=false
4588 # Loop through the user's path and test for each of PROGNAME-LIST
4589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590for as_dir in $PATH
4591do
4592 IFS=$as_save_IFS
4593 test -z "$as_dir" && as_dir=.
4594 for ac_prog in sed gsed; do
4595 for ac_exec_ext in '' $ac_executable_extensions; do
4596 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4597 as_fn_executable_p "$ac_path_SED" || continue
4598# Check for GNU ac_path_SED and select it if it is found.
4599 # Check for GNU $ac_path_SED
4600case `"$ac_path_SED" --version 2>&1` in
4601*GNU*)
4602 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4603*)
4604 ac_count=0
4605 $as_echo_n 0123456789 >"conftest.in"
4606 while :
4607 do
4608 cat "conftest.in" "conftest.in" >"conftest.tmp"
4609 mv "conftest.tmp" "conftest.in"
4610 cp "conftest.in" "conftest.nl"
4611 $as_echo '' >> "conftest.nl"
4612 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4613 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4614 as_fn_arith $ac_count + 1 && ac_count=$as_val
4615 if test $ac_count -gt ${ac_path_SED_max-0}; then
4616 # Best one so far, save it but keep looking for a better one
4617 ac_cv_path_SED="$ac_path_SED"
4618 ac_path_SED_max=$ac_count
4619 fi
4620 # 10*(2^10) chars as input seems more than enough
4621 test $ac_count -gt 10 && break
4622 done
4623 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4624esac
4625
4626 $ac_path_SED_found && break 3
4627 done
4628 done
4629 done
4630IFS=$as_save_IFS
4631 if test -z "$ac_cv_path_SED"; then
4632 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4633 fi
4634else
4635 ac_cv_path_SED=$SED
4636fi
4637
4638fi
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4640$as_echo "$ac_cv_path_SED" >&6; }
4641 SED="$ac_cv_path_SED"
4642 rm -f conftest.sed
4643
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004644
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
4646
Matthias Kloseb9621712010-04-24 17:59:49 +00004647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4648$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004650# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004651if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004652 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004653
4654 case $withval in
4655 no) with_cxx_main=no
4656 MAINCC='$(CC)';;
4657 yes) with_cxx_main=yes
4658 MAINCC='$(CXX)';;
4659 *) with_cxx_main=yes
4660 MAINCC=$withval
4661 if test -z "$CXX"
4662 then
4663 CXX=$withval
4664 fi;;
4665 esac
4666else
4667
4668 with_cxx_main=no
4669 MAINCC='$(CC)'
4670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004671fi
4672
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4674$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004675
4676preset_cxx="$CXX"
4677if test -z "$CXX"
4678then
4679 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004680 gcc) if test -n "$ac_tool_prefix"; then
4681 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4682set dummy ${ac_tool_prefix}g++; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_CXX+:} false; then :
4686 $as_echo_n "(cached) " >&6
4687else
4688 case $CXX in
4689 [\\/]* | ?:[\\/]*)
4690 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4691 ;;
4692 *)
4693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in notfound
4695do
4696 IFS=$as_save_IFS
4697 test -z "$as_dir" && as_dir=.
4698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004700 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702 break 2
4703 fi
4704done
4705 done
4706IFS=$as_save_IFS
4707
4708 ;;
4709esac
4710fi
4711CXX=$ac_cv_path_CXX
4712if test -n "$CXX"; then
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4714$as_echo "$CXX" >&6; }
4715else
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721fi
4722if test -z "$ac_cv_path_CXX"; then
4723 ac_pt_CXX=$CXX
4724 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4727$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004728if ${ac_cv_path_ac_pt_CXX+:} false; then :
4729 $as_echo_n "(cached) " >&6
4730else
4731 case $ac_pt_CXX in
4732 [\\/]* | ?:[\\/]*)
4733 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4734 ;;
4735 *)
4736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4737for as_dir in notfound
4738do
4739 IFS=$as_save_IFS
4740 test -z "$as_dir" && as_dir=.
4741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004743 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4744 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4745 break 2
4746 fi
4747done
4748 done
4749IFS=$as_save_IFS
4750
4751 ;;
4752esac
4753fi
4754ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4755if test -n "$ac_pt_CXX"; then
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4757$as_echo "$ac_pt_CXX" >&6; }
4758else
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4760$as_echo "no" >&6; }
4761fi
4762
4763 if test "x$ac_pt_CXX" = x; then
4764 CXX="g++"
4765 else
4766 case $cross_compiling:$ac_tool_warned in
4767yes:)
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4769$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4770ac_tool_warned=yes ;;
4771esac
4772 CXX=$ac_pt_CXX
4773 fi
4774else
4775 CXX="$ac_cv_path_CXX"
4776fi
4777 ;;
4778 cc) if test -n "$ac_tool_prefix"; then
4779 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4780set dummy ${ac_tool_prefix}c++; ac_word=$2
4781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4782$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004783if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785else
4786 case $CXX in
4787 [\\/]* | ?:[\\/]*)
4788 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4789 ;;
4790 *)
4791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4792for as_dir in notfound
4793do
4794 IFS=$as_save_IFS
4795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800 break 2
4801 fi
4802done
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004804IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806 ;;
4807esac
4808fi
4809CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004810if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4812$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004813else
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4815$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004817
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818
4819fi
4820if test -z "$ac_cv_path_CXX"; then
4821 ac_pt_CXX=$CXX
4822 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004831 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 +00004832 ;;
4833 *)
4834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in notfound
4836do
4837 IFS=$as_save_IFS
4838 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004841 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843 break 2
4844 fi
4845done
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004847IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 ;;
4850esac
4851fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004852ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4853if test -n "$ac_pt_CXX"; then
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4855$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004856else
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004860
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004861 if test "x$ac_pt_CXX" = x; then
4862 CXX="c++"
4863 else
4864 case $cross_compiling:$ac_tool_warned in
4865yes:)
4866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4868ac_tool_warned=yes ;;
4869esac
4870 CXX=$ac_pt_CXX
4871 fi
4872else
4873 CXX="$ac_cv_path_CXX"
4874fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004875 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876 clang|*/clang) if test -n "$ac_tool_prefix"; then
4877 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4878set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4880$as_echo_n "checking for $ac_word... " >&6; }
4881if ${ac_cv_path_CXX+:} false; then :
4882 $as_echo_n "(cached) " >&6
4883else
4884 case $CXX in
4885 [\\/]* | ?:[\\/]*)
4886 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4887 ;;
4888 *)
4889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4890for as_dir in notfound
4891do
4892 IFS=$as_save_IFS
4893 test -z "$as_dir" && as_dir=.
4894 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004896 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4898 break 2
4899 fi
4900done
4901 done
4902IFS=$as_save_IFS
4903
Ned Deilycbfb9a52012-06-23 16:02:19 -07004904 ;;
4905esac
4906fi
4907CXX=$ac_cv_path_CXX
4908if test -n "$CXX"; then
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4910$as_echo "$CXX" >&6; }
4911else
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4913$as_echo "no" >&6; }
4914fi
4915
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004916
4917fi
4918if test -z "$ac_cv_path_CXX"; then
4919 ac_pt_CXX=$CXX
4920 # Extract the first word of "clang++", so it can be a program name with args.
4921set dummy clang++; ac_word=$2
4922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4923$as_echo_n "checking for $ac_word... " >&6; }
4924if ${ac_cv_path_ac_pt_CXX+:} false; then :
4925 $as_echo_n "(cached) " >&6
4926else
4927 case $ac_pt_CXX in
4928 [\\/]* | ?:[\\/]*)
4929 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4930 ;;
4931 *)
4932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4933for as_dir in notfound
4934do
4935 IFS=$as_save_IFS
4936 test -z "$as_dir" && as_dir=.
4937 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004939 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4941 break 2
4942 fi
4943done
4944 done
4945IFS=$as_save_IFS
4946
4947 ;;
4948esac
4949fi
4950ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4951if test -n "$ac_pt_CXX"; then
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4953$as_echo "$ac_pt_CXX" >&6; }
4954else
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4956$as_echo "no" >&6; }
4957fi
4958
4959 if test "x$ac_pt_CXX" = x; then
4960 CXX="clang++"
4961 else
4962 case $cross_compiling:$ac_tool_warned in
4963yes:)
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4965$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4966ac_tool_warned=yes ;;
4967esac
4968 CXX=$ac_pt_CXX
4969 fi
4970else
4971 CXX="$ac_cv_path_CXX"
4972fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004973 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004974 icc|*/icc) if test -n "$ac_tool_prefix"; then
4975 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4976set dummy ${ac_tool_prefix}icpc; ac_word=$2
4977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4978$as_echo_n "checking for $ac_word... " >&6; }
4979if ${ac_cv_path_CXX+:} false; then :
4980 $as_echo_n "(cached) " >&6
4981else
4982 case $CXX in
4983 [\\/]* | ?:[\\/]*)
4984 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4985 ;;
4986 *)
4987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4988for as_dir in notfound
4989do
4990 IFS=$as_save_IFS
4991 test -z "$as_dir" && as_dir=.
4992 for ac_exec_ext in '' $ac_executable_extensions; do
4993 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4994 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4996 break 2
4997 fi
4998done
4999 done
5000IFS=$as_save_IFS
5001
5002 ;;
5003esac
5004fi
5005CXX=$ac_cv_path_CXX
5006if test -n "$CXX"; then
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5008$as_echo "$CXX" >&6; }
5009else
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5011$as_echo "no" >&6; }
5012fi
5013
5014
5015fi
5016if test -z "$ac_cv_path_CXX"; then
5017 ac_pt_CXX=$CXX
5018 # Extract the first word of "icpc", so it can be a program name with args.
5019set dummy icpc; ac_word=$2
5020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
5022if ${ac_cv_path_ac_pt_CXX+:} false; then :
5023 $as_echo_n "(cached) " >&6
5024else
5025 case $ac_pt_CXX in
5026 [\\/]* | ?:[\\/]*)
5027 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5028 ;;
5029 *)
5030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in notfound
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
5035 for ac_exec_ext in '' $ac_executable_extensions; do
5036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5037 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5039 break 2
5040 fi
5041done
5042 done
5043IFS=$as_save_IFS
5044
5045 ;;
5046esac
5047fi
5048ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5049if test -n "$ac_pt_CXX"; then
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5051$as_echo "$ac_pt_CXX" >&6; }
5052else
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5054$as_echo "no" >&6; }
5055fi
5056
5057 if test "x$ac_pt_CXX" = x; then
5058 CXX="icpc"
5059 else
5060 case $cross_compiling:$ac_tool_warned in
5061yes:)
5062{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5063$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5064ac_tool_warned=yes ;;
5065esac
5066 CXX=$ac_pt_CXX
5067 fi
5068else
5069 CXX="$ac_cv_path_CXX"
5070fi
5071 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005072 esac
5073 if test "$CXX" = "notfound"
5074 then
5075 CXX=""
5076 fi
5077fi
5078if test -z "$CXX"
5079then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 if test -n "$ac_tool_prefix"; then
5081 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5082 do
5083 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5084set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005087if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089else
5090 if test -n "$CXX"; then
5091 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5092else
5093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096 IFS=$as_save_IFS
5097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005100 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102 break 2
5103 fi
5104done
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107
5108fi
5109fi
5110CXX=$ac_cv_prog_CXX
5111if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5113$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114else
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005117fi
5118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005119
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005120 test -n "$CXX" && break
5121 done
5122fi
5123if test -z "$CXX"; then
5124 ac_ct_CXX=$CXX
5125 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5126do
5127 # Extract the first word of "$ac_prog", so it can be a program name with args.
5128set dummy $ac_prog; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5132 $as_echo_n "(cached) " >&6
5133else
5134 if test -n "$ac_ct_CXX"; then
5135 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5136else
5137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140 IFS=$as_save_IFS
5141 test -z "$as_dir" && as_dir=.
5142 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005144 ac_cv_prog_ac_ct_CXX="$ac_prog"
5145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146 break 2
5147 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005148done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005149 done
5150IFS=$as_save_IFS
5151
5152fi
5153fi
5154ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5155if test -n "$ac_ct_CXX"; then
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5157$as_echo "$ac_ct_CXX" >&6; }
5158else
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
5161fi
5162
5163
5164 test -n "$ac_ct_CXX" && break
5165done
5166
5167 if test "x$ac_ct_CXX" = x; then
5168 CXX="notfound"
5169 else
5170 case $cross_compiling:$ac_tool_warned in
5171yes:)
5172{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5173$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5174ac_tool_warned=yes ;;
5175esac
5176 CXX=$ac_ct_CXX
5177 fi
5178fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179
5180 if test "$CXX" = "notfound"
5181 then
5182 CXX=""
5183 fi
5184fi
5185if test "$preset_cxx" != "$CXX"
5186then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005187 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005188
5189 By default, distutils will build C++ extension modules with \"$CXX\".
5190 If this is not intended, then set CXX on the configure command line.
5191 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005192$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193
5194 By default, distutils will build C++ extension modules with \"$CXX\".
5195 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005196 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005197fi
5198
5199
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5201
5202
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5204$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5205cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005206#undef bfin
5207#undef cris
5208#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005209#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005210#undef hppa
5211#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005212#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005213#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005214#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005215#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005216#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005217#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005218 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005219#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005220# if defined(__x86_64__) && defined(__LP64__)
5221 x86_64-linux-gnu
5222# elif defined(__x86_64__) && defined(__ILP32__)
5223 x86_64-linux-gnux32
5224# elif defined(__i386__)
5225 i386-linux-gnu
5226# elif defined(__aarch64__) && defined(__AARCH64EL__)
5227# if defined(__ILP32__)
5228 aarch64_ilp32-linux-gnu
5229# else
5230 aarch64-linux-gnu
5231# endif
5232# elif defined(__aarch64__) && defined(__AARCH64EB__)
5233# if defined(__ILP32__)
5234 aarch64_be_ilp32-linux-gnu
5235# else
5236 aarch64_be-linux-gnu
5237# endif
5238# elif defined(__alpha__)
5239 alpha-linux-gnu
5240# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5241# if defined(__ARMEL__)
5242 arm-linux-gnueabihf
5243# else
5244 armeb-linux-gnueabihf
5245# endif
5246# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5247# if defined(__ARMEL__)
5248 arm-linux-gnueabi
5249# else
5250 armeb-linux-gnueabi
5251# endif
5252# elif defined(__hppa__)
5253 hppa-linux-gnu
5254# elif defined(__ia64__)
5255 ia64-linux-gnu
5256# elif defined(__m68k__) && !defined(__mcoldfire__)
5257 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005258# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5259# if _MIPS_SIM == _ABIO32
5260 mipsisa32r6el-linux-gnu
5261# elif _MIPS_SIM == _ABIN32
5262 mipsisa64r6el-linux-gnuabin32
5263# elif _MIPS_SIM == _ABI64
5264 mipsisa64r6el-linux-gnuabi64
5265# else
5266# error unknown platform triplet
5267# endif
5268# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5269# if _MIPS_SIM == _ABIO32
5270 mipsisa32r6-linux-gnu
5271# elif _MIPS_SIM == _ABIN32
5272 mipsisa64r6-linux-gnuabin32
5273# elif _MIPS_SIM == _ABI64
5274 mipsisa64r6-linux-gnuabi64
5275# else
5276# error unknown platform triplet
5277# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005278# elif defined(__mips_hard_float) && defined(_MIPSEL)
5279# if _MIPS_SIM == _ABIO32
5280 mipsel-linux-gnu
5281# elif _MIPS_SIM == _ABIN32
5282 mips64el-linux-gnuabin32
5283# elif _MIPS_SIM == _ABI64
5284 mips64el-linux-gnuabi64
5285# else
5286# error unknown platform triplet
5287# endif
5288# elif defined(__mips_hard_float)
5289# if _MIPS_SIM == _ABIO32
5290 mips-linux-gnu
5291# elif _MIPS_SIM == _ABIN32
5292 mips64-linux-gnuabin32
5293# elif _MIPS_SIM == _ABI64
5294 mips64-linux-gnuabi64
5295# else
5296# error unknown platform triplet
5297# endif
5298# elif defined(__or1k__)
5299 or1k-linux-gnu
5300# elif defined(__powerpc__) && defined(__SPE__)
5301 powerpc-linux-gnuspe
5302# elif defined(__powerpc64__)
5303# if defined(__LITTLE_ENDIAN__)
5304 powerpc64le-linux-gnu
5305# else
5306 powerpc64-linux-gnu
5307# endif
5308# elif defined(__powerpc__)
5309 powerpc-linux-gnu
5310# elif defined(__s390x__)
5311 s390x-linux-gnu
5312# elif defined(__s390__)
5313 s390-linux-gnu
5314# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5315 sh4-linux-gnu
5316# elif defined(__sparc__) && defined(__arch64__)
5317 sparc64-linux-gnu
5318# elif defined(__sparc__)
5319 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005320# elif defined(__riscv)
5321# if __riscv_xlen == 32
5322 riscv32-linux-gnu
5323# elif __riscv_xlen == 64
5324 riscv64-linux-gnu
5325# else
5326# error unknown platform triplet
5327# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328# else
5329# error unknown platform triplet
5330# endif
5331#elif defined(__FreeBSD_kernel__)
5332# if defined(__LP64__)
5333 x86_64-kfreebsd-gnu
5334# elif defined(__i386__)
5335 i386-kfreebsd-gnu
5336# else
5337# error unknown platform triplet
5338# endif
5339#elif defined(__gnu_hurd__)
5340 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005341#elif defined(__APPLE__)
5342 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005343#elif defined(__VXWORKS__)
5344 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005345#else
5346# error unknown platform triplet
5347#endif
5348
5349EOF
5350
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005351if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005352 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5354$as_echo "$PLATFORM_TRIPLET" >&6; }
5355else
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5357$as_echo "none" >&6; }
5358fi
5359rm -f conftest.c conftest.out
5360
5361if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5362 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5363 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5364 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005365elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5366 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005367fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005368
doko@ubuntu.com55532312016-06-14 08:55:19 +02005369if test x$MULTIARCH != x; then
5370 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5371fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005372
5373
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5375$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5376save_LDFLAGS="$LDFLAGS"
5377LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005378
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5380/* end confdefs.h. */
5381
5382int
5383main ()
5384{
5385
5386 ;
5387 return 0;
5388}
5389_ACEOF
5390if ac_fn_c_try_link "$LINENO"; then :
5391 NO_AS_NEEDED="-Wl,--no-as-needed"
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5393$as_echo "yes" >&6; }
5394else
5395 NO_AS_NEEDED=""
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399rm -f core conftest.err conftest.$ac_objext \
5400 conftest$ac_exeext conftest.$ac_ext
5401LDFLAGS="$save_LDFLAGS"
5402
5403
5404
5405# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5408$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005409if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411else
5412 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5413 then ac_cv_path_EGREP="$GREP -E"
5414 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 # Loop through the user's path and test for each of PROGNAME-LIST
5418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5420do
5421 IFS=$as_save_IFS
5422 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 for ac_prog in egrep; do
5424 for ac_exec_ext in '' $ac_executable_extensions; do
5425 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005426 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005427# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 # Check for GNU $ac_path_EGREP
5429case `"$ac_path_EGREP" --version 2>&1` in
5430*GNU*)
5431 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5432*)
5433 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 while :
5436 do
5437 cat "conftest.in" "conftest.in" >"conftest.tmp"
5438 mv "conftest.tmp" "conftest.in"
5439 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005440 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5442 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5445 # Best one so far, save it but keep looking for a better one
5446 ac_cv_path_EGREP="$ac_path_EGREP"
5447 ac_path_EGREP_max=$ac_count
5448 fi
5449 # 10*(2^10) chars as input seems more than enough
5450 test $ac_count -gt 10 && break
5451 done
5452 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5453esac
5454
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 $ac_path_EGREP_found && break 3
5456 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005461 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 +00005462 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005463else
5464 ac_cv_path_EGREP=$EGREP
5465fi
5466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005467 fi
5468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5470$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005471 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005472
5473
Matthias Kloseb9621712010-04-24 17:59:49 +00005474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5475$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005476if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005477 $as_echo_n "(cached) " >&6
5478else
5479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005480/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005481#include <stdlib.h>
5482#include <stdarg.h>
5483#include <string.h>
5484#include <float.h>
5485
5486int
5487main ()
5488{
5489
5490 ;
5491 return 0;
5492}
5493_ACEOF
5494if ac_fn_c_try_compile "$LINENO"; then :
5495 ac_cv_header_stdc=yes
5496else
5497 ac_cv_header_stdc=no
5498fi
5499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5500
5501if test $ac_cv_header_stdc = yes; then
5502 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5504/* end confdefs.h. */
5505#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005506
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005507_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005509 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005511else
Matthias Kloseb9621712010-04-24 17:59:49 +00005512 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005513fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005514rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515
Matthias Kloseb9621712010-04-24 17:59:49 +00005516fi
5517
5518if test $ac_cv_header_stdc = yes; then
5519 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521/* end confdefs.h. */
5522#include <stdlib.h>
5523
5524_ACEOF
5525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5526 $EGREP "free" >/dev/null 2>&1; then :
5527
5528else
5529 ac_cv_header_stdc=no
5530fi
5531rm -f conftest*
5532
5533fi
5534
5535if test $ac_cv_header_stdc = yes; then
5536 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5537 if test "$cross_compiling" = yes; then :
5538 :
5539else
5540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5541/* end confdefs.h. */
5542#include <ctype.h>
5543#include <stdlib.h>
5544#if ((' ' & 0x0FF) == 0x020)
5545# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5546# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5547#else
5548# define ISLOWER(c) \
5549 (('a' <= (c) && (c) <= 'i') \
5550 || ('j' <= (c) && (c) <= 'r') \
5551 || ('s' <= (c) && (c) <= 'z'))
5552# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5553#endif
5554
5555#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5556int
5557main ()
5558{
5559 int i;
5560 for (i = 0; i < 256; i++)
5561 if (XOR (islower (i), ISLOWER (i))
5562 || toupper (i) != TOUPPER (i))
5563 return 2;
5564 return 0;
5565}
5566_ACEOF
5567if ac_fn_c_try_run "$LINENO"; then :
5568
5569else
5570 ac_cv_header_stdc=no
5571fi
5572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5573 conftest.$ac_objext conftest.beam conftest.$ac_ext
5574fi
5575
5576fi
5577fi
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5579$as_echo "$ac_cv_header_stdc" >&6; }
5580if test $ac_cv_header_stdc = yes; then
5581
5582$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5583
5584fi
5585
5586# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5587for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5588 inttypes.h stdint.h unistd.h
5589do :
5590 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5591ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5592"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005593if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 cat >>confdefs.h <<_ACEOF
5595#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5596_ACEOF
5597
5598fi
5599
5600done
5601
5602
5603
5604 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 +02005605if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005606 MINIX=yes
5607else
5608 MINIX=
5609fi
5610
5611
5612 if test "$MINIX" = yes; then
5613
5614$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5615
5616
5617$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5618
5619
5620$as_echo "#define _MINIX 1" >>confdefs.h
5621
5622 fi
5623
5624
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5626$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005627if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005628 $as_echo_n "(cached) " >&6
5629else
5630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5631/* end confdefs.h. */
5632
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005633# define __EXTENSIONS__ 1
5634 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005635int
5636main ()
5637{
5638
5639 ;
5640 return 0;
5641}
5642_ACEOF
5643if ac_fn_c_try_compile "$LINENO"; then :
5644 ac_cv_safe_to_define___extensions__=yes
5645else
5646 ac_cv_safe_to_define___extensions__=no
5647fi
5648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5649fi
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5651$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5652 test $ac_cv_safe_to_define___extensions__ = yes &&
5653 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5654
5655 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5656
5657 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5658
5659 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5660
5661 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5662
5663
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664
Xavier de Gaye95750b12016-07-09 11:05:42 +02005665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5666$as_echo_n "checking for the Android API level... " >&6; }
5667cat >> conftest.c <<EOF
5668#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005669android_api = __ANDROID_API__
5670arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005671#else
5672#error not Android
5673#endif
5674EOF
5675
5676if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005677 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5678 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5680$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005681 if test -z "$ANDROID_API_LEVEL"; then
5682 echo 'Fatal: you must define __ANDROID_API__'
5683 exit 1
5684 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005685
5686cat >>confdefs.h <<_ACEOF
5687#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5688_ACEOF
5689
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005690
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5692$as_echo_n "checking for the Android arm ABI... " >&6; }
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5694$as_echo "$_arm_arch" >&6; }
5695 if test "$_arm_arch" = 7; then
5696 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5697 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5698 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005699else
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5701$as_echo "not Android" >&6; }
5702fi
5703rm -f conftest.c conftest.out
5704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705# Check for unsupported systems
5706case $ac_sys_system/$ac_sys_release in
5707atheos*|Linux*/1*)
5708 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5709 echo See README for details.
5710 exit 1;;
5711esac
5712
5713
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5715$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005718if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719 withval=$with_suffix;
5720 case $withval in
5721 no) EXEEXT=;;
5722 yes) EXEEXT=.exe;;
5723 *) EXEEXT=$withval;;
5724 esac
5725fi
5726
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5728$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729
5730# Test whether we're running on a non-case-sensitive system, in which
5731# case we give a warning if no ext is given
5732
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5734$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735if test ! -d CaseSensitiveTestDir; then
5736mkdir CaseSensitiveTestDir
5737fi
5738
5739if test -d casesensitivetestdir
5740then
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5742$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 BUILDEXEEXT=.exe
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5746$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747 BUILDEXEEXT=$EXEEXT
5748fi
5749rmdir CaseSensitiveTestDir
5750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751case $ac_sys_system in
5752hp*|HP*)
5753 case $CC in
5754 cc|*/cc) CC="$CC -Ae";;
5755 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756esac
5757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5760$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761if test -z "$LIBRARY"
5762then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005763 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5766$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767
5768# LDLIBRARY is the name of the library to link against (as opposed to the
5769# name of the library into which to insert object files). BLDLIBRARY is also
5770# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5771# is blank as the main program is not linked directly against LDLIBRARY.
5772# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5773# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5774# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5775# DLLLIBRARY is the shared (i.e., DLL) library.
5776#
5777# RUNSHARED is used to run shared python without installed libraries
5778#
5779# INSTSONAME is the name of the shared library that will be use to install
5780# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005781#
5782# LDVERSION is the shared library version number, normally the Python version
5783# with the ABI build flags appended.
5784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785
5786
5787
5788
5789
5790
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792LDLIBRARY="$LIBRARY"
5793BLDLIBRARY='$(LDLIBRARY)'
5794INSTSONAME='$(LDLIBRARY)'
5795DLLLIBRARY=''
5796LDLIBRARYDIR=''
5797RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005798LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799
5800# LINKCC is the command that links the python executable -- default is $(CC).
5801# If CXX is set, and if it is needed to link a main function that was
5802# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5803# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5806$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807if test -z "$LINKCC"
5808then
5809 LINKCC='$(PURIFY) $(MAINCC)'
5810 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 QNX*)
5812 # qcc must be used because the other compilers do not
5813 # support -N.
5814 LINKCC=qcc;;
5815 esac
5816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5818$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
Stefan Krahe6dcd372020-08-29 17:00:08 +02005820# EXPORTSYMS holds the list of exported symbols for AIX.
5821# EXPORTSFROM holds the module name exporting symbols on AIX.
5822EXPORTSYMS=
5823EXPORTSFROM=
5824
5825
5826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5827$as_echo_n "checking EXPORTSYMS... " >&6; }
5828case $ac_sys_system in
5829AIX*)
5830 EXPORTSYMS="Modules/python.exp"
5831 if test $ac_sys_release -ge 5 -o \
5832 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5833 EXPORTSFROM=. # the main executable
5834 fi
5835 ;;
5836esac
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5838$as_echo "$EXPORTSYMS" >&6; }
5839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5841# make sure we default having it set to "no": this is used by
5842# distutils.unixccompiler to know if it should add --enable-new-dtags
5843# to linker command lines, and failing to detect GNU ld simply results
5844# in the same bahaviour as before.
5845
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5847$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848ac_prog=ld
5849if test "$GCC" = yes; then
5850 ac_prog=`$CC -print-prog-name=ld`
5851fi
5852case `"$ac_prog" -V 2>&1 < /dev/null` in
5853 *GNU*)
5854 GNULD=yes;;
5855 *)
5856 GNULD=no;;
5857esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5859$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
Matthias Kloseb9621712010-04-24 17:59:49 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5862$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 enableval=$enable_shared;
5866fi
5867
5868
5869if test -z "$enable_shared"
5870then
5871 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005872 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 enable_shared="yes";;
5874 *)
5875 enable_shared="no";;
5876 esac
5877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5879$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880
Matthias Kloseb9621712010-04-24 17:59:49 +00005881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5882$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005884if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005885 enableval=$enable_profiling;
5886fi
5887
5888if test "x$enable_profiling" = xyes; then
5889 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005890 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892/* end confdefs.h. */
5893int main() { return 0; }
5894_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005895if ac_fn_c_try_link "$LINENO"; then :
5896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005898 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005900rm -f core conftest.err conftest.$ac_objext \
5901 conftest$ac_exeext conftest.$ac_ext
5902 CC="$ac_save_cc"
5903else
5904 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5907$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
doko@ubuntu.comba015832012-06-30 16:52:05 +02005909if test "x$enable_profiling" = xyes; then
5910 BASECFLAGS="-pg $BASECFLAGS"
5911 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912fi
5913
Matthias Kloseb9621712010-04-24 17:59:49 +00005914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5915$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916
5917# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5918# library that we build, but we do not want to link against it (we
5919# will find it with a -framework option). For this reason there is an
5920# extra variable BLDLIBRARY against which Python and the extension
5921# modules are linked, BLDLIBRARY. This is normally the same as
5922# LDLIBRARY, but empty for MacOSX framework builds.
5923if test "$enable_framework"
5924then
5925 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 BLDLIBRARY=''
5928else
5929 BLDLIBRARY='$(LDLIBRARY)'
5930fi
5931
5932# Other platforms follow
5933if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005934 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
Matthias Kloseb9621712010-04-24 17:59:49 +00005936$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937
5938 case $ac_sys_system in
5939 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).dll.a'
5941 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 ;;
5943 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005944 LDLIBRARY='libpython$(LDVERSION).so'
5945 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005946 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005948 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005949 then
5950 PY3LIBRARY=libpython3.so
5951 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005953 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005954 LDLIBRARY='libpython$(LDVERSION).so'
5955 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005956 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005958 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005959 then
5960 PY3LIBRARY=libpython3.so
5961 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 hp*|HP*)
5964 case `uname -m` in
5965 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005966 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 ;;
5968 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005969 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 ;;
5971 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005973 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005976 LDLIBRARY='libpython$(LDVERSION).dylib'
5977 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005978 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005980 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005981 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005982 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005983 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984
5985 esac
5986else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005987 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 case $ac_sys_system in
5989 CYGWIN*)
5990 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005991 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 ;;
5993 esac
5994fi
5995
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005996if test "$cross_compiling" = yes; then
5997 RUNSHARED=
5998fi
5999
Matthias Kloseb9621712010-04-24 17:59:49 +00006000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6001$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006004if test -n "$ac_tool_prefix"; then
6005 for ac_prog in ar aal
6006 do
6007 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6008set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6010$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006011if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013else
6014 if test -n "$AR"; then
6015 ac_cv_prog_AR="$AR" # Let the user override the test.
6016else
6017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6018for as_dir in $PATH
6019do
6020 IFS=$as_save_IFS
6021 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006024 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026 break 2
6027 fi
6028done
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030IFS=$as_save_IFS
6031
6032fi
6033fi
6034AR=$ac_cv_prog_AR
6035if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6037$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038else
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041fi
6042
6043
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006044 test -n "$AR" && break
6045 done
6046fi
6047if test -z "$AR"; then
6048 ac_ct_AR=$AR
6049 for ac_prog in ar aal
6050do
6051 # Extract the first word of "$ac_prog", so it can be a program name with args.
6052set dummy $ac_prog; ac_word=$2
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054$as_echo_n "checking for $ac_word... " >&6; }
6055if ${ac_cv_prog_ac_ct_AR+:} false; then :
6056 $as_echo_n "(cached) " >&6
6057else
6058 if test -n "$ac_ct_AR"; then
6059 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6060else
6061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH
6063do
6064 IFS=$as_save_IFS
6065 test -z "$as_dir" && as_dir=.
6066 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006068 ac_cv_prog_ac_ct_AR="$ac_prog"
6069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6070 break 2
6071 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006073 done
6074IFS=$as_save_IFS
6075
6076fi
6077fi
6078ac_ct_AR=$ac_cv_prog_ac_ct_AR
6079if test -n "$ac_ct_AR"; then
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6081$as_echo "$ac_ct_AR" >&6; }
6082else
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088 test -n "$ac_ct_AR" && break
6089done
6090
6091 if test "x$ac_ct_AR" = x; then
6092 AR="ar"
6093 else
6094 case $cross_compiling:$ac_tool_warned in
6095yes:)
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6098ac_tool_warned=yes ;;
6099esac
6100 AR=$ac_ct_AR
6101 fi
6102fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103
6104
6105# tweak ARFLAGS only if the user didn't set it on the command line
6106
6107if test -z "$ARFLAGS"
6108then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006109 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110fi
6111
doko@ubuntu.com58844492012-06-30 18:25:32 +02006112if test -n "$ac_tool_prefix"; then
6113 for ac_prog in readelf
6114 do
6115 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6116set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118$as_echo_n "checking for $ac_word... " >&6; }
6119if ${ac_cv_prog_READELF+:} false; then :
6120 $as_echo_n "(cached) " >&6
6121else
6122 if test -n "$READELF"; then
6123 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6124else
6125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6126for as_dir in $PATH
6127do
6128 IFS=$as_save_IFS
6129 test -z "$as_dir" && as_dir=.
6130 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006132 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6134 break 2
6135 fi
6136done
6137 done
6138IFS=$as_save_IFS
6139
6140fi
6141fi
6142READELF=$ac_cv_prog_READELF
6143if test -n "$READELF"; then
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6145$as_echo "$READELF" >&6; }
6146else
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148$as_echo "no" >&6; }
6149fi
6150
6151
6152 test -n "$READELF" && break
6153 done
6154fi
6155if test -z "$READELF"; then
6156 ac_ct_READELF=$READELF
6157 for ac_prog in readelf
6158do
6159 # Extract the first word of "$ac_prog", so it can be a program name with args.
6160set dummy $ac_prog; ac_word=$2
6161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6162$as_echo_n "checking for $ac_word... " >&6; }
6163if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6164 $as_echo_n "(cached) " >&6
6165else
6166 if test -n "$ac_ct_READELF"; then
6167 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6168else
6169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH
6171do
6172 IFS=$as_save_IFS
6173 test -z "$as_dir" && as_dir=.
6174 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006176 ac_cv_prog_ac_ct_READELF="$ac_prog"
6177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6178 break 2
6179 fi
6180done
6181 done
6182IFS=$as_save_IFS
6183
6184fi
6185fi
6186ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6187if test -n "$ac_ct_READELF"; then
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6189$as_echo "$ac_ct_READELF" >&6; }
6190else
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6192$as_echo "no" >&6; }
6193fi
6194
6195
6196 test -n "$ac_ct_READELF" && break
6197done
6198
6199 if test "x$ac_ct_READELF" = x; then
6200 READELF=":"
6201 else
6202 case $cross_compiling:$ac_tool_warned in
6203yes:)
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6205$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6206ac_tool_warned=yes ;;
6207esac
6208 READELF=$ac_ct_READELF
6209 fi
6210fi
6211
6212if test "$cross_compiling" = yes; then
6213 case "$READELF" in
6214 readelf|:)
6215 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6216 ;;
6217 esac
6218fi
6219
6220
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006223hp*|HP*)
6224 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225 if test -z "$INSTALL"
6226 then
6227 INSTALL="${srcdir}/install-sh -c"
6228 fi
6229esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230# Find a good install program. We prefer a C program (faster),
6231# so one script is as good as another. But avoid the broken or
6232# incompatible versions:
6233# SysV /etc/install, /usr/sbin/install
6234# SunOS /usr/etc/install
6235# IRIX /sbin/install
6236# AIX /bin/install
6237# AmigaOS /C/install, which installs bootblocks on floppy discs
6238# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6239# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6240# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6241# OS/2's system install, which has a completely different semantic
6242# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006243# Reject install programs that cannot install multiple files.
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6245$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006247if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006248 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249else
6250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6251for as_dir in $PATH
6252do
6253 IFS=$as_save_IFS
6254 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006255 # Account for people who put trailing slashes in PATH elements.
6256case $as_dir/ in #((
6257 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260 /usr/ucb/* ) ;;
6261 *)
6262 # OSF1 and SCO ODT 3.0 have their own names for install.
6263 # Don't use installbsd from OSF since it installs stuff as root
6264 # by default.
6265 for ac_prog in ginstall scoinst install; do
6266 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006267 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268 if test $ac_prog = install &&
6269 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6270 # AIX install. It has an incompatible calling convention.
6271 :
6272 elif test $ac_prog = install &&
6273 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6274 # program-specific install script used by HP pwplus--don't use.
6275 :
6276 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006277 rm -rf conftest.one conftest.two conftest.dir
6278 echo one > conftest.one
6279 echo two > conftest.two
6280 mkdir conftest.dir
6281 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6282 test -s conftest.one && test -s conftest.two &&
6283 test -s conftest.dir/conftest.one &&
6284 test -s conftest.dir/conftest.two
6285 then
6286 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6287 break 3
6288 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289 fi
6290 fi
6291 done
6292 done
6293 ;;
6294esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006295
6296 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006297IFS=$as_save_IFS
6298
Matthias Kloseb9621712010-04-24 17:59:49 +00006299rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300
6301fi
6302 if test "${ac_cv_path_install+set}" = set; then
6303 INSTALL=$ac_cv_path_install
6304 else
6305 # As a last resort, use the slow shell script. Don't cache a
6306 # value for INSTALL within a source directory, because that will
6307 # break other packages using the cache if that directory is
6308 # removed, or if the value is a relative name.
6309 INSTALL=$ac_install_sh
6310 fi
6311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6313$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6316# It thinks the first close brace ends the variable substitution.
6317test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6318
6319test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6320
6321test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6322
Matthias Klose93a0ef12012-03-15 18:08:34 +01006323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6324$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6325if test -z "$MKDIR_P"; then
6326 if ${ac_cv_path_mkdir+:} false; then :
6327 $as_echo_n "(cached) " >&6
6328else
6329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6331do
6332 IFS=$as_save_IFS
6333 test -z "$as_dir" && as_dir=.
6334 for ac_prog in mkdir gmkdir; do
6335 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006336 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006337 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6338 'mkdir (GNU coreutils) '* | \
6339 'mkdir (coreutils) '* | \
6340 'mkdir (fileutils) '4.1*)
6341 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6342 break 3;;
6343 esac
6344 done
6345 done
6346 done
6347IFS=$as_save_IFS
6348
6349fi
6350
6351 test -d ./--version && rmdir ./--version
6352 if test "${ac_cv_path_mkdir+set}" = set; then
6353 MKDIR_P="$ac_cv_path_mkdir -p"
6354 else
6355 # As a last resort, use the slow shell script. Don't cache a
6356 # value for MKDIR_P within a source directory, because that will
6357 # break other packages using the cache if that directory is
6358 # removed, or if the value is a relative name.
6359 MKDIR_P="$ac_install_sh -d"
6360 fi
6361fi
6362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6363$as_echo "$MKDIR_P" >&6; }
6364
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365
6366# Not every filesystem supports hard links
6367
6368if test -z "$LN" ; then
6369 case $ac_sys_system in
6370 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 *) LN=ln;;
6372 esac
6373fi
6374
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006375# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006376
6377ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006378
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6381$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382
6383# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006384if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385 withval=$with_pydebug;
6386if test "$withval" != no
6387then
6388
Matthias Kloseb9621712010-04-24 17:59:49 +00006389$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006390
Matthias Kloseb9621712010-04-24 17:59:49 +00006391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6392$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006394 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006395else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006397fi
6398else
Matthias Kloseb9621712010-04-24 17:59:49 +00006399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401fi
6402
6403
Victor Stinnerf4e47032019-04-25 00:56:28 +02006404# Check for --with-trace-refs
6405# --with-trace-refs
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6407$as_echo_n "checking for --with-trace-refs... " >&6; }
6408
6409# Check whether --with-trace-refs was given.
6410if test "${with_trace_refs+set}" = set; then :
6411 withval=$with_trace_refs;
6412else
6413 with_trace_refs=no
6414fi
6415
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6417$as_echo "$with_trace_refs" >&6; }
6418
6419if test "$with_trace_refs" = "yes"
6420then
6421
6422$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6423
6424fi
6425
6426# Check for --with-assertions.
6427# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006428assertions='false'
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6430$as_echo_n "checking for --with-assertions... " >&6; }
6431
6432# Check whether --with-assertions was given.
6433if test "${with_assertions+set}" = set; then :
6434 withval=$with_assertions;
6435if test "$withval" != no
6436then
6437 assertions='true'
6438fi
6439fi
6440
6441if test "$assertions" = 'true'; then
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6443$as_echo "yes" >&6; }
6444elif test "$Py_DEBUG" = 'true'; then
6445 assertions='true'
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6447$as_echo "implied by --with-pydebug" >&6; }
6448else
6449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
Brett Cannon63d98bc2016-09-06 17:12:40 -07006453# Enable optimization flags
6454
6455
6456Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6458$as_echo_n "checking for --enable-optimizations... " >&6; }
6459# Check whether --enable-optimizations was given.
6460if test "${enable_optimizations+set}" = set; then :
6461 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006462if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006463then
6464 Py_OPT='true'
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6466$as_echo "yes" >&6; };
6467else
6468 Py_OPT='false'
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; };
6471fi
6472else
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474$as_echo "no" >&6; }
6475fi
6476
6477if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006478 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6479 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006480 # 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 +00006481 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006482 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006484 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006485 case $CC in
6486 *gcc*)
6487 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6488 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
6489 ;;
6490 esac
6491
6492
Brett Cannon63d98bc2016-09-06 17:12:40 -07006493else
6494 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006495 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006496 DEF_MAKE_RULE="all"
6497fi
6498
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006499
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6501$as_echo_n "checking PROFILE_TASK... " >&6; }
6502if test -z "$PROFILE_TASK"
6503then
6504 PROFILE_TASK='-m test --pgo'
6505fi
6506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6507$as_echo "$PROFILE_TASK" >&6; }
6508
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006509# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6510# normal names in the default $PATH (ie: Ubuntu). They exist under the
6511# non-suffixed name in their versioned llvm directory.
6512
6513llvm_bin_dir=''
6514llvm_path="${PATH}"
6515if test "${CC}" = "clang"
6516then
6517 clang_bin=`which clang`
6518 # Some systems install clang elsewhere as a symlink to the real path
6519 # which is where the related llvm tools are located.
6520 if test -L "${clang_bin}"
6521 then
6522 clang_dir=`dirname "${clang_bin}"`
6523 clang_bin=`readlink "${clang_bin}"`
6524 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6525 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6526 fi
6527fi
6528
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006529# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6531$as_echo_n "checking for --with-lto... " >&6; }
6532
6533# Check whether --with-lto was given.
6534if test "${with_lto+set}" = set; then :
6535 withval=$with_lto;
6536if test "$withval" != no
6537then
6538 Py_LTO='true'
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6540$as_echo "yes" >&6; };
6541else
6542 Py_LTO='false'
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6544$as_echo "no" >&6; };
6545fi
6546else
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548$as_echo "no" >&6; }
6549fi
6550
6551if test "$Py_LTO" = 'true' ; then
6552 case $CC in
6553 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006554
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006555 if test -n "$ac_tool_prefix"; then
6556 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6557set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6559$as_echo_n "checking for $ac_word... " >&6; }
6560if ${ac_cv_path_LLVM_AR+:} false; then :
6561 $as_echo_n "(cached) " >&6
6562else
6563 case $LLVM_AR in
6564 [\\/]* | ?:[\\/]*)
6565 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6566 ;;
6567 *)
6568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6569for as_dir in ${llvm_path}
6570do
6571 IFS=$as_save_IFS
6572 test -z "$as_dir" && as_dir=.
6573 for ac_exec_ext in '' $ac_executable_extensions; do
6574 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6575 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6577 break 2
6578 fi
6579done
6580 done
6581IFS=$as_save_IFS
6582
6583 ;;
6584esac
6585fi
6586LLVM_AR=$ac_cv_path_LLVM_AR
6587if test -n "$LLVM_AR"; then
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6589$as_echo "$LLVM_AR" >&6; }
6590else
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6592$as_echo "no" >&6; }
6593fi
6594
6595
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006596fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006597if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006598 ac_pt_LLVM_AR=$LLVM_AR
6599 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006600set dummy llvm-ar; ac_word=$2
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6602$as_echo_n "checking for $ac_word... " >&6; }
6603if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6604 $as_echo_n "(cached) " >&6
6605else
6606 case $ac_pt_LLVM_AR in
6607 [\\/]* | ?:[\\/]*)
6608 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6609 ;;
6610 *)
6611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6612for as_dir in ${llvm_path}
6613do
6614 IFS=$as_save_IFS
6615 test -z "$as_dir" && as_dir=.
6616 for ac_exec_ext in '' $ac_executable_extensions; do
6617 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6618 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6619 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6620 break 2
6621 fi
6622done
6623 done
6624IFS=$as_save_IFS
6625
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006626 ;;
6627esac
6628fi
6629ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6630if test -n "$ac_pt_LLVM_AR"; then
6631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6632$as_echo "$ac_pt_LLVM_AR" >&6; }
6633else
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6635$as_echo "no" >&6; }
6636fi
6637
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006638 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006639 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006640 else
6641 case $cross_compiling:$ac_tool_warned in
6642yes:)
6643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6645ac_tool_warned=yes ;;
6646esac
6647 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006648 fi
6649else
6650 LLVM_AR="$ac_cv_path_LLVM_AR"
6651fi
6652
6653
6654 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6655 then
6656 LLVM_AR_FOUND="found"
6657 else
6658 LLVM_AR_FOUND="not-found"
6659 fi
6660 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6661 then
6662 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6663 if test -n "${found_llvm_ar}"
6664 then
6665 LLVM_AR='/usr/bin/xcrun llvm-ar'
6666 LLVM_AR_FOUND=found
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6668$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6669 fi
6670 fi
6671 if test $LLVM_AR_FOUND = not-found
6672 then
6673 LLVM_PROFR_ERR=yes
6674 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6675 else
6676 LLVM_AR_ERR=no
6677 fi
6678 AR="${LLVM_AR}"
6679 case $ac_sys_system in
6680 Darwin*)
6681 # Any changes made here should be reflected in the GCC+Darwin case below
6682 LTOFLAGS="-flto -Wl,-export_dynamic"
6683 ;;
6684 *)
6685 LTOFLAGS="-flto"
6686 ;;
6687 esac
6688 ;;
6689 *gcc*)
6690 case $ac_sys_system in
6691 Darwin*)
6692 LTOFLAGS="-flto -Wl,-export_dynamic"
6693 ;;
6694 *)
6695 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6696 ;;
6697 esac
6698 ;;
6699 esac
6700
6701 if test "$ac_cv_prog_cc_g" = "yes"
6702 then
6703 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6704 # to get debug symbols.
6705 LTOFLAGS="$LTOFLAGS -g"
6706 fi
6707
stratakisf92c7aa2018-12-04 15:54:01 +01006708 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006709 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006710fi
6711
6712# Enable PGO flags.
6713
6714
6715
6716
6717
6718
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006719if test -n "$ac_tool_prefix"; then
6720 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6721set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6723$as_echo_n "checking for $ac_word... " >&6; }
6724if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6725 $as_echo_n "(cached) " >&6
6726else
6727 case $LLVM_PROFDATA in
6728 [\\/]* | ?:[\\/]*)
6729 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6730 ;;
6731 *)
6732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6733for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006734do
6735 IFS=$as_save_IFS
6736 test -z "$as_dir" && as_dir=.
6737 for ac_exec_ext in '' $ac_executable_extensions; do
6738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006739 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6741 break 2
6742 fi
6743done
6744 done
6745IFS=$as_save_IFS
6746
Gregory P. Smith799520c2016-09-07 16:10:00 -07006747 ;;
6748esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006749fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006750LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6751if test -n "$LLVM_PROFDATA"; then
6752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6753$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006754else
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6756$as_echo "no" >&6; }
6757fi
6758
6759
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006760fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006761if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006762 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6763 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006764set dummy llvm-profdata; ac_word=$2
6765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6766$as_echo_n "checking for $ac_word... " >&6; }
6767if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6768 $as_echo_n "(cached) " >&6
6769else
6770 case $ac_pt_LLVM_PROFDATA in
6771 [\\/]* | ?:[\\/]*)
6772 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6773 ;;
6774 *)
6775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6776for as_dir in ${llvm_path}
6777do
6778 IFS=$as_save_IFS
6779 test -z "$as_dir" && as_dir=.
6780 for ac_exec_ext in '' $ac_executable_extensions; do
6781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6782 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6783 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6784 break 2
6785 fi
6786done
6787 done
6788IFS=$as_save_IFS
6789
Gregory P. Smith799520c2016-09-07 16:10:00 -07006790 ;;
6791esac
6792fi
6793ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6794if test -n "$ac_pt_LLVM_PROFDATA"; then
6795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6796$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6797else
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6799$as_echo "no" >&6; }
6800fi
6801
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006802 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006803 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006804 else
6805 case $cross_compiling:$ac_tool_warned in
6806yes:)
6807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6809ac_tool_warned=yes ;;
6810esac
6811 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006812 fi
6813else
6814 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6815fi
6816
6817
6818if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6819then
6820 LLVM_PROF_FOUND="found"
6821else
6822 LLVM_PROF_FOUND="not-found"
6823fi
6824if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6825then
6826 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6827 if test -n "${found_llvm_profdata}"
6828 then
6829 # llvm-profdata isn't directly in $PATH in some cases.
6830 # https://apple.stackexchange.com/questions/197053/
6831 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6832 LLVM_PROF_FOUND=found
6833 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6834$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6835 fi
6836fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006837LLVM_PROF_ERR=no
6838case $CC in
6839 *clang*)
6840 # Any changes made here should be reflected in the GCC+Darwin case below
6841 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6842 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006843 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006844 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6845 if test $LLVM_PROF_FOUND = not-found
6846 then
6847 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006848 if test "${REQUIRE_PGO}" = "yes"
6849 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006850 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 -07006851 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006852 fi
6853 ;;
6854 *gcc*)
6855 case $ac_sys_system in
6856 Darwin*)
6857 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6858 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006859 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006860 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006861 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006862 then
6863 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006864 if test "${REQUIRE_PGO}" = "yes"
6865 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006866 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 -07006867 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006868 fi
6869 ;;
6870 *)
6871 PGO_PROF_GEN_FLAG="-fprofile-generate"
6872 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6873 LLVM_PROF_MERGER="true"
6874 LLVM_PROF_FILE=""
6875 ;;
6876 esac
6877 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006878 *icc*)
6879 PGO_PROF_GEN_FLAG="-prof-gen"
6880 PGO_PROF_USE_FLAG="-prof-use"
6881 LLVM_PROF_MERGER="true"
6882 LLVM_PROF_FILE=""
6883 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006884esac
6885
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6887# merged with this chunk of code?
6888
6889# Optimizer/debugger flags
6890# ------------------------
6891# (The following bit of code is complicated enough - please keep things
6892# indented properly. Just pretend you're editing Python code. ;-)
6893
6894# There are two parallel sets of case statements below, one that checks to
6895# see if OPT was set and one that does BASECFLAGS setting based upon
6896# compiler and platform. BASECFLAGS tweaks need to be made even if the
6897# user set OPT.
6898
Victor Stinner23a683a2019-04-12 21:27:37 +02006899case $CC in
6900 *clang*)
6901 cc_is_clang=1
6902 ;;
6903 *)
6904 if $CC --version 2>&1 | grep -q clang
6905 then
6906 cc_is_clang=1
6907 else
6908 cc_is_clang=
6909 fi
6910esac
6911
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912# tweak OPT based on compiler and platform, only if the user didn't set
6913# it on the command line
6914
Victor Stinner9ed34a82017-05-02 22:35:58 +02006915
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006916if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917then
6918 case $GCC in
6919 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6921 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6922 WRAP="-fwrapv"
6923 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006924
Victor Stinner35f3d242017-04-21 12:35:24 +02006925 if test -n "${cc_is_clang}"
6926 then
6927 # Clang also needs -fwrapv
6928 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006929 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6930 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006931 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006932 fi
6933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934 case $ac_cv_prog_cc_g in
6935 yes)
6936 if test "$Py_DEBUG" = 'true' ; then
6937 # Optimization messes up debuggers, so turn it off for
6938 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006939 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006940 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006941 else
Victor Stinner28205b22017-04-21 11:24:34 +02006942 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006943 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006944 else
Victor Stinner28205b22017-04-21 11:24:34 +02006945 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946 fi
6947 ;;
6948 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006949 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006950 ;;
6951 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006952
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953 case $ac_sys_system in
6954 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6955 ;;
6956 esac
6957 ;;
6958
6959 *)
6960 OPT="-O"
6961 ;;
6962 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006963fi
6964
6965
6966
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006967
stratakiscf10a752018-12-19 18:19:01 +01006968
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969# The -arch flags for universal builds on OSX
6970UNIVERSAL_ARCH_FLAGS=
6971
6972
6973# tweak BASECFLAGS based on compiler and platform
6974case $GCC in
6975yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006976 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006977
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6979$as_echo_n "checking for -Wextra... " >&6; }
6980 ac_save_cc="$CC"
6981 CC="$CC -Wextra -Werror"
6982 if ${ac_cv_extra_warnings+:} false; then :
6983 $as_echo_n "(cached) " >&6
6984else
6985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6986/* end confdefs.h. */
6987
6988
6989int
6990main ()
6991{
6992
6993 ;
6994 return 0;
6995}
6996
6997_ACEOF
6998if ac_fn_c_try_compile "$LINENO"; then :
6999
7000 ac_cv_extra_warnings=yes
7001
7002else
7003
7004 ac_cv_extra_warnings=no
7005
7006fi
7007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7008fi
7009
7010 CC="$ac_save_cc"
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7012$as_echo "$ac_cv_extra_warnings" >&6; }
7013
7014 if test $ac_cv_extra_warnings = yes
7015 then
7016 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7017 fi
7018
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019 # Python doesn't violate C99 aliasing rules, but older versions of
7020 # GCC produce warnings for legal Python code. Enable
7021 # -fno-strict-aliasing on versions of GCC that support but produce
7022 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7024$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007025 ac_save_cc="$CC"
7026 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007027 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007028 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007032/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007033
Matthias Kloseb159a552010-04-25 21:00:44 +00007034
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007035int
7036main ()
7037{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007038
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007039 ;
7040 return 0;
7041}
Matthias Kloseb159a552010-04-25 21:00:44 +00007042
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007044if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007045
7046 CC="$ac_save_cc -fstrict-aliasing"
7047 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007049/* end confdefs.h. */
7050
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007051 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007052int
7053main ()
7054{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007055double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007056 ;
7057 return 0;
7058}
Matthias Kloseb159a552010-04-25 21:00:44 +00007059
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007061if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007062
7063 ac_cv_no_strict_aliasing=no
7064
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065else
Matthias Kloseb159a552010-04-25 21:00:44 +00007066
7067 ac_cv_no_strict_aliasing=yes
7068
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007069fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007071
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007072else
Matthias Kloseb159a552010-04-25 21:00:44 +00007073
7074 ac_cv_no_strict_aliasing=no
7075
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007076fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007078fi
7079
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007080 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7083$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007084 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007085 then
7086 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7087 fi
7088
Zachary Ware5af85642015-12-21 12:09:17 -06007089 # ICC doesn't recognize the option, but only emits a warning
7090 ## XXX does it emit an unused result warning and can it be disabled?
7091 case "$CC" in
7092 *icc*)
7093 ac_cv_disable_unused_result_warning=no
7094 ;;
7095 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7097$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7098 ac_save_cc="$CC"
7099 CC="$CC -Wunused-result -Werror"
7100 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007101 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007102 $as_echo_n "(cached) " >&6
7103else
7104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105/* end confdefs.h. */
7106
7107
7108int
7109main ()
7110{
7111
7112 ;
7113 return 0;
7114}
7115
7116_ACEOF
7117if ac_fn_c_try_compile "$LINENO"; then :
7118
7119 ac_cv_disable_unused_result_warning=yes
7120
7121else
7122
7123 ac_cv_disable_unused_result_warning=no
7124
7125fi
7126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7127fi
7128
7129 CFLAGS="$save_CFLAGS"
7130 CC="$ac_save_cc"
7131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7132$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007133 ;;
7134 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007135
7136 if test $ac_cv_disable_unused_result_warning = yes
7137 then
7138 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007139 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7140 fi
7141
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7143$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7144 ac_save_cc="$CC"
7145 CC="$CC -Wunused-parameter -Werror"
7146 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7147 $as_echo_n "(cached) " >&6
7148else
7149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7150/* end confdefs.h. */
7151
7152
7153int
7154main ()
7155{
7156
7157 ;
7158 return 0;
7159}
7160
7161_ACEOF
7162if ac_fn_c_try_compile "$LINENO"; then :
7163
7164 ac_cv_disable_unused_parameter_warning=yes
7165
7166else
7167
7168 ac_cv_disable_unused_parameter_warning=no
7169
7170fi
7171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7172fi
7173
7174 CC="$ac_save_cc"
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7176$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7177
7178 if test $ac_cv_disable_unused_parameter_warning = yes
7179 then
7180 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7181 fi
7182
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7184$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7185 ac_save_cc="$CC"
7186 CC="$CC -Wmissing-field-initializers -Werror"
7187 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7188 $as_echo_n "(cached) " >&6
7189else
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7191/* end confdefs.h. */
7192
7193
7194int
7195main ()
7196{
7197
7198 ;
7199 return 0;
7200}
7201
7202_ACEOF
7203if ac_fn_c_try_compile "$LINENO"; then :
7204
7205 ac_cv_disable_missing_field_initializers=yes
7206
7207else
7208
7209 ac_cv_disable_missing_field_initializers=no
7210
7211fi
7212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7213fi
7214
7215 CC="$ac_save_cc"
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7217$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7218
7219 if test $ac_cv_disable_missing_field_initializers = yes
7220 then
7221 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007222 fi
7223
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7225$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7226 ac_save_cc="$CC"
7227 CC="$CC -Wsign-compare"
7228 save_CFLAGS="$CFLAGS"
7229 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7230 $as_echo_n "(cached) " >&6
7231else
7232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7233/* end confdefs.h. */
7234
7235
7236int
7237main ()
7238{
7239
7240 ;
7241 return 0;
7242}
7243
7244_ACEOF
7245if ac_fn_c_try_compile "$LINENO"; then :
7246
7247 ac_cv_enable_sign_compare_warning=yes
7248
7249else
7250
7251 ac_cv_enable_sign_compare_warning=no
7252
7253fi
7254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7255fi
7256
7257 CFLAGS="$save_CFLAGS"
7258 CC="$ac_save_cc"
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7260$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7261
7262 if test $ac_cv_enable_sign_compare_warning = yes
7263 then
7264 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7265 fi
7266
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7268$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7269 ac_save_cc="$CC"
7270 CC="$CC -Wunreachable-code"
7271 save_CFLAGS="$CFLAGS"
7272 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7273 $as_echo_n "(cached) " >&6
7274else
7275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7276/* end confdefs.h. */
7277
7278
7279int
7280main ()
7281{
7282
7283 ;
7284 return 0;
7285}
7286
7287_ACEOF
7288if ac_fn_c_try_compile "$LINENO"; then :
7289
7290 ac_cv_enable_unreachable_code_warning=yes
7291
7292else
7293
7294 ac_cv_enable_unreachable_code_warning=no
7295
7296fi
7297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7298fi
7299
7300 CFLAGS="$save_CFLAGS"
7301 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007302
7303 # Don't enable unreachable code warning in debug mode, since it usually
7304 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007305 # Issue #24324: Unfortunately, the unreachable code warning does not work
7306 # correctly on gcc and has been silently removed from the compiler.
7307 # It is supported on clang but on OS X systems gcc may be an alias
7308 # for clang. Try to determine if the compiler is not really gcc and,
7309 # if so, only then enable the warning.
7310 if test $ac_cv_enable_unreachable_code_warning = yes && \
7311 test "$Py_DEBUG" != "true" && \
7312 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007313 then
7314 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007315 else
7316 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007317 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7319$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007320
INADA Naokie3364842018-06-05 20:40:53 +09007321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7322$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7323 ac_save_cc="$CC"
7324 CC="$CC -Werror -Wstrict-prototypes"
7325 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7326 $as_echo_n "(cached) " >&6
7327else
7328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7329/* end confdefs.h. */
7330
7331
7332int
7333main ()
7334{
7335
7336 ;
7337 return 0;
7338}
7339
7340_ACEOF
7341if ac_fn_c_try_compile "$LINENO"; then :
7342
7343 ac_cv_enable_strict_prototypes_warning=yes
7344
7345else
7346
7347 ac_cv_enable_strict_prototypes_warning=no
7348
7349fi
7350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7351fi
7352
7353 CC="$ac_save_cc"
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7355$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7356
7357 if test $ac_cv_enable_strict_prototypes_warning = yes
7358 then
7359 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7360 fi
7361
Victor Stinner193ee0a2017-02-06 14:24:00 +01007362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7363$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7364 ac_save_cc="$CC"
7365 CC="$CC -Werror=implicit-function-declaration"
7366 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7367 $as_echo_n "(cached) " >&6
7368else
7369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7370/* end confdefs.h. */
7371
7372
7373int
7374main ()
7375{
7376
7377 ;
7378 return 0;
7379}
7380
7381_ACEOF
7382if ac_fn_c_try_compile "$LINENO"; then :
7383
7384 ac_cv_enable_implicit_function_declaration_error=yes
7385
7386else
7387
7388 ac_cv_enable_implicit_function_declaration_error=no
7389
7390fi
7391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7392fi
7393
7394 CC="$ac_save_cc"
7395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7396$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7397
7398 if test $ac_cv_enable_implicit_function_declaration_error = yes
7399 then
7400 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7401 fi
7402
Vinay Sajip0b60f642019-10-15 08:26:12 +01007403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7404$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7405 ac_save_cc="$CC"
7406 CC="$CC -fvisibility=hidden"
7407 if ${ac_cv_enable_visibility+:} false; then :
7408 $as_echo_n "(cached) " >&6
7409else
7410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7411/* end confdefs.h. */
7412
7413
7414int
7415main ()
7416{
7417
7418 ;
7419 return 0;
7420}
7421
7422_ACEOF
7423if ac_fn_c_try_compile "$LINENO"; then :
7424
7425 ac_cv_enable_visibility=yes
7426
7427else
7428
7429 ac_cv_enable_visibility=no
7430
7431fi
7432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7433fi
7434
7435 CC="$ac_save_cc"
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7437$as_echo "$ac_cv_enable_visibility" >&6; }
7438
7439 if test $ac_cv_enable_visibility = yes
7440 then
7441 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7442 fi
7443
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7445 # support. Without this, treatment of subnormals doesn't follow
7446 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007447 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007448 alpha*)
7449 BASECFLAGS="$BASECFLAGS -mieee"
7450 ;;
7451 esac
7452
7453 case $ac_sys_system in
7454 SCO_SV*)
7455 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7456 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007457
Ned Deily87adb6e2013-10-18 21:09:56 -07007458 Darwin*)
7459 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7460 # used to be here, but non-Apple gcc doesn't accept them.
7461 if test "${CC}" = gcc
7462 then
7463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007464$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007465 case "${UNIVERSALSDK}" in
7466 */MacOSX10.4u.sdk)
7467 # Build using 10.4 SDK, force usage of gcc when the
7468 # compiler is gcc, otherwise the user will get very
7469 # confusing error messages when building on OSX 10.6
7470 CC=gcc-4.0
7471 CPP=cpp-4.0
7472 ;;
7473 esac
7474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007475$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007476 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477
Ned Deily87adb6e2013-10-18 21:09:56 -07007478 if test "${enable_universalsdk}"
7479 then
7480 case "$UNIVERSAL_ARCHS" in
7481 32-bit)
7482 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7483 LIPO_32BIT_FLAGS=""
7484 ARCH_RUN_32BIT=""
7485 ;;
7486 64-bit)
7487 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7488 LIPO_32BIT_FLAGS=""
7489 ARCH_RUN_32BIT="true"
7490 ;;
7491 all)
7492 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7493 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7494 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7495 ;;
7496 intel)
7497 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7498 LIPO_32BIT_FLAGS="-extract i386"
7499 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7500 ;;
7501 intel-32)
7502 UNIVERSAL_ARCH_FLAGS="-arch i386"
7503 LIPO_32BIT_FLAGS=""
7504 ARCH_RUN_32BIT=""
7505 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007506 intel-64)
7507 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7508 LIPO_32BIT_FLAGS=""
7509 ARCH_RUN_32BIT="true"
7510 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007511 3-way)
7512 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7513 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7514 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7515 ;;
7516 *)
7517 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7518 ;;
7519 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007520
Ned Deily87adb6e2013-10-18 21:09:56 -07007521 if test "${UNIVERSALSDK}" != "/"
7522 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007523 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7524 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007525 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007526 else
7527 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7528 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007529 fi
7530 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531
Ned Deily87adb6e2013-10-18 21:09:56 -07007532 # Calculate an appropriate deployment target for this build:
7533 # The deployment target value is used explicitly to enable certain
7534 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007535 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007536 # component of the string returned by distutils.get_platform().
7537 #
7538 # Use the value from:
7539 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7540 # 2. the operating system version of the build machine if >= 10.6
7541 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7542 # below to pick either 10.3, 10.4, or 10.5 as the target.
7543 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544
Ned Deily87adb6e2013-10-18 21:09:56 -07007545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7546$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007547 cur_target_major=`sw_vers -productVersion | \
7548 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7549 cur_target_minor=`sw_vers -productVersion | \
7550 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7551 cur_target="${cur_target_major}.${cur_target_minor}"
7552 if test ${cur_target_major} -eq 10 && \
7553 test ${cur_target_minor} -ge 3 && \
7554 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007555 then
Ned Deily36820b62014-06-25 13:44:22 -07007556 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007557 cur_target=10.3
7558 if test ${enable_universalsdk}
7559 then
7560 case "$UNIVERSAL_ARCHS" in
7561 all|3-way|intel|64-bit)
7562 # These configurations were first supported in 10.5
7563 cur_target='10.5'
7564 ;;
7565 esac
7566 else
7567 if test `/usr/bin/arch` = "i386"
7568 then
7569 # 10.4 was the first release to support Intel archs
7570 cur_target="10.4"
7571 fi
7572 fi
7573 fi
7574 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007575
Ned Deily87adb6e2013-10-18 21:09:56 -07007576 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7577 # environment with a value that is the same as what we'll use
7578 # in the Makefile to ensure that we'll get the same compiler
7579 # environment during configure and build time.
7580 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7581 export MACOSX_DEPLOYMENT_TARGET
7582 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7584$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007585
Ned Deily87adb6e2013-10-18 21:09:56 -07007586 # end of Darwin* tests
7587 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588 esac
7589 ;;
7590
7591*)
7592 case $ac_sys_system in
7593 OpenUNIX*|UnixWare*)
7594 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7595 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596 SCO_SV*)
7597 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7598 ;;
7599 esac
7600 ;;
7601esac
7602
Zachary Ware5af85642015-12-21 12:09:17 -06007603case "$CC" in
7604*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007605 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007606 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7607 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007608*xlc*)
7609 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7610 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007611esac
7612
T. Woutersddbfa2c2017-05-23 01:30:49 +02007613if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614 :
7615else
7616 OPT="-DNDEBUG $OPT"
7617fi
7618
7619if test "$ac_arch_flags"
7620then
7621 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7622fi
7623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624# On some compilers, pthreads are available without further options
7625# (e.g. MacOS X). On some of these systems, the compiler will not
7626# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7627# So we have to see first whether pthreads are available without
7628# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7630$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007631if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633else
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635 ac_cv_pthread_is_default=no
7636else
Matthias Kloseb9621712010-04-24 17:59:49 +00007637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638/* end confdefs.h. */
7639
Stefan Krah7dba5942012-11-22 22:49:11 +01007640#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641#include <pthread.h>
7642
7643void* routine(void* p){return NULL;}
7644
7645int main(){
7646 pthread_t p;
7647 if(pthread_create(&p,NULL,routine,NULL)!=0)
7648 return 1;
7649 (void)pthread_detach(p);
7650 return 0;
7651}
7652
7653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007654if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655
7656 ac_cv_pthread_is_default=yes
7657 ac_cv_kthread=no
7658 ac_cv_pthread=no
7659
7660else
Matthias Kloseb9621712010-04-24 17:59:49 +00007661 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7664 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665fi
7666
7667
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668fi
7669
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7671$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007672
7673
7674if test $ac_cv_pthread_is_default = yes
7675then
7676 ac_cv_kpthread=no
7677else
7678# -Kpthread, if available, provides the right #defines
7679# and linker options to make pthread_create available
7680# Some compilers won't report that they do not support -Kpthread,
7681# so we need to run a program to see whether it really made the
7682# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7684$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007685if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687else
7688 ac_save_cc="$CC"
7689CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007690if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691 ac_cv_kpthread=no
7692else
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694/* end confdefs.h. */
7695
Stefan Krah7dba5942012-11-22 22:49:11 +01007696#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697#include <pthread.h>
7698
7699void* routine(void* p){return NULL;}
7700
7701int main(){
7702 pthread_t p;
7703 if(pthread_create(&p,NULL,routine,NULL)!=0)
7704 return 1;
7705 (void)pthread_detach(p);
7706 return 0;
7707}
7708
7709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007710if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711 ac_cv_kpthread=yes
7712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717fi
7718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719CC="$ac_save_cc"
7720fi
7721
Matthias Kloseb9621712010-04-24 17:59:49 +00007722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7723$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724fi
7725
7726if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7727then
7728# -Kthread, if available, provides the right #defines
7729# and linker options to make pthread_create available
7730# Some compilers won't report that they do not support -Kthread,
7731# so we need to run a program to see whether it really made the
7732# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7734$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007735if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737else
7738 ac_save_cc="$CC"
7739CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007740if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741 ac_cv_kthread=no
7742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744/* end confdefs.h. */
7745
Stefan Krah7dba5942012-11-22 22:49:11 +01007746#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747#include <pthread.h>
7748
7749void* routine(void* p){return NULL;}
7750
7751int main(){
7752 pthread_t p;
7753 if(pthread_create(&p,NULL,routine,NULL)!=0)
7754 return 1;
7755 (void)pthread_detach(p);
7756 return 0;
7757}
7758
7759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761 ac_cv_kthread=yes
7762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767fi
7768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769CC="$ac_save_cc"
7770fi
7771
Matthias Kloseb9621712010-04-24 17:59:49 +00007772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7773$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774fi
7775
7776if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7777then
7778# -pthread, if available, provides the right #defines
7779# and linker options to make pthread_create available
7780# Some compilers won't report that they do not support -pthread,
7781# so we need to run a program to see whether it really made the
7782# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7784$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007785if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787else
7788 ac_save_cc="$CC"
7789CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007790if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791 ac_cv_pthread=no
7792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794/* end confdefs.h. */
7795
Stefan Krah7dba5942012-11-22 22:49:11 +01007796#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007797#include <pthread.h>
7798
7799void* routine(void* p){return NULL;}
7800
7801int main(){
7802 pthread_t p;
7803 if(pthread_create(&p,NULL,routine,NULL)!=0)
7804 return 1;
7805 (void)pthread_detach(p);
7806 return 0;
7807}
7808
7809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007810if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811 ac_cv_pthread=yes
7812else
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007817fi
7818
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007819CC="$ac_save_cc"
7820fi
7821
Matthias Kloseb9621712010-04-24 17:59:49 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7823$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007824fi
7825
7826# If we have set a CC compiler flag for thread support then
7827# check if it works for CXX, too.
7828ac_cv_cxx_thread=no
7829if test ! -z "$CXX"
7830then
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7832$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833ac_save_cxx="$CXX"
7834
7835if test "$ac_cv_kpthread" = "yes"
7836then
7837 CXX="$CXX -Kpthread"
7838 ac_cv_cxx_thread=yes
7839elif test "$ac_cv_kthread" = "yes"
7840then
7841 CXX="$CXX -Kthread"
7842 ac_cv_cxx_thread=yes
7843elif test "$ac_cv_pthread" = "yes"
7844then
7845 CXX="$CXX -pthread"
7846 ac_cv_cxx_thread=yes
7847fi
7848
7849if test $ac_cv_cxx_thread = yes
7850then
7851 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7852 $CXX -c conftest.$ac_ext 2>&5
7853 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7854 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7855 then
7856 ac_cv_cxx_thread=yes
7857 else
7858 ac_cv_cxx_thread=no
7859 fi
7860 rm -fr conftest*
7861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7863$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007864fi
7865CXX="$ac_save_cxx"
7866
7867
7868# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7870$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007871if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007873else
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875/* end confdefs.h. */
7876#include <stdlib.h>
7877#include <stdarg.h>
7878#include <string.h>
7879#include <float.h>
7880
7881int
7882main ()
7883{
7884
7885 ;
7886 return 0;
7887}
7888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007889if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007890 ac_cv_header_stdc=yes
7891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7895
7896if test $ac_cv_header_stdc = yes; then
7897 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007899/* end confdefs.h. */
7900#include <string.h>
7901
7902_ACEOF
7903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 $EGREP "memchr" >/dev/null 2>&1; then :
7905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007906else
7907 ac_cv_header_stdc=no
7908fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007909rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007910
7911fi
7912
7913if test $ac_cv_header_stdc = yes; then
7914 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007916/* end confdefs.h. */
7917#include <stdlib.h>
7918
7919_ACEOF
7920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 $EGREP "free" >/dev/null 2>&1; then :
7922
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007923else
7924 ac_cv_header_stdc=no
7925fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007926rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007927
7928fi
7929
7930if test $ac_cv_header_stdc = yes; then
7931 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007933 :
7934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007936/* end confdefs.h. */
7937#include <ctype.h>
7938#include <stdlib.h>
7939#if ((' ' & 0x0FF) == 0x020)
7940# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7941# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7942#else
7943# define ISLOWER(c) \
7944 (('a' <= (c) && (c) <= 'i') \
7945 || ('j' <= (c) && (c) <= 'r') \
7946 || ('s' <= (c) && (c) <= 'z'))
7947# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7948#endif
7949
7950#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7951int
7952main ()
7953{
7954 int i;
7955 for (i = 0; i < 256; i++)
7956 if (XOR (islower (i), ISLOWER (i))
7957 || toupper (i) != TOUPPER (i))
7958 return 2;
7959 return 0;
7960}
7961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007962if ac_fn_c_try_run "$LINENO"; then :
7963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007964else
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7968 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007969fi
7970
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007971fi
7972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7974$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007975if test $ac_cv_header_stdc = yes; then
7976
Matthias Kloseb9621712010-04-24 17:59:49 +00007977$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007978
7979fi
7980
stratakise768c862018-01-23 16:11:24 +01007981for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007982fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007983ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007984sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007985utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007986poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007987sys/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 +01007988sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007989sys/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 +01007990sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007991sys/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 -07007992libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007993linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007994sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007995do :
7996 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7997ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007998if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008000#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008001_ACEOF
8002
8003fi
8004
Guido van Rossum627b2d71993-12-24 10:39:16 +00008005done
8006
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008007ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008008for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8011$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008012if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00008014else
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008016/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008017#include <sys/types.h>
8018#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008019
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
8023if ((DIR *) 0)
8024return 0;
8025 ;
8026 return 0;
8027}
8028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008036eval ac_res=\$$as_ac_Header
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8038$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008039if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008041#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008042_ACEOF
8043
8044ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008047done
8048# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8049if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8051$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008052if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059/* Override any GCC internal prototype to avoid an error.
8060 Use char because int might match the return type of a GCC
8061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008062#ifdef __cplusplus
8063extern "C"
8064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008065char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008066int
8067main ()
8068{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ;
8071 return 0;
8072}
8073_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074for ac_lib in '' dir; do
8075 if test -z "$ac_lib"; then
8076 ac_res="none required"
8077 else
8078 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008079 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008084rm -f core conftest.err conftest.$ac_objext \
8085 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008086 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089done
Victor Stinnere0be4232011-10-25 13:06:09 +02008090if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008091
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092else
8093 ac_cv_search_opendir=no
8094fi
8095rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008096LIBS=$ac_func_search_save_LIBS
8097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8099$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008101if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008104fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008105
Michael W. Hudson54241132001-12-07 15:38:26 +00008106else
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8108$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008109if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008110 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008111else
8112 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116/* Override any GCC internal prototype to avoid an error.
8117 Use char because int might match the return type of a GCC
8118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008119#ifdef __cplusplus
8120extern "C"
8121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008122char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008123int
8124main ()
8125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008126return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 ;
8128 return 0;
8129}
8130_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131for ac_lib in '' x; do
8132 if test -z "$ac_lib"; then
8133 ac_res="none required"
8134 else
8135 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008138 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008141rm -f core conftest.err conftest.$ac_objext \
8142 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008143 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146done
Victor Stinnere0be4232011-10-25 13:06:09 +02008147if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149else
8150 ac_cv_search_opendir=no
8151fi
8152rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008153LIBS=$ac_func_search_save_LIBS
8154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8156$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008158if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008160
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008161fi
8162
8163fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008164
Matthias Kloseb9621712010-04-24 17:59:49 +00008165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8166$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008167if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008169else
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008171/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008172#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008173int
8174main ()
8175{
8176return makedev(0, 0);
8177 ;
8178 return 0;
8179}
8180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008182 ac_cv_header_sys_types_h_makedev=yes
8183else
Matthias Kloseb9621712010-04-24 17:59:49 +00008184 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008186rm -f core conftest.err conftest.$ac_objext \
8187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008188
8189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8191$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008192
8193if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008194ac_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 +02008195if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008196
Matthias Kloseb9621712010-04-24 17:59:49 +00008197$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008198
8199fi
8200
8201
8202
8203 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 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 +02008205if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008206
Matthias Kloseb9621712010-04-24 17:59:49 +00008207$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008208
8209fi
8210
8211
8212 fi
8213fi
8214
Michael W. Hudson54241132001-12-07 15:38:26 +00008215
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008216# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8217# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8218SAVE_CFLAGS=$CFLAGS
8219CFLAGS="-std=c99 $CFLAGS"
8220for ac_header in bluetooth/bluetooth.h
8221do :
8222 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8223if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8224 cat >>confdefs.h <<_ACEOF
8225#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8226_ACEOF
8227
8228fi
8229
8230done
8231
8232CFLAGS=$SAVE_CFLAGS
8233
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008234# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8235for ac_header in net/if.h
8236do :
8237 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8238#ifdef STDC_HEADERS
8239# include <stdlib.h>
8240# include <stddef.h>
8241#else
8242# ifdef HAVE_STDLIB_H
8243# include <stdlib.h>
8244# endif
8245#endif
8246#ifdef HAVE_SYS_SOCKET_H
8247# include <sys/socket.h>
8248#endif
8249
8250"
Victor Stinnere0be4232011-10-25 13:06:09 +02008251if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008252 cat >>confdefs.h <<_ACEOF
8253#define HAVE_NET_IF_H 1
8254_ACEOF
8255
8256fi
8257
8258done
8259
8260
Martin v. Löwis11017b12006-01-14 18:12:57 +00008261# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008262for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008263do :
8264 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 +00008265#ifdef HAVE_ASM_TYPES_H
8266#include <asm/types.h>
8267#endif
8268#ifdef HAVE_SYS_SOCKET_H
8269#include <sys/socket.h>
8270#endif
8271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272"
Victor Stinnere0be4232011-10-25 13:06:09 +02008273if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008274 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008275#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008276_ACEOF
8277
8278fi
8279
8280done
8281
8282
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008283# On Linux, qrtr.h requires asm/types.h
8284for ac_header in linux/qrtr.h
8285do :
8286 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8287#ifdef HAVE_ASM_TYPES_H
8288#include <asm/types.h>
8289#endif
8290#ifdef HAVE_SYS_SOCKET_H
8291#include <sys/socket.h>
8292#endif
8293
8294"
8295if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8296 cat >>confdefs.h <<_ACEOF
8297#define HAVE_LINUX_QRTR_H 1
8298_ACEOF
8299
8300fi
8301
8302done
8303
8304
caaveryeffc12f2017-09-06 18:18:10 -04008305for ac_header in linux/vm_sockets.h
8306do :
8307 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8308#ifdef HAVE_SYS_SOCKET_H
8309#include <sys/socket.h>
8310#endif
8311
8312"
8313if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8314 cat >>confdefs.h <<_ACEOF
8315#define HAVE_LINUX_VM_SOCKETS_H 1
8316_ACEOF
8317
8318fi
8319
8320done
8321
8322
karl ding360371f2020-04-29 15:31:19 -07008323# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8324for 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 +02008325do :
8326 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8327ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8328#ifdef HAVE_SYS_SOCKET_H
8329#include <sys/socket.h>
8330#endif
8331
8332"
8333if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8334 cat >>confdefs.h <<_ACEOF
8335#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8336_ACEOF
8337
8338fi
8339
8340done
8341
8342
Guido van Rossum627b2d71993-12-24 10:39:16 +00008343# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008344was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8346$as_echo_n "checking for clock_t in time.h... " >&6; }
8347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008348/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008349#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008350
8351_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008354 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008355else
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
8357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008359
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008360
Guido van Rossum627b2d71993-12-24 10:39:16 +00008361fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008362rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8365$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8368$as_echo_n "checking for makedev... " >&6; }
8369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008370/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008371
Jesus Cea740f53a2010-04-28 11:35:30 +00008372#if defined(MAJOR_IN_MKDEV)
8373#include <sys/mkdev.h>
8374#elif defined(MAJOR_IN_SYSMACROS)
8375#include <sys/sysmacros.h>
8376#else
8377#include <sys/types.h>
8378#endif
8379
Neal Norwitz11690112002-07-30 01:08:28 +00008380int
8381main ()
8382{
Jesus Cea740f53a2010-04-28 11:35:30 +00008383
8384 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008385 ;
8386 return 0;
8387}
Matthias Kloseb159a552010-04-25 21:00:44 +00008388
Neal Norwitz11690112002-07-30 01:08:28 +00008389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008390if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008391 ac_cv_has_makedev=yes
8392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008395rm -f core conftest.err conftest.$ac_objext \
8396 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8398$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008399if test "$ac_cv_has_makedev" = "yes"; then
8400
Matthias Kloseb9621712010-04-24 17:59:49 +00008401$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008402
8403fi
8404
Christian Heimes985ecdc2013-11-20 11:46:18 +01008405# byte swapping
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8407$as_echo_n "checking for le64toh... " >&6; }
8408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8409/* end confdefs.h. */
8410
8411#ifdef HAVE_ENDIAN_H
8412#include <endian.h>
8413#elif defined(HAVE_SYS_ENDIAN_H)
8414#include <sys/endian.h>
8415#endif
8416
8417int
8418main ()
8419{
8420
8421 le64toh(1)
8422 ;
8423 return 0;
8424}
8425
8426_ACEOF
8427if ac_fn_c_try_link "$LINENO"; then :
8428 ac_cv_has_le64toh=yes
8429else
8430 ac_cv_has_le64toh=no
8431fi
8432rm -f core conftest.err conftest.$ac_objext \
8433 conftest$ac_exeext conftest.$ac_ext
8434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8435$as_echo "$ac_cv_has_le64toh" >&6; }
8436if test "$ac_cv_has_le64toh" = "yes"; then
8437
8438$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8439
8440fi
8441
Martin v. Löwis399a6892002-10-04 10:22:02 +00008442use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008443# Don't use largefile support for GNU/Hurd
8444case $ac_sys_system in GNU*)
8445 use_lfs=no
8446esac
8447
Martin v. Löwis399a6892002-10-04 10:22:02 +00008448if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008449# Two defines needed to enable largefile support on various platforms
8450# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008451case $ac_sys_system/$ac_sys_release in
8452AIX*)
8453
8454$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8455
8456 ;;
8457esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008458
Matthias Kloseb9621712010-04-24 17:59:49 +00008459$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008460
8461
Matthias Kloseb9621712010-04-24 17:59:49 +00008462$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008463
Martin v. Löwis399a6892002-10-04 10:22:02 +00008464fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008465
Guido van Rossum84e7b241996-08-19 21:59:00 +00008466# Add some code to confdefs.h so that the test for off_t works on SCO
8467cat >> confdefs.h <<\EOF
8468#if defined(SCO_DS)
8469#undef _OFF_T
8470#endif
8471EOF
8472
Guido van Rossumef2255b2000-03-10 22:30:29 +00008473# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008474ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008475if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008476
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008477else
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
8479cat >>confdefs.h <<_ACEOF
8480#define mode_t int
8481_ACEOF
8482
8483fi
8484
Matthias Kloseb9621712010-04-24 17:59:49 +00008485ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008486if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008487
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008488else
Martin v. Löwis11437992002-04-12 09:54:03 +00008489
8490cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008492_ACEOF
8493
8494fi
8495
Matthias Kloseb9621712010-04-24 17:59:49 +00008496ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008497if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008498
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008499else
Martin v. Löwis11437992002-04-12 09:54:03 +00008500
8501cat >>confdefs.h <<_ACEOF
8502#define pid_t int
8503_ACEOF
8504
8505fi
8506
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008509#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008510_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008511
Matthias Kloseb9621712010-04-24 17:59:49 +00008512ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008513if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008514
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008515else
Martin v. Löwis11437992002-04-12 09:54:03 +00008516
8517cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008519_ACEOF
8520
8521fi
8522
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8524$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008525if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008527else
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008529/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008530#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008531
8532_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008535 ac_cv_type_uid_t=yes
8536else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008537 ac_cv_type_uid_t=no
8538fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008539rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008540
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8543$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008544if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
8548
Matthias Kloseb9621712010-04-24 17:59:49 +00008549$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008550
8551fi
8552
Mark Dickinson983bc162012-12-02 12:11:38 +00008553
Matthias Kloseb9621712010-04-24 17:59:49 +00008554ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008555if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556
Matthias Kloseb9621712010-04-24 17:59:49 +00008557$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008558
8559fi
8560
Stefan Krah1919b7e2012-03-21 18:25:23 +01008561ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8562if test "x$ac_cv_type___uint128_t" = xyes; then :
8563
8564$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8565
8566fi
8567
Jack Jansendd19cf82001-12-06 22:36:17 +00008568
Michael W. Hudson54241132001-12-07 15:38:26 +00008569# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008570# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571# The cast to long int works around a bug in the HP C Compiler
8572# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8573# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8574# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8576$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008577if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008579else
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 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 +00008581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582else
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 if test "$ac_cv_type_int" = yes; then
8584 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008586as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008587See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588 else
8589 ac_cv_sizeof_int=0
8590 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008592
Martin v. Löwis11437992002-04-12 09:54:03 +00008593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8595$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596
8597
8598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008600#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008601_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008602
8603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604# The cast to long int works around a bug in the HP C Compiler
8605# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8606# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8607# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8609$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008610if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008612else
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 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 +00008614
Martin v. Löwis11437992002-04-12 09:54:03 +00008615else
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 if test "$ac_cv_type_long" = yes; then
8617 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008619as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008620See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621 else
8622 ac_cv_sizeof_long=0
8623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625
Martin v. Löwis11437992002-04-12 09:54:03 +00008626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8628$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629
8630
8631
Martin v. Löwis11437992002-04-12 09:54:03 +00008632cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008633#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008634_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008635
8636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637# The cast to long int works around a bug in the HP C Compiler
8638# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8639# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8640# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8642$as_echo_n "checking size of long long... " >&6; }
8643if ${ac_cv_sizeof_long_long+:} false; then :
8644 $as_echo_n "(cached) " >&6
8645else
8646 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8647
8648else
8649 if test "$ac_cv_type_long_long" = yes; then
8650 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8652as_fn_error 77 "cannot compute sizeof (long long)
8653See \`config.log' for more details" "$LINENO" 5; }
8654 else
8655 ac_cv_sizeof_long_long=0
8656 fi
8657fi
8658
8659fi
8660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8661$as_echo "$ac_cv_sizeof_long_long" >&6; }
8662
8663
8664
8665cat >>confdefs.h <<_ACEOF
8666#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8667_ACEOF
8668
8669
8670# The cast to long int works around a bug in the HP C Compiler
8671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8673# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8675$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008676if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008678else
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 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 +00008680
Martin v. Löwis11437992002-04-12 09:54:03 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 if test "$ac_cv_type_void_p" = yes; then
8683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008685as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008686See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687 else
8688 ac_cv_sizeof_void_p=0
8689 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691
Martin v. Löwis11437992002-04-12 09:54:03 +00008692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8694$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695
8696
8697
Martin v. Löwis11437992002-04-12 09:54:03 +00008698cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008699#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008700_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008701
8702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703# The cast to long int works around a bug in the HP C Compiler
8704# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8705# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8706# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8708$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008709if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008711else
Matthias Kloseb9621712010-04-24 17:59:49 +00008712 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 +00008713
Martin v. Löwis11437992002-04-12 09:54:03 +00008714else
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 if test "$ac_cv_type_short" = yes; then
8716 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008718as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008719See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720 else
8721 ac_cv_sizeof_short=0
8722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008724
Martin v. Löwis11437992002-04-12 09:54:03 +00008725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8727$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728
8729
8730
Martin v. Löwis11437992002-04-12 09:54:03 +00008731cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008732#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008733_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008734
8735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736# The cast to long int works around a bug in the HP C Compiler
8737# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8738# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8739# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8741$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008742if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008744else
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 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 +00008746
Martin v. Löwis11437992002-04-12 09:54:03 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 if test "$ac_cv_type_float" = yes; then
8749 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008751as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008752See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753 else
8754 ac_cv_sizeof_float=0
8755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008757
Martin v. Löwis11437992002-04-12 09:54:03 +00008758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8760$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761
8762
8763
Martin v. Löwis11437992002-04-12 09:54:03 +00008764cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008765#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008766_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008767
8768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769# The cast to long int works around a bug in the HP C Compiler
8770# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8771# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8772# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8774$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008775if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008777else
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 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 +00008779
Martin v. Löwis11437992002-04-12 09:54:03 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 if test "$ac_cv_type_double" = yes; then
8782 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008784as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008785See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786 else
8787 ac_cv_sizeof_double=0
8788 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790
Martin v. Löwis11437992002-04-12 09:54:03 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8793$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794
8795
8796
Martin v. Löwis11437992002-04-12 09:54:03 +00008797cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008798#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008799_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008800
8801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802# The cast to long int works around a bug in the HP C Compiler
8803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8805# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8807$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008808if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008810else
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 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 +00008812
Martin v. Löwis11437992002-04-12 09:54:03 +00008813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 if test "$ac_cv_type_fpos_t" = yes; then
8815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008817as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008818See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819 else
8820 ac_cv_sizeof_fpos_t=0
8821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008823
Martin v. Löwis11437992002-04-12 09:54:03 +00008824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8826$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827
8828
8829
Martin v. Löwis11437992002-04-12 09:54:03 +00008830cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008831#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008832_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008833
Michael W. Hudson54241132001-12-07 15:38:26 +00008834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835# The cast to long int works around a bug in the HP C Compiler
8836# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8837# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8838# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8840$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008841if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008843else
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 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 +00008845
Martin v. Löwis18e16552006-02-15 17:27:45 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 if test "$ac_cv_type_size_t" = yes; then
8848 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8849$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008850as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008851See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008852 else
8853 ac_cv_sizeof_size_t=0
8854 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008856
Martin v. Löwis18e16552006-02-15 17:27:45 +00008857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8859$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860
8861
8862
Martin v. Löwis18e16552006-02-15 17:27:45 +00008863cat >>confdefs.h <<_ACEOF
8864#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8865_ACEOF
8866
8867
Christian Heimes400adb02008-02-01 08:12:03 +00008868# The cast to long int works around a bug in the HP C Compiler
8869# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8870# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8871# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8873$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008874if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008876else
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 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 +00008878
Christian Heimes400adb02008-02-01 08:12:03 +00008879else
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 if test "$ac_cv_type_pid_t" = yes; then
8881 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008883as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008884See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008885 else
8886 ac_cv_sizeof_pid_t=0
8887 fi
8888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008889
Christian Heimes400adb02008-02-01 08:12:03 +00008890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8892$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008893
8894
8895
8896cat >>confdefs.h <<_ACEOF
8897#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8898_ACEOF
8899
8900
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008901# The cast to long int works around a bug in the HP C Compiler
8902# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8903# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8904# This bug is HP SR number 8606223364.
8905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8906$as_echo_n "checking size of uintptr_t... " >&6; }
8907if ${ac_cv_sizeof_uintptr_t+:} false; then :
8908 $as_echo_n "(cached) " >&6
8909else
8910 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8911
8912else
8913 if test "$ac_cv_type_uintptr_t" = yes; then
8914 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8916as_fn_error 77 "cannot compute sizeof (uintptr_t)
8917See \`config.log' for more details" "$LINENO" 5; }
8918 else
8919 ac_cv_sizeof_uintptr_t=0
8920 fi
8921fi
8922
8923fi
8924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8925$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8926
8927
8928
8929cat >>confdefs.h <<_ACEOF
8930#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8931_ACEOF
8932
8933
Michael W. Hudson54241132001-12-07 15:38:26 +00008934
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008935
Eitan Adler3055c942018-05-15 22:58:09 -07008936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8937$as_echo_n "checking for long double... " >&6; }
8938if ${ac_cv_type_long_double+:} false; then :
8939 $as_echo_n "(cached) " >&6
8940else
8941 if test "$GCC" = yes; then
8942 ac_cv_type_long_double=yes
8943 else
8944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8945/* end confdefs.h. */
8946/* The Stardent Vistra knows sizeof (long double), but does
8947 not support it. */
8948 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008949int
8950main ()
8951{
Eitan Adler3055c942018-05-15 22:58:09 -07008952static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8953 sizeof (double) <= sizeof (long double))];
8954test_array [0] = 0;
8955return test_array [0];
8956
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008957 ;
8958 return 0;
8959}
8960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008961if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008962 ac_cv_type_long_double=yes
8963else
8964 ac_cv_type_long_double=no
8965fi
8966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8967 fi
8968fi
8969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8970$as_echo "$ac_cv_type_long_double" >&6; }
8971 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008972
Matthias Kloseb9621712010-04-24 17:59:49 +00008973$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008974
Eitan Adler3055c942018-05-15 22:58:09 -07008975 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008976
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008977# The cast to long int works around a bug in the HP C Compiler
8978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8980# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8982$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008983if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008985else
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 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 +00008987
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008988else
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 if test "$ac_cv_type_long_double" = yes; then
8990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008992as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008993See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008994 else
8995 ac_cv_sizeof_long_double=0
8996 fi
8997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9001$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009002
9003
9004
9005cat >>confdefs.h <<_ACEOF
9006#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9007_ACEOF
9008
9009
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011# The cast to long int works around a bug in the HP C Compiler
9012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9014# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9016$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009017if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00009019else
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 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 +00009021
Thomas Woutersb2137042007-02-01 18:02:27 +00009022else
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 if test "$ac_cv_type__Bool" = yes; then
9024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009026as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009027See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009028 else
9029 ac_cv_sizeof__Bool=0
9030 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009032
Thomas Woutersb2137042007-02-01 18:02:27 +00009033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9035$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036
9037
9038
Thomas Woutersb2137042007-02-01 18:02:27 +00009039cat >>confdefs.h <<_ACEOF
9040#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9041_ACEOF
9042
9043
Thomas Woutersb2137042007-02-01 18:02:27 +00009044
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045# The cast to long int works around a bug in the HP C Compiler
9046# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9047# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9048# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9050$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009051if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009055#ifdef HAVE_SYS_TYPES_H
9056#include <sys/types.h>
9057#endif
9058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009060
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009061else
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 if test "$ac_cv_type_off_t" = yes; then
9063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009065as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009066See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009067 else
9068 ac_cv_sizeof_off_t=0
9069 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009071
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9074$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009076
9077
Martin v. Löwis11437992002-04-12 09:54:03 +00009078cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009079#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009080_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009081
Michael W. Hudson54241132001-12-07 15:38:26 +00009082
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9085$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009086if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009087 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009088
Matthias Kloseb9621712010-04-24 17:59:49 +00009089$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9092$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009093else
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9095$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009096fi
9097
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009098# The cast to long int works around a bug in the HP C Compiler
9099# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9100# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9101# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9103$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009104if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009106else
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108#ifdef HAVE_SYS_TYPES_H
9109#include <sys/types.h>
9110#endif
9111#ifdef HAVE_TIME_H
9112#include <time.h>
9113#endif
9114
Matthias Kloseb9621712010-04-24 17:59:49 +00009115"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009117else
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 if test "$ac_cv_type_time_t" = yes; then
9119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009121as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009122See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009123 else
9124 ac_cv_sizeof_time_t=0
9125 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009127
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9130$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009131
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009132
9133
Martin v. Löwis11437992002-04-12 09:54:03 +00009134cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009135#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009136_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009137
Michael W. Hudson54241132001-12-07 15:38:26 +00009138
9139
Trent Mick635f6fb2000-08-23 21:33:05 +00009140# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009141ac_save_cc="$CC"
9142if test "$ac_cv_kpthread" = "yes"
9143then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009144elif test "$ac_cv_kthread" = "yes"
9145then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009146elif test "$ac_cv_pthread" = "yes"
9147then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009148fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009149
Matthias Kloseb9621712010-04-24 17:59:49 +00009150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9151$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009152have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009154/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009155
9156 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Guido van Rossum12580492000-09-24 16:47:19 +00009160pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 ;
9162 return 0;
9163}
Matthias Kloseb159a552010-04-25 21:00:44 +00009164
Martin v. Löwis11437992002-04-12 09:54:03 +00009165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009166if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009167 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9171$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009172if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009173 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009174# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9175# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9176# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9178$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009179if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009180 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009181else
Matthias Kloseb9621712010-04-24 17:59:49 +00009182 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009183#ifdef HAVE_PTHREAD_H
9184#include <pthread.h>
9185#endif
9186
Matthias Kloseb9621712010-04-24 17:59:49 +00009187"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009188
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009189else
Matthias Kloseb9621712010-04-24 17:59:49 +00009190 if test "$ac_cv_type_pthread_t" = yes; then
9191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009193as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009194See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009195 else
9196 ac_cv_sizeof_pthread_t=0
9197 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009199
Trent Mick635f6fb2000-08-23 21:33:05 +00009200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9202$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009203
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009204
9205
Martin v. Löwis11437992002-04-12 09:54:03 +00009206cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009207#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009208_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009210
Trent Mick635f6fb2000-08-23 21:33:05 +00009211fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009212
9213# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9214# This checking will be unnecessary after removing deprecated TLS API.
9215# The cast to long int works around a bug in the HP C Compiler
9216# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9217# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9218# This bug is HP SR number 8606223364.
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9220$as_echo_n "checking size of pthread_key_t... " >&6; }
9221if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9222 $as_echo_n "(cached) " >&6
9223else
9224 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9225"; then :
9226
9227else
9228 if test "$ac_cv_type_pthread_key_t" = yes; then
9229 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9230$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9231as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9232See \`config.log' for more details" "$LINENO" 5; }
9233 else
9234 ac_cv_sizeof_pthread_key_t=0
9235 fi
9236fi
9237
9238fi
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9240$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9241
9242
9243
9244cat >>confdefs.h <<_ACEOF
9245#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9246_ACEOF
9247
9248
9249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9250$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9251if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9253/* end confdefs.h. */
9254#include <pthread.h>
9255int
9256main ()
9257{
9258pthread_key_t k; k * 1;
9259 ;
9260 return 0;
9261}
9262_ACEOF
9263if ac_fn_c_try_compile "$LINENO"; then :
9264 ac_pthread_key_t_is_arithmetic_type=yes
9265else
9266 ac_pthread_key_t_is_arithmetic_type=no
9267
9268fi
9269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9271$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9272 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9273
9274$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9275
9276 fi
9277else
9278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
9280fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009281CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009282
Michael W. Hudson54241132001-12-07 15:38:26 +00009283
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009284case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009285 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009286 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9287 ;;
9288 Darwin/*)
9289 OTHER_LIBTOOL_OPT=""
9290 ;;
9291esac
9292
9293
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009294
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009295case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009296 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009297 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9298 if test "${enable_universalsdk}"; then
9299 :
9300 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009301 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009302 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009303 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009304 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009305 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009306 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009307 if test ${gcc_version} '<' 4.0
9308 then
9309 LIBTOOL_CRUFT="-lcc_dynamic"
9310 else
9311 LIBTOOL_CRUFT=""
9312 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009314 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009315else
Matthias Kloseb9621712010-04-24 17:59:49 +00009316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009317/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009318
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009319 #include <unistd.h>
9320 int main(int argc, char*argv[])
9321 {
9322 if (sizeof(long) == 4) {
9323 return 0;
9324 } else {
9325 return 1;
9326 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009327 }
9328
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009330if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009331 ac_osx_32bit=yes
9332else
Matthias Kloseb9621712010-04-24 17:59:49 +00009333 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9336 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009337fi
9338
9339
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009340 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009341 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009342 i386)
9343 MACOSX_DEFAULT_ARCH="i386"
9344 ;;
9345 ppc)
9346 MACOSX_DEFAULT_ARCH="ppc"
9347 ;;
9348 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009349 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009350 ;;
9351 esac
9352 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009353 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009354 i386)
9355 MACOSX_DEFAULT_ARCH="x86_64"
9356 ;;
9357 ppc)
9358 MACOSX_DEFAULT_ARCH="ppc64"
9359 ;;
9360 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009361 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009362 ;;
9363 esac
9364
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009365 fi
9366
9367 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009368 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009369 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009370esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9372$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009373if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009374then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009375 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009377 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009378
Matthias Kloseb9621712010-04-24 17:59:49 +00009379$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009380
Matthias Kloseb9621712010-04-24 17:59:49 +00009381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9382$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009383 if test $enable_shared = "yes"
9384 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009385 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 +00009386 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009387else
Matthias Kloseb9621712010-04-24 17:59:49 +00009388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9389$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009390fi
9391
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9393$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009394case $ac_sys_system/$ac_sys_release in
9395 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009396
Matthias Kloseb9621712010-04-24 17:59:49 +00009397$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009398
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9400$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009401 ;;
9402 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9404$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009405 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009406esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009407
Guido van Rossum0a516c91994-09-12 10:58:40 +00009408# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009409
Michael W. Hudson54241132001-12-07 15:38:26 +00009410
9411
9412
9413
Benjamin Peterson99f03762010-04-11 22:15:28 +00009414
Thomas Wouters477c8d52006-05-27 19:21:47 +00009415
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009416# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9417# -- usually .so, .sl on HP-UX, .dll on Cygwin
9418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9419$as_echo_n "checking the extension of shared libraries... " >&6; }
9420if test -z "$SHLIB_SUFFIX"; then
9421 case $ac_sys_system in
9422 hp*|HP*)
9423 case `uname -m` in
9424 ia64) SHLIB_SUFFIX=.so;;
9425 *) SHLIB_SUFFIX=.sl;;
9426 esac
9427 ;;
9428 CYGWIN*) SHLIB_SUFFIX=.dll;;
9429 *) SHLIB_SUFFIX=.so;;
9430 esac
9431fi
9432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9433$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009434
Guido van Rossum0a516c91994-09-12 10:58:40 +00009435# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009436# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009437# (Shared libraries in this instance are shared modules to be loaded into
9438# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9440$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009441if test -z "$LDSHARED"
9442then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009443 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009444 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009445 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009446 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009447 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009449 if test "$GCC" = "yes" ; then
9450 LDSHARED='$(CC) -shared'
9451 LDCXXSHARED='$(CXX) -shared'
9452 else
9453 LDSHARED='$(CC) -G'
9454 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009455 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009456 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009457 if test "$GCC" = "yes" ; then
9458 LDSHARED='$(CC) -shared'
9459 LDCXXSHARED='$(CXX) -shared'
9460 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009461 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009462 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009463 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009464 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009465 LDSHARED='$(CC) -bundle'
9466 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009467 if test "$enable_framework" ; then
9468 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009469 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9470 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009471 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009472 else
9473 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009474 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009475 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009476 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009477 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009478 LDSHARED='$(CC) -bundle'
9479 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +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 Jansene578a632001-08-15 01:27:14 +00009485 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009486 # No framework, use the Python app as bundle-loader
9487 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009488 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009489 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009490 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009491 Darwin/*)
9492 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9493 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009494
Ned Deily36820b62014-06-25 13:44:22 -07009495 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9496 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9497 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9498 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9499 if test ${dep_target_major} -eq 10 && \
9500 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009501 then
Ned Deily36820b62014-06-25 13:44:22 -07009502 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009503 LDSHARED='$(CC) -bundle'
9504 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009505 if test "$enable_framework" ; then
9506 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009507 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9508 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009509 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009510 else
9511 # No framework, use the Python app as bundle-loader
9512 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9513 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009514 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009515 fi
Ned Deily36820b62014-06-25 13:44:22 -07009516 else
9517 # building for OS X 10.3 and later
9518 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9519 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9520 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009521 fi
9522 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009523 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009524 LDSHARED='$(CC) -shared'
9525 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009526 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009527 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009528 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009529 LDSHARED='$(CC) -shared'
9530 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009531 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009532 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009533 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009534 OpenBSD*)
9535 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9536 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009537 LDSHARED='$(CC) -shared $(CCSHARED)'
9538 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009539 else
9540 case `uname -r` in
9541 [01].* | 2.[0-7] | 2.[0-7].*)
9542 LDSHARED="ld -Bshareable ${LDFLAGS}"
9543 ;;
9544 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009545 LDSHARED='$(CC) -shared $(CCSHARED)'
9546 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009547 ;;
9548 esac
9549 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009550 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009551 LDSHARED='$(CC) -shared'
9552 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009553 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009554 if test "$GCC" = "yes" ; then
9555 LDSHARED='$(CC) -shared'
9556 LDCXXSHARED='$(CXX) -shared'
9557 else
9558 LDSHARED='$(CC) -G'
9559 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009560 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009561 SCO_SV*)
9562 LDSHARED='$(CC) -Wl,-G,-Bexport'
9563 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9564 CYGWIN*)
9565 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9566 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009567 *) LDSHARED="ld";;
9568 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9571$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009572LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009573BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009574# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009575# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9577$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009578if test -z "$CCSHARED"
9579then
Guido van Rossum07397971997-04-29 21:49:50 +00009580 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009581 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009582 then CCSHARED="-fPIC";
9583 elif test `uname -p` = sparc;
9584 then CCSHARED="-xcode=pic32";
9585 else CCSHARED="-Kpic";
9586 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009587 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009588 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009589 else CCSHARED="+z";
9590 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009591 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009592 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009593 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009594 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009595 if test "$GCC" = "yes"
9596 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009597 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009598 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009599 SCO_SV*)
9600 if test "$GCC" = "yes"
9601 then CCSHARED="-fPIC"
9602 else CCSHARED="-Kpic -belf"
9603 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009604 VxWorks*)
9605 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009606 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9609$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009610# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009611# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9613$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009614if test -z "$LINKFORSHARED"
9615then
Guido van Rossum07397971997-04-29 21:49:50 +00009616 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009617 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009618 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009619 LINKFORSHARED="-Wl,-E -Wl,+s";;
9620# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009621 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009622 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009623 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009625 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009626
9627 # Issue #18075: the default maximum stack size (8MBytes) is too
9628 # small for the default recursion limit. Increase the stack size
9629 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009630 # Note: This matches the value of THREAD_STACK_SIZE in
9631 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009632 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9633
Jack Jansene578a632001-08-15 01:27:14 +00009634 if test "$enable_framework"
9635 then
Jack Jansenda49e192005-01-07 13:08:22 +00009636 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009637 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009638 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009639 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009640 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009641 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009642 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009643 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9644 then
9645 LINKFORSHARED="-Wl,--export-dynamic"
9646 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009647 SunOS/5*) case $CC in
9648 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009649 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009650 then
9651 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009652 fi;;
9653 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009654 CYGWIN*)
9655 if test $enable_shared = "no"
9656 then
9657 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9658 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009659 QNX*)
9660 # -Wl,-E causes the symbols to be added to the dynamic
9661 # symbol table so that they can be found when a module
9662 # is loaded. -N 2048K causes the stack size to be set
9663 # to 2048 kilobytes so that the stack doesn't overflow
9664 # when running test_compile.py.
9665 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009666 VxWorks*)
9667 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009668 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9671$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009672
Michael W. Hudson54241132001-12-07 15:38:26 +00009673
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009674
Matthias Kloseb9621712010-04-24 17:59:49 +00009675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9676$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009677if test ! "$LIBRARY" = "$LDLIBRARY"
9678then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009679 case $ac_sys_system in
9680 CYGWIN*)
9681 # Cygwin needs CCSHARED when building extension DLLs
9682 # but not when building the interpreter DLL.
9683 CFLAGSFORSHARED='';;
9684 *)
9685 CFLAGSFORSHARED='$(CCSHARED)'
9686 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9689$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009690
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009691# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9692# library (with --enable-shared).
9693# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009694# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9695# if it is not required, since it creates a dependency of the shared library
9696# to LIBS. This, in turn, means that applications linking the shared libpython
9697# don't need to link LIBS explicitly. The default should be only changed
9698# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009699
Matthias Kloseb9621712010-04-24 17:59:49 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9701$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009702case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009703 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009704 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009705esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9707$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009708
9709
Guido van Rossum627b2d71993-12-24 10:39:16 +00009710# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9712$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009713if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009714 $as_echo_n "(cached) " >&6
9715else
9716 ac_check_lib_save_LIBS=$LIBS
9717LIBS="-lsendfile $LIBS"
9718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9719/* end confdefs.h. */
9720
9721/* Override any GCC internal prototype to avoid an error.
9722 Use char because int might match the return type of a GCC
9723 builtin and then its argument prototype would still apply. */
9724#ifdef __cplusplus
9725extern "C"
9726#endif
9727char sendfile ();
9728int
9729main ()
9730{
9731return sendfile ();
9732 ;
9733 return 0;
9734}
9735_ACEOF
9736if ac_fn_c_try_link "$LINENO"; then :
9737 ac_cv_lib_sendfile_sendfile=yes
9738else
9739 ac_cv_lib_sendfile_sendfile=no
9740fi
9741rm -f core conftest.err conftest.$ac_objext \
9742 conftest$ac_exeext conftest.$ac_ext
9743LIBS=$ac_check_lib_save_LIBS
9744fi
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9746$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009747if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009748 cat >>confdefs.h <<_ACEOF
9749#define HAVE_LIBSENDFILE 1
9750_ACEOF
9751
9752 LIBS="-lsendfile $LIBS"
9753
9754fi
9755
Matthias Kloseb9621712010-04-24 17:59:49 +00009756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9757$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009758if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009759 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009760else
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009762LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009766/* Override any GCC internal prototype to avoid an error.
9767 Use char because int might match the return type of a GCC
9768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009769#ifdef __cplusplus
9770extern "C"
9771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009772char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009773int
9774main ()
9775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ;
9778 return 0;
9779}
9780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009783else
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009786rm -f core conftest.err conftest.$ac_objext \
9787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009788LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9791$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009792if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 cat >>confdefs.h <<_ACEOF
9794#define HAVE_LIBDL 1
9795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009797 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009798
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009799fi
9800 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9802$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009803if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009805else
Martin v. Löwis11437992002-04-12 09:54:03 +00009806 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009807LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811/* Override any GCC internal prototype to avoid an error.
9812 Use char because int might match the return type of a GCC
9813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009814#ifdef __cplusplus
9815extern "C"
9816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009817char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009818int
9819main ()
9820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 ;
9823 return 0;
9824}
9825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009826if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009828else
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009831rm -f core conftest.err conftest.$ac_objext \
9832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009833LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9836$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009837if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 cat >>confdefs.h <<_ACEOF
9839#define HAVE_LIBDLD 1
9840_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009841
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009842 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009844fi
9845 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009846
Michael Felt0d3ccb42017-12-30 22:39:20 +01009847# checks for uuid.h location
9848for ac_header in uuid/uuid.h uuid.h
9849do :
9850 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9851ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9852if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9853 cat >>confdefs.h <<_ACEOF
9854#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9855_ACEOF
9856
9857fi
9858
9859done
9860
9861
Berker Peksag9a10ff42017-11-08 23:09:16 +03009862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9863$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9865/* end confdefs.h. */
9866#include <uuid/uuid.h>
9867int
9868main ()
9869{
9870
9871#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009872void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009873#endif
9874
9875 ;
9876 return 0;
9877}
9878_ACEOF
9879if ac_fn_c_try_compile "$LINENO"; then :
9880
9881$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9882
9883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9884$as_echo "yes" >&6; }
9885else
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9887$as_echo "no" >&6; }
9888
9889fi
9890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9891
Michael Felt0d3ccb42017-12-30 22:39:20 +01009892# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009893# FreeBSD and OpenBSD provides support as well
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9895$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897/* end confdefs.h. */
9898#include <uuid.h>
9899int
9900main ()
9901{
9902
9903#ifndef uuid_create
9904void *x = uuid_create
9905#endif
9906
9907 ;
9908 return 0;
9909}
9910_ACEOF
9911if ac_fn_c_try_compile "$LINENO"; then :
9912
9913$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9914
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9916$as_echo "yes" >&6; }
9917else
9918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9919$as_echo "no" >&6; }
9920
9921fi
9922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9923
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009924# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9925# stream in big-endian byte-order
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9927$as_echo_n "checking for uuid_enc_be... " >&6; }
9928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9929/* end confdefs.h. */
9930#include <uuid.h>
9931int
9932main ()
9933{
9934
9935#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009936void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009937#endif
9938
9939 ;
9940 return 0;
9941}
9942_ACEOF
9943if ac_fn_c_try_compile "$LINENO"; then :
9944
9945$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9946
9947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9948$as_echo "yes" >&6; }
9949else
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952
9953fi
9954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9955
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009956# 'Real Time' functions on Solaris
9957# posix4 on Solaris 2.6
9958# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009960$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009961if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009963else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009964 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968/* Override any GCC internal prototype to avoid an error.
9969 Use char because int might match the return type of a GCC
9970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009971#ifdef __cplusplus
9972extern "C"
9973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009974char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009975int
9976main ()
9977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 ;
9980 return 0;
9981}
9982_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009983for ac_lib in '' pthread rt posix4; do
9984 if test -z "$ac_lib"; then
9985 ac_res="none required"
9986 else
9987 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009988 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009989 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009991 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009993rm -f core conftest.err conftest.$ac_objext \
9994 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009995 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009998done
Victor Stinnere0be4232011-10-25 13:06:09 +02009999if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010001else
10002 ac_cv_search_sem_init=no
10003fi
10004rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010005LIBS=$ac_func_search_save_LIBS
10006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10008$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +000010010if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010011 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010012
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010013fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010014
Martin v. Löwis519adae2003-09-20 10:47:47 +000010015
Martin v. Löwis19d17342003-06-14 21:03:05 +000010016# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10018$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010019if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000010021else
10022 ac_check_lib_save_LIBS=$LIBS
10023LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010025/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010027/* Override any GCC internal prototype to avoid an error.
10028 Use char because int might match the return type of a GCC
10029 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010030#ifdef __cplusplus
10031extern "C"
10032#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010033char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010034int
10035main ()
10036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010038 ;
10039 return 0;
10040}
10041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010043 ac_cv_lib_intl_textdomain=yes
10044else
Matthias Kloseb9621712010-04-24 17:59:49 +000010045 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010047rm -f core conftest.err conftest.$ac_objext \
10048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010049LIBS=$ac_check_lib_save_LIBS
10050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10052$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010053if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010056
Brett Cannonc6d936e2009-06-07 20:09:53 +000010057 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010058fi
10059
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010060
10061# checks for system dependent C++ extensions support
10062case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010063 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10064$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010066/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010067
Georg Brandl59e87bd2011-02-15 19:48:59 +000010068 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010069int
10070main ()
10071{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010072loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 ;
10074 return 0;
10075}
Matthias Kloseb159a552010-04-25 21:00:44 +000010076
Martin v. Löwis11437992002-04-12 09:54:03 +000010077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010078if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010079
Matthias Kloseb159a552010-04-25 21:00:44 +000010080
Matthias Kloseb9621712010-04-24 17:59:49 +000010081$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010082
Matthias Kloseb159a552010-04-25 21:00:44 +000010083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010084$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010085
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010086else
Matthias Kloseb159a552010-04-25 21:00:44 +000010087
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010089$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010090
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010092rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010093 conftest$ac_exeext conftest.$ac_ext
10094# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10095# of the AIX system used to build/package Python executable. This tag serves
10096# as a baseline for bdist module packages
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10098$as_echo_n "checking for the system builddate... " >&6; }
10099 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10100
10101cat >>confdefs.h <<_ACEOF
10102#define AIX_BUILDDATE $AIX_BUILDDATE
10103_ACEOF
10104
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10106$as_echo "$AIX_BUILDDATE" >&6; }
10107 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010108 *) ;;
10109esac
10110
Christian Heimes985ecdc2013-11-20 11:46:18 +010010111# check for systems that require aligned memory access
10112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10113$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010114if ${ac_cv_aligned_required+:} false; then :
10115 $as_echo_n "(cached) " >&6
10116else
10117 if test "$cross_compiling" = yes; then :
10118 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010119else
10120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10121/* end confdefs.h. */
10122
10123int main()
10124{
10125 char s[16];
10126 int i, *p1, *p2;
10127 for (i=0; i < 16; i++)
10128 s[i] = i;
10129 p1 = (int*)(s+1);
10130 p2 = (int*)(s+2);
10131 if (*p1 == *p2)
10132 return 1;
10133 return 0;
10134}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010135_ACEOF
10136if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010137 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010138else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010139 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010140fi
10141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10142 conftest.$ac_objext conftest.beam conftest.$ac_ext
10143fi
10144
10145
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010146fi
10147
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10149$as_echo "$ac_cv_aligned_required" >&6; }
10150if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010151
10152$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10153
10154fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010155
10156# str, bytes and memoryview hash algorithm
10157
10158
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10160$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10161
10162# Check whether --with-hash_algorithm was given.
10163if test "${with_hash_algorithm+set}" = set; then :
10164 withval=$with_hash_algorithm;
10165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10166$as_echo "$withval" >&6; }
10167case "$withval" in
10168 siphash24)
10169 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10170
10171 ;;
10172 fnv)
10173 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10174
10175 ;;
10176 *)
10177 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10178 ;;
10179esac
10180
10181else
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10183$as_echo "default" >&6; }
10184fi
10185
10186
Paul Ganssle62972d92020-05-16 04:20:06 -040010187validate_tzpath() {
10188 # Checks that each element of hte path is an absolute path
10189 if test -z "$1"; then
10190 # Empty string is allowed: it indicates no system TZPATH
10191 return 0
10192 fi
10193
10194 # Bad paths are those that don't start with /
10195 if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
10196 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10197 return 1;
10198 fi
10199}
10200
10201TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10203$as_echo_n "checking for --with-tzpath... " >&6; }
10204
10205# Check whether --with-tzpath was given.
10206if test "${with_tzpath+set}" = set; then :
10207 withval=$with_tzpath;
10208case "$withval" in
10209 yes)
10210 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10211 ;;
10212 *)
10213 validate_tzpath "$withval"
10214 TZPATH="$withval"
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10216$as_echo "\"$withval\"" >&6; }
10217 ;;
10218esac
10219
10220else
10221 validate_tzpath "$TZPATH"
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10223$as_echo "\"$TZPATH\"" >&6; }
10224fi
10225
10226
10227
Charles-François Natalid30b0222014-05-08 23:08:51 +010010228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10229$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10230
10231# Check whether --with-address_sanitizer was given.
10232if test "${with_address_sanitizer+set}" = set; then :
10233 withval=$with_address_sanitizer;
10234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10235$as_echo "$withval" >&6; }
10236BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10237LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010238# ASan works by controlling memory allocation, our own malloc interferes.
10239with_pymalloc="no"
10240
10241else
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10243$as_echo "no" >&6; }
10244fi
10245
10246
10247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10248$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10249
10250# Check whether --with-memory_sanitizer was given.
10251if test "${with_memory_sanitizer+set}" = set; then :
10252 withval=$with_memory_sanitizer;
10253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10254$as_echo "$withval" >&6; }
10255BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10256LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10257# MSan works by controlling memory allocation, our own malloc interferes.
10258with_pymalloc="no"
10259
10260else
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262$as_echo "no" >&6; }
10263fi
10264
10265
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10267$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10268
10269# Check whether --with-undefined_behavior_sanitizer was given.
10270if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10271 withval=$with_undefined_behavior_sanitizer;
10272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10273$as_echo "$withval" >&6; }
10274BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10275LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010276
10277else
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
10280fi
10281
10282
Guido van Rossum70c7f481998-03-26 18:44:10 +000010283# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10285$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010286if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010288else
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010290LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294/* Override any GCC internal prototype to avoid an error.
10295 Use char because int might match the return type of a GCC
10296 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010297#ifdef __cplusplus
10298extern "C"
10299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010300char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010301int
10302main ()
10303{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ;
10306 return 0;
10307}
10308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010309if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010311else
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010314rm -f core conftest.err conftest.$ac_objext \
10315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010316LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10319$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010320if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010321 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010322fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010323 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10325$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010326if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010328else
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010330LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334/* Override any GCC internal prototype to avoid an error.
10335 Use char because int might match the return type of a GCC
10336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337#ifdef __cplusplus
10338extern "C"
10339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010340char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010341int
10342main ()
10343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ;
10346 return 0;
10347}
10348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010351else
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010354rm -f core conftest.err conftest.$ac_objext \
10355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010356LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10359$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010360if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010361 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010362fi
10363 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010364
Matthias Kloseb9621712010-04-24 17:59:49 +000010365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10366$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10372$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010373LIBS="$withval $LIBS"
10374
10375else
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378fi
10379
Guido van Rossum7f43da71994-08-01 12:15:30 +000010380
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010381
10382
10383
10384
10385
10386
Victor Stinnerb477d192020-01-22 22:48:16 +010010387
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010388if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10389 if test -n "$ac_tool_prefix"; then
10390 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10391set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10393$as_echo_n "checking for $ac_word... " >&6; }
10394if ${ac_cv_path_PKG_CONFIG+:} false; then :
10395 $as_echo_n "(cached) " >&6
10396else
10397 case $PKG_CONFIG in
10398 [\\/]* | ?:[\\/]*)
10399 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10400 ;;
10401 *)
10402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10403for as_dir in $PATH
10404do
10405 IFS=$as_save_IFS
10406 test -z "$as_dir" && as_dir=.
10407 for ac_exec_ext in '' $ac_executable_extensions; do
10408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10409 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10411 break 2
10412 fi
10413done
10414 done
10415IFS=$as_save_IFS
10416
10417 ;;
10418esac
10419fi
10420PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10421if test -n "$PKG_CONFIG"; then
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10423$as_echo "$PKG_CONFIG" >&6; }
10424else
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427fi
10428
10429
10430fi
10431if test -z "$ac_cv_path_PKG_CONFIG"; then
10432 ac_pt_PKG_CONFIG=$PKG_CONFIG
10433 # Extract the first word of "pkg-config", so it can be a program name with args.
10434set dummy pkg-config; ac_word=$2
10435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10436$as_echo_n "checking for $ac_word... " >&6; }
10437if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10438 $as_echo_n "(cached) " >&6
10439else
10440 case $ac_pt_PKG_CONFIG in
10441 [\\/]* | ?:[\\/]*)
10442 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10443 ;;
10444 *)
10445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10446for as_dir in $PATH
10447do
10448 IFS=$as_save_IFS
10449 test -z "$as_dir" && as_dir=.
10450 for ac_exec_ext in '' $ac_executable_extensions; do
10451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10452 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10454 break 2
10455 fi
10456done
10457 done
10458IFS=$as_save_IFS
10459
10460 ;;
10461esac
10462fi
10463ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10464if test -n "$ac_pt_PKG_CONFIG"; then
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10466$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10467else
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10469$as_echo "no" >&6; }
10470fi
10471
10472 if test "x$ac_pt_PKG_CONFIG" = x; then
10473 PKG_CONFIG=""
10474 else
10475 case $cross_compiling:$ac_tool_warned in
10476yes:)
10477{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10478$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10479ac_tool_warned=yes ;;
10480esac
10481 PKG_CONFIG=$ac_pt_PKG_CONFIG
10482 fi
10483else
10484 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10485fi
10486
10487fi
10488if test -n "$PKG_CONFIG"; then
10489 _pkg_min_version=0.9.0
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10491$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10492 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10494$as_echo "yes" >&6; }
10495 else
10496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
10498 PKG_CONFIG=""
10499 fi
10500fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010501
10502# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10504$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010505
10506# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010507if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010508 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010509else
10510 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010511fi
10512
10513
Matthias Kloseb9621712010-04-24 17:59:49 +000010514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10515$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010516
10517# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10519$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010520
10521# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010522if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010523 withval=$with_system_ffi;
10524fi
10525
10526
Zachary Waref40d4dd2016-09-17 01:25:24 -050010527if test "$ac_sys_system" = "Darwin"
10528then
10529 case "$with_system_ffi" in
10530 "")
10531 with_system_ffi="no"
10532 ;;
10533 yes|no)
10534 ;;
10535 *)
10536 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10537 ;;
10538 esac
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10540$as_echo "$with_system_ffi" >&6; }
10541else
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10543$as_echo "yes" >&6; }
10544 if test "$with_system_ffi" != ""
10545 then
10546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10547$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10548 fi
10549 with_system_ffi="yes"
10550fi
Zachary Ware935043d2016-09-09 17:01:21 -070010551
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010552if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010553 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10554else
10555 LIBFFI_INCLUDEDIR=""
10556fi
10557
10558
Stefan Krah60187b52012-03-23 19:06:27 +010010559# Check for use of the system libmpdec library
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10561$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10562
10563# Check whether --with-system_libmpdec was given.
10564if test "${with_system_libmpdec+set}" = set; then :
10565 withval=$with_system_libmpdec;
10566else
10567 with_system_libmpdec="no"
10568fi
10569
10570
10571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10572$as_echo "$with_system_libmpdec" >&6; }
10573
Stefan Krah815280e2020-02-29 19:43:42 +010010574# Check whether _decimal should use a coroutine-local or thread-local context
10575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10576$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10577
10578# Check whether --with-decimal_contextvar was given.
10579if test "${with_decimal_contextvar+set}" = set; then :
10580 withval=$with_decimal_contextvar;
10581else
10582 with_decimal_contextvar="yes"
10583fi
10584
10585
10586if test "$with_decimal_contextvar" != "no"
10587then
10588
10589$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10590
10591fi
10592
10593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10594$as_echo "$with_decimal_contextvar" >&6; }
10595
Benjamin Peterson076ed002010-10-31 17:11:02 +000010596# Check for support for loadable sqlite extensions
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10598$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10599# Check whether --enable-loadable-sqlite-extensions was given.
10600if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10601 enableval=$enable_loadable_sqlite_extensions;
10602else
10603 enable_loadable_sqlite_extensions="no"
10604fi
10605
10606
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10608$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10609
Ned Deilyd819b932013-09-06 01:07:05 -070010610# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10611
10612
10613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10614$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10615
10616# Check whether --with-tcltk-includes was given.
10617if test "${with_tcltk_includes+set}" = set; then :
10618 withval=$with_tcltk_includes;
10619else
10620 with_tcltk_includes="default"
10621fi
10622
10623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10624$as_echo "$with_tcltk_includes" >&6; }
10625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10626$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10627
10628# Check whether --with-tcltk-libs was given.
10629if test "${with_tcltk_libs+set}" = set; then :
10630 withval=$with_tcltk_libs;
10631else
10632 with_tcltk_libs="default"
10633fi
10634
10635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10636$as_echo "$with_tcltk_libs" >&6; }
10637if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10638then
10639 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10640 then
10641 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10642 fi
10643 TCLTK_INCLUDES=""
10644 TCLTK_LIBS=""
10645else
10646 TCLTK_INCLUDES="$with_tcltk_includes"
10647 TCLTK_LIBS="$with_tcltk_libs"
10648fi
10649
Matthias Klose55708cc2009-04-30 08:06:49 +000010650# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10652$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010653
10654# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010655if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010656 withval=$with_dbmliborder;
10657if test x$with_dbmliborder = xyes
10658then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010659as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010660else
10661 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10662 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10663 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010664 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010665 fi
10666 done
10667fi
10668fi
10669
Matthias Kloseb9621712010-04-24 17:59:49 +000010670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10671$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010672
Martin v. Löwis11437992002-04-12 09:54:03 +000010673# Templates for things AC_DEFINEd more than once.
10674# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010675
10676
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010677if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010678then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010679 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010681
10682 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010683 if test "$ac_sys_system" = "SunOS"; then
10684 CFLAGS="$CFLAGS -D_REENTRANT"
10685 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010686elif test "$ac_cv_kpthread" = "yes"
10687then
10688 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010689 if test "$ac_cv_cxx_thread" = "yes"; then
10690 CXX="$CXX -Kpthread"
10691 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010692 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010693elif test "$ac_cv_kthread" = "yes"
10694then
10695 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010696 if test "$ac_cv_cxx_thread" = "yes"; then
10697 CXX="$CXX -Kthread"
10698 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010699 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010700elif test "$ac_cv_pthread" = "yes"
10701then
10702 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010703 if test "$ac_cv_cxx_thread" = "yes"; then
10704 CXX="$CXX -pthread"
10705 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010707else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010708 if test ! -z "$withval" -a -d "$withval"
10709 then LDFLAGS="$LDFLAGS -L$withval"
10710 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010711
10712 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010713 # define _POSIX_THREADS in unistd.h. Some apparently don't
10714 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10716$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010718/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010719
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010720#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010721#ifdef _POSIX_THREADS
10722yes
10723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010724
10725_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010726if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010728 unistd_defines_pthreads=yes
10729else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010730 unistd_defines_pthreads=no
10731fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010732rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010733
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10735$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010738
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010739 # Just looking for pthread_create in libpthread is not enough:
10740 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10741 # So we really have to include pthread.h, and then link.
10742 _libs=$LIBS
10743 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10745$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010747/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010748
10749#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010750#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010751
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010752void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010753int
10754main ()
10755{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010756
10757pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010758 ;
10759 return 0;
10760}
10761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010763
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10765$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010766 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010767
Guido van Rossum02a1c402000-02-25 19:26:31 +000010768else
Martin v. Löwis11437992002-04-12 09:54:03 +000010769
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010770 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010772if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010773
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010774 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010775
Guido van Rossumad678af1998-10-02 14:42:15 +000010776else
Guido van Rossumad678af1998-10-02 14:42:15 +000010777
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10779$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010780if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782else
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010784LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788/* Override any GCC internal prototype to avoid an error.
10789 Use char because int might match the return type of a GCC
10790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010791#ifdef __cplusplus
10792extern "C"
10793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010794char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010795int
10796main ()
10797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 ;
10800 return 0;
10801}
10802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010803if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010808rm -f core conftest.err conftest.$ac_objext \
10809 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010810LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10813$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010814if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010815
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010816 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010817 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010818
Greg Steinadf63d62000-07-05 10:38:09 +000010819else
Greg Steinadf63d62000-07-05 10:38:09 +000010820
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10822$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010823if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010825else
Martin v. Löwis11437992002-04-12 09:54:03 +000010826 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010827LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010831/* Override any GCC internal prototype to avoid an error.
10832 Use char because int might match the return type of a GCC
10833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010834#ifdef __cplusplus
10835extern "C"
10836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010837char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010838int
10839main ()
10840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010841return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010842 ;
10843 return 0;
10844}
10845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010848else
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010851rm -f core conftest.err conftest.$ac_objext \
10852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010853LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10856$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010857if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010858
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010859 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010860 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010861
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010862else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010863
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10865$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010866if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010868else
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010870LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010874/* Override any GCC internal prototype to avoid an error.
10875 Use char because int might match the return type of a GCC
10876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010877#ifdef __cplusplus
10878extern "C"
10879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010880char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010881int
10882main ()
10883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010884return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 ;
10886 return 0;
10887}
10888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010894rm -f core conftest.err conftest.$ac_objext \
10895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10899$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010900if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010901
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010902 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010903 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010904
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010905else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10908$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010909if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010911else
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010913LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010917/* Override any GCC internal prototype to avoid an error.
10918 Use char because int might match the return type of a GCC
10919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010920#ifdef __cplusplus
10921extern "C"
10922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010923char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010924int
10925main ()
10926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010928 ;
10929 return 0;
10930}
10931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010933 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010934else
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010937rm -f core conftest.err conftest.$ac_objext \
10938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010939LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10942$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010943if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010944
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010945 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010946 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010947
Guido van Rossumb93a8621998-05-07 13:27:32 +000010948else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010949
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010950 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10951
Guido van Rossum2d38f911996-06-26 19:47:01 +000010952fi
10953
Guido van Rossum627b2d71993-12-24 10:39:16 +000010954
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010955fi
10956
Guido van Rossum0be3e491997-05-22 20:33:33 +000010957fi
10958
Guido van Rossum49545951997-12-02 19:28:29 +000010959fi
10960
Guido van Rossumb93a8621998-05-07 13:27:32 +000010961fi
10962
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010964rm -f core conftest.err conftest.$ac_objext \
10965 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10968$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010969if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010971else
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010973LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977/* Override any GCC internal prototype to avoid an error.
10978 Use char because int might match the return type of a GCC
10979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010980#ifdef __cplusplus
10981extern "C"
10982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010983char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010984int
10985main ()
10986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010987return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 ;
10989 return 0;
10990}
10991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010993 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010994else
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010997rm -f core conftest.err conftest.$ac_objext \
10998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010999LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11002$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011003if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011004
Martin v. Löwis130fb172001-07-19 11:00:41 +000011005 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011006
Guido van Rossum627b2d71993-12-24 10:39:16 +000011007fi
11008
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011009
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011010fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011011
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011012if test "$posix_threads" = "yes"; then
11013 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011016
11017 fi
11018
11019 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11020 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011021 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011023
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011024 ;;
11025 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011027
11028 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011029 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011030$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011031
11032 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011033 esac
11034
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11036$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011037 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011038 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011039else
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011041 ac_cv_pthread_system_supported=no
11042else
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011044/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011045
11046 #include <stdio.h>
11047 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011048 void *foo(void *parm) {
11049 return NULL;
11050 }
11051 main() {
11052 pthread_attr_t attr;
11053 pthread_t id;
11054 if (pthread_attr_init(&attr)) exit(-1);
11055 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11056 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11057 exit(0);
11058 }
11059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011060if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011061 ac_cv_pthread_system_supported=yes
11062else
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11066 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011067fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069
Guido van Rossum627b2d71993-12-24 10:39:16 +000011070fi
11071
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11073$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011074 if test "$ac_cv_pthread_system_supported" = "yes"; then
11075
Matthias Kloseb9621712010-04-24 17:59:49 +000011076$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011077
11078 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011079 for ac_func in pthread_sigmask
11080do :
11081 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011082if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011083 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011084#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011085_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011086 case $ac_sys_system in
11087 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011088
Matthias Kloseb9621712010-04-24 17:59:49 +000011089$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011090
11091 ;;
11092 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011093fi
11094done
11095
pdoxe14679c2017-10-05 00:01:56 -070011096 for ac_func in pthread_getcpuclockid
11097do :
11098 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11099if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11100 cat >>confdefs.h <<_ACEOF
11101#define HAVE_PTHREAD_GETCPUCLOCKID 1
11102_ACEOF
11103
11104fi
11105done
11106
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011107fi
11108
11109
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
Matthias Kloseb9621712010-04-24 17:59:49 +000011112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11113$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011114# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011115if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11119$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120 ipv6=no
11121 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11123$as_echo "yes" >&6; }
11124 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125
11126 ipv6=yes
11127 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129else
Martin v. Löwis11437992002-04-12 09:54:03 +000011130
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011132/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133 /* AF_INET6 available check */
11134#include <sys/types.h>
11135#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011136int
11137main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011139int domain = AF_INET6;
11140 ;
11141 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142}
Martin v. Löwis11437992002-04-12 09:54:03 +000011143_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011144if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011145
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11147$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011148 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011149
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150else
Matthias Kloseb159a552010-04-25 21:00:44 +000011151
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11153$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011154 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011155
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011156fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011159if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11161$as_echo_n "checking if RFC2553 API is available... " >&6; }
11162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011163/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011164
11165 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011166#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011167int
11168main ()
11169{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011170struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011171 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 ;
11173 return 0;
11174}
Matthias Kloseb159a552010-04-25 21:00:44 +000011175
Martin v. Löwis11437992002-04-12 09:54:03 +000011176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011177if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011178
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011180$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011181 ipv6=yes
11182
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011183else
Matthias Kloseb159a552010-04-25 21:00:44 +000011184
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011186$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011187 ipv6=no
11188
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011191fi
11192
11193if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011194 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011195
11196fi
11197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198fi
11199
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011200
11201ipv6type=unknown
11202ipv6lib=none
11203ipv6trylibc=no
11204
11205if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11207$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011208 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11209 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011210 case $i in
11211 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011213/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011214
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011215#include <netinet/in.h>
11216#ifdef IPV6_INRIA_VERSION
11217yes
11218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011219_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011221 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011222 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011223fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011224rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011225
11226 ;;
11227 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011229/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011230
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011231#include <netinet/in.h>
11232#ifdef __KAME__
11233yes
11234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011235_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011238 ipv6type=$i;
11239 ipv6lib=inet6
11240 ipv6libdir=/usr/local/v6/lib
11241 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011242fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011243rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011244
11245 ;;
11246 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011248/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011249
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011250#include <features.h>
11251#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11252yes
11253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011254_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011256 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011257 ipv6type=$i;
11258 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011260rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011261
11262 ;;
11263 linux-inet6)
11264 if test -d /usr/inet6; then
11265 ipv6type=$i
11266 ipv6lib=inet6
11267 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011268 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011269 fi
11270 ;;
11271 solaris)
11272 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011273 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011274 ipv6type=$i
11275 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011276 fi
11277 fi
11278 ;;
11279 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011281/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011282
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011283#include <sys/param.h>
11284#ifdef _TOSHIBA_INET6
11285yes
11286#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011287_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011290 ipv6type=$i;
11291 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011292 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011293fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011294rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011295
11296 ;;
11297 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011300
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011301#include </usr/local/v6/include/sys/v6config.h>
11302#ifdef __V6D__
11303yes
11304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011305_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011308 ipv6type=$i;
11309 ipv6lib=v6;
11310 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011311 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011312fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011313rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011314
11315 ;;
11316 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011319
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011320#include <sys/param.h>
11321#ifdef _ZETA_MINAMI_INET6
11322yes
11323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011324_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011327 ipv6type=$i;
11328 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011329 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011330fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011331rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011332
11333 ;;
11334 esac
11335 if test "$ipv6type" != "unknown"; then
11336 break
11337 fi
11338 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11340$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011341fi
11342
11343if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11344 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11345 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11346 echo "using lib$ipv6lib"
11347 else
11348 if test $ipv6trylibc = "yes"; then
11349 echo "using libc"
11350 else
11351 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11352 echo "You need to fetch lib$ipv6lib.a from appropriate"
11353 echo 'ipv6 kit and compile beforehand.'
11354 exit 1
11355 fi
11356 fi
11357fi
11358
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11360$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11362/* end confdefs.h. */
11363 /* CAN_RAW_FD_FRAMES available check */
11364#include <linux/can/raw.h>
11365int
11366main ()
11367{
11368int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11369 ;
11370 return 0;
11371}
11372_ACEOF
11373if ac_fn_c_try_compile "$LINENO"; then :
11374
11375
11376$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11377
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11379$as_echo "yes" >&6; }
11380
11381else
11382
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11384$as_echo "no" >&6; }
11385
11386fi
11387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11388
Zackery Spytz97e0de02020-04-09 06:03:49 -060011389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11390$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11392/* end confdefs.h. */
11393
11394#include <linux/can/raw.h>
11395int
11396main ()
11397{
11398int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11399 ;
11400 return 0;
11401}
11402_ACEOF
11403if ac_fn_c_try_compile "$LINENO"; then :
11404
11405
11406$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11407
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11409$as_echo "yes" >&6; }
11410
11411else
11412
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
11415
11416fi
11417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11418
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011419# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11421$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011424if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425 withval=$with_doc_strings;
11426fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011427
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011428
11429if test -z "$with_doc_strings"
11430then with_doc_strings="yes"
11431fi
11432if test "$with_doc_strings" != "no"
11433then
11434
Matthias Kloseb9621712010-04-24 17:59:49 +000011435$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011436
11437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11439$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011440
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011441# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11443$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011446if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447 withval=$with_pymalloc;
11448fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011449
Neil Schemenauera35c6882001-02-27 04:45:05 +000011450
Neil Schemenauer16c22972002-03-22 15:34:49 +000011451if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011452then
11453 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011454fi
11455if test "$with_pymalloc" != "no"
11456then
Martin v. Löwis11437992002-04-12 09:54:03 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011459
11460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11462$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011463
Nick Coghlan6ea41862017-06-11 13:16:15 +100011464# Check for --with-c-locale-coercion
11465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11466$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11467
11468# Check whether --with-c-locale-coercion was given.
11469if test "${with_c_locale_coercion+set}" = set; then :
11470 withval=$with_c_locale_coercion;
11471fi
11472
11473
11474if test -z "$with_c_locale_coercion"
11475then
11476 with_c_locale_coercion="yes"
11477fi
11478if test "$with_c_locale_coercion" != "no"
11479then
11480
11481$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11482
11483fi
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11485$as_echo "$with_c_locale_coercion" >&6; }
11486
Benjamin Peterson05159c42009-12-03 03:01:27 +000011487# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11489$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011490
11491# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011492if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011493 withval=$with_valgrind;
11494else
11495 with_valgrind=no
11496fi
11497
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11499$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011500if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011501 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 +020011502if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011505
11506else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011507 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011508
11509fi
11510
11511
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011512 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011513fi
11514
Łukasz Langaa785c872016-09-09 17:37:37 -070011515# Check for DTrace support
11516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11517$as_echo_n "checking for --with-dtrace... " >&6; }
11518
11519# Check whether --with-dtrace was given.
11520if test "${with_dtrace+set}" = set; then :
11521 withval=$with_dtrace;
11522else
11523 with_dtrace=no
11524fi
11525
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11527$as_echo "$with_dtrace" >&6; }
11528
11529
11530
11531
11532
11533DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011534DTRACE_HEADERS=
11535DTRACE_OBJS=
11536
11537if test "$with_dtrace" = "yes"
11538then
11539 # Extract the first word of "dtrace", so it can be a program name with args.
11540set dummy dtrace; ac_word=$2
11541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11542$as_echo_n "checking for $ac_word... " >&6; }
11543if ${ac_cv_path_DTRACE+:} false; then :
11544 $as_echo_n "(cached) " >&6
11545else
11546 case $DTRACE in
11547 [\\/]* | ?:[\\/]*)
11548 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11549 ;;
11550 *)
11551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11552for as_dir in $PATH
11553do
11554 IFS=$as_save_IFS
11555 test -z "$as_dir" && as_dir=.
11556 for ac_exec_ext in '' $ac_executable_extensions; do
11557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11558 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11560 break 2
11561 fi
11562done
11563 done
11564IFS=$as_save_IFS
11565
11566 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11567 ;;
11568esac
11569fi
11570DTRACE=$ac_cv_path_DTRACE
11571if test -n "$DTRACE"; then
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11573$as_echo "$DTRACE" >&6; }
11574else
11575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11576$as_echo "no" >&6; }
11577fi
11578
11579
11580 if test "$DTRACE" = "not found"; then
11581 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11582 fi
11583
11584$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11585
11586 DTRACE_HEADERS="Include/pydtrace_probes.h"
11587
11588 # On OS X, DTrace providers do not need to be explicitly compiled and
11589 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11590 # generation flag '-G'. We check for presence of this flag, rather than
11591 # hardcoding support by OS, in the interest of robustness.
11592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11593$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11594if ${ac_cv_dtrace_link+:} false; then :
11595 $as_echo_n "(cached) " >&6
11596else
11597 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011598 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011599 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011600 ac_cv_dtrace_link=yes
11601
11602fi
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11604$as_echo "$ac_cv_dtrace_link" >&6; }
11605 if test "$ac_cv_dtrace_link" = "yes"; then
11606 DTRACE_OBJS="Python/pydtrace.o"
11607 fi
11608fi
11609
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011610# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011611
Guido van Rossum98935bf2001-09-05 19:13:16 +000011612DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011613
Guido van Rossume97ee181999-12-20 21:27:22 +000011614# the dlopen() function means we might want to use dynload_shlib.o. some
11615# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011616for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011617do :
11618 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011619if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011620 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011621#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011622_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011623
Guido van Rossume97ee181999-12-20 21:27:22 +000011624fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011625done
Guido van Rossume97ee181999-12-20 21:27:22 +000011626
Michael W. Hudson54241132001-12-07 15:38:26 +000011627
Guido van Rossume97ee181999-12-20 21:27:22 +000011628# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11629# loading of modules.
11630
Matthias Kloseb9621712010-04-24 17:59:49 +000011631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11632$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011633if test -z "$DYNLOADFILE"
11634then
11635 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011636 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011637 *)
11638 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11639 # out any dynamic loading
11640 if test "$ac_cv_func_dlopen" = yes
11641 then DYNLOADFILE="dynload_shlib.o"
11642 else DYNLOADFILE="dynload_stub.o"
11643 fi
11644 ;;
11645 esac
11646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11648$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011649if test "$DYNLOADFILE" != "dynload_stub.o"
11650then
Martin v. Löwis11437992002-04-12 09:54:03 +000011651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011653
11654fi
11655
Neil Schemenauer4e425612001-06-19 15:44:15 +000011656# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11657
Michael W. Hudson54241132001-12-07 15:38:26 +000011658
Matthias Kloseb9621712010-04-24 17:59:49 +000011659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11660$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011661if test -z "$MACHDEP_OBJS"
11662then
Jack Jansene578a632001-08-15 01:27:14 +000011663 MACHDEP_OBJS=$extra_machdep_objs
11664else
11665 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011666fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011667if test -z "$MACHDEP_OBJS"; then
11668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11669$as_echo "none" >&6; }
11670else
11671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11672$as_echo "$MACHDEP_OBJS" >&6; }
11673fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011674
Guido van Rossum627b2d71993-12-24 10:39:16 +000011675# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011676for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Kyle Evans1800c602020-10-11 15:18:53 -050011677 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11678 explicit_memset faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011679 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011680 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011681 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011682 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011683 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011684 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011685 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011686 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011687 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011688 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011689 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011690 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011691 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011692 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011693 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011694 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11695 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011696 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011697 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011698 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011699 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011700 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011701do :
11702 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11703ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011704if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011707_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011708
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011709fi
11710done
11711
Michael W. Hudson54241132001-12-07 15:38:26 +000011712
Benjamin Peterson40caa052018-09-12 15:52:40 -070011713# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11714# links. Some libc implementations have a stub lchmod implementation that always
11715# returns an error.
11716if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011717 for ac_func in lchmod
11718do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011719 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11720if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011721 cat >>confdefs.h <<_ACEOF
11722#define HAVE_LCHMOD 1
11723_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011724
11725fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011726done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011727
11728fi
11729
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011730ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11731 #include <dirent.h>
11732"
11733if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11734
11735$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11736
11737fi
11738
11739
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011740# For some functions, having a definition is not sufficient, since
11741# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11743$as_echo_n "checking for chroot... " >&6; }
11744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011745/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011746#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011747int
11748main ()
11749{
11750void *x=chroot
11751 ;
11752 return 0;
11753}
11754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011758
Matthias Kloseb159a552010-04-25 21:00:44 +000011759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011760$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011761else
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011764
11765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11768$as_echo_n "checking for link... " >&6; }
11769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011770/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011771#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011772int
11773main ()
11774{
11775void *x=link
11776 ;
11777 return 0;
11778}
11779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011783
Matthias Kloseb159a552010-04-25 21:00:44 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011785$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011786else
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11788$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011789
11790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11793$as_echo_n "checking for symlink... " >&6; }
11794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011795/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011796#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011797int
11798main ()
11799{
11800void *x=symlink
11801 ;
11802 return 0;
11803}
11804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011805if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011806
Matthias Kloseb9621712010-04-24 17:59:49 +000011807$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011808
Matthias Kloseb159a552010-04-25 21:00:44 +000011809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011810$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011811else
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11813$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011814
11815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11818$as_echo_n "checking for fchdir... " >&6; }
11819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011820/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011821#include <unistd.h>
11822int
11823main ()
11824{
11825void *x=fchdir
11826 ;
11827 return 0;
11828}
11829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011830if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011833
Matthias Kloseb159a552010-04-25 21:00:44 +000011834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011835$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011836else
Matthias Kloseb9621712010-04-24 17:59:49 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11838$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011839
11840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11843$as_echo_n "checking for fsync... " >&6; }
11844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011845/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011846#include <unistd.h>
11847int
11848main ()
11849{
11850void *x=fsync
11851 ;
11852 return 0;
11853}
11854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011855if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011856
Matthias Kloseb9621712010-04-24 17:59:49 +000011857$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011858
Matthias Kloseb159a552010-04-25 21:00:44 +000011859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011860$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11863$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011864
11865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11868$as_echo_n "checking for fdatasync... " >&6; }
11869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011870/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011871#include <unistd.h>
11872int
11873main ()
11874{
11875void *x=fdatasync
11876 ;
11877 return 0;
11878}
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011883
Matthias Kloseb159a552010-04-25 21:00:44 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011885$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11888$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011889
11890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11893$as_echo_n "checking for epoll... " >&6; }
11894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011895/* end confdefs.h. */
11896#include <sys/epoll.h>
11897int
11898main ()
11899{
11900void *x=epoll_create
11901 ;
11902 return 0;
11903}
11904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011905if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011906
Matthias Kloseb9621712010-04-24 17:59:49 +000011907$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011908
Matthias Kloseb159a552010-04-25 21:00:44 +000011909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011910$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011911else
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11913$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011914
11915fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11918$as_echo_n "checking for epoll_create1... " >&6; }
11919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11920/* end confdefs.h. */
11921#include <sys/epoll.h>
11922int
11923main ()
11924{
11925void *x=epoll_create1
11926 ;
11927 return 0;
11928}
11929_ACEOF
11930if ac_fn_c_try_compile "$LINENO"; then :
11931
11932$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11933
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11935$as_echo "yes" >&6; }
11936else
11937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11938$as_echo "no" >&6; }
11939
11940fi
11941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11943$as_echo_n "checking for kqueue... " >&6; }
11944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011945/* end confdefs.h. */
11946
11947#include <sys/types.h>
11948#include <sys/event.h>
11949
11950int
11951main ()
11952{
11953int x=kqueue()
11954 ;
11955 return 0;
11956}
11957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011958if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011961
Matthias Kloseb159a552010-04-25 21:00:44 +000011962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011963$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011964else
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11966$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011967
11968fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11971$as_echo_n "checking for prlimit... " >&6; }
11972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11973/* end confdefs.h. */
11974
11975#include <sys/time.h>
11976#include <sys/resource.h>
11977
11978int
11979main ()
11980{
11981void *x=prlimit
11982 ;
11983 return 0;
11984}
11985_ACEOF
11986if ac_fn_c_try_compile "$LINENO"; then :
11987
11988$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11989
11990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11991$as_echo "yes" >&6; }
11992else
11993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994$as_echo "no" >&6; }
11995
11996fi
11997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12000$as_echo_n "checking for memfd_create... " >&6; }
12001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12002/* end confdefs.h. */
12003
12004#ifdef HAVE_SYS_MMAN_H
12005#include <sys/mman.h>
12006#endif
12007#ifdef HAVE_SYS_MEMFD_H
12008#include <sys/memfd.h>
12009#endif
12010
12011int
12012main ()
12013{
12014void *x=memfd_create
12015 ;
12016 return 0;
12017}
12018_ACEOF
12019if ac_fn_c_try_compile "$LINENO"; then :
12020
12021$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12022
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12024$as_echo "yes" >&6; }
12025else
12026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12027$as_echo "no" >&6; }
12028
12029fi
12030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12031
Martin v. Löwisd5843682002-11-21 20:41:28 +000012032# On some systems (eg. FreeBSD 5), we would find a definition of the
12033# functions ctermid_r, setgroups in the library, but no prototype
12034# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12035# address to avoid compiler warnings and potential miscompilations
12036# because of the missing prototypes.
12037
Matthias Kloseb9621712010-04-24 17:59:49 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12039$as_echo_n "checking for ctermid_r... " >&6; }
12040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012041/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012042
Martin v. Löwisd5843682002-11-21 20:41:28 +000012043#include <stdio.h>
12044
Martin v. Löwisd5843682002-11-21 20:41:28 +000012045int
12046main ()
12047{
12048void* p = ctermid_r
12049 ;
12050 return 0;
12051}
12052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012054
Matthias Kloseb9621712010-04-24 17:59:49 +000012055$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012056
Matthias Kloseb159a552010-04-25 21:00:44 +000012057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012058$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012059else
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12061$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012062
12063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12065
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12067$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012068if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012069 $as_echo_n "(cached) " >&6
12070else
12071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012072/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012073#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012074int
12075main ()
12076{
12077void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012078
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012079 ;
12080 return 0;
12081}
12082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012083if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012084 ac_cv_flock_decl=yes
12085else
12086 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012087
12088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012090
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012091fi
12092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12093$as_echo "$ac_cv_flock_decl" >&6; }
12094if test "x${ac_cv_flock_decl}" = xyes; then
12095 for ac_func in flock
12096do :
12097 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012098if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012099 cat >>confdefs.h <<_ACEOF
12100#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012101_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012102
Antoine Pitroua3000072010-09-07 14:52:42 +000012103else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012105$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012106if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012107 $as_echo_n "(cached) " >&6
12108else
12109 ac_check_lib_save_LIBS=$LIBS
12110LIBS="-lbsd $LIBS"
12111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12112/* end confdefs.h. */
12113
12114/* Override any GCC internal prototype to avoid an error.
12115 Use char because int might match the return type of a GCC
12116 builtin and then its argument prototype would still apply. */
12117#ifdef __cplusplus
12118extern "C"
12119#endif
12120char flock ();
12121int
12122main ()
12123{
12124return flock ();
12125 ;
12126 return 0;
12127}
12128_ACEOF
12129if ac_fn_c_try_link "$LINENO"; then :
12130 ac_cv_lib_bsd_flock=yes
12131else
12132 ac_cv_lib_bsd_flock=no
12133fi
12134rm -f core conftest.err conftest.$ac_objext \
12135 conftest$ac_exeext conftest.$ac_ext
12136LIBS=$ac_check_lib_save_LIBS
12137fi
12138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12139$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012140if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012141 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012142
12143
12144$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12145
12146
12147fi
12148
12149
12150fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012151done
12152
Antoine Pitroua3000072010-09-07 14:52:42 +000012153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154
Matthias Kloseb9621712010-04-24 17:59:49 +000012155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12156$as_echo_n "checking for getpagesize... " >&6; }
12157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012158/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012159
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012160#include <unistd.h>
12161
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012162int
12163main ()
12164{
12165void* p = getpagesize
12166 ;
12167 return 0;
12168}
12169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012173
Matthias Kloseb159a552010-04-25 21:00:44 +000012174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012175$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12178$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012179
12180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012182
Victor Stinner984890f2011-11-24 13:53:38 +010012183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12184$as_echo_n "checking for broken unsetenv... " >&6; }
12185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186/* end confdefs.h. */
12187
12188#include <stdlib.h>
12189
12190int
12191main ()
12192{
12193int res = unsetenv("DUMMY")
12194 ;
12195 return 0;
12196}
12197_ACEOF
12198if ac_fn_c_try_compile "$LINENO"; then :
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12200$as_echo "no" >&6; }
12201else
12202
12203$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12204
12205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12206$as_echo "yes" >&6; }
12207
12208fi
12209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12210
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012211for ac_prog in true
12212do
12213 # Extract the first word of "$ac_prog", so it can be a program name with args.
12214set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12216$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012217if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012219else
12220 if test -n "$TRUE"; then
12221 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12222else
12223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12224for as_dir in $PATH
12225do
12226 IFS=$as_save_IFS
12227 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012229 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012230 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 $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 +000012232 break 2
12233 fi
12234done
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012237
12238fi
12239fi
12240TRUE=$ac_cv_prog_TRUE
12241if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12243$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012244else
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12246$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012247fi
12248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012250 test -n "$TRUE" && break
12251done
12252test -n "$TRUE" || TRUE="/bin/true"
12253
12254
Matthias Kloseb9621712010-04-24 17:59:49 +000012255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12256$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012257if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012259else
12260 ac_check_lib_save_LIBS=$LIBS
12261LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012263/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265/* Override any GCC internal prototype to avoid an error.
12266 Use char because int might match the return type of a GCC
12267 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012268#ifdef __cplusplus
12269extern "C"
12270#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012271char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012272int
12273main ()
12274{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012275return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012276 ;
12277 return 0;
12278}
12279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012281 ac_cv_lib_c_inet_aton=yes
12282else
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012285rm -f core conftest.err conftest.$ac_objext \
12286 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012287LIBS=$ac_check_lib_save_LIBS
12288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12290$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012291if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012292 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012293else
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12295$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012296if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012298else
12299 ac_check_lib_save_LIBS=$LIBS
12300LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012302/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304/* Override any GCC internal prototype to avoid an error.
12305 Use char because int might match the return type of a GCC
12306 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012307#ifdef __cplusplus
12308extern "C"
12309#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012310char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012311int
12312main ()
12313{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012315 ;
12316 return 0;
12317}
12318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012319if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012320 ac_cv_lib_resolv_inet_aton=yes
12321else
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012324rm -f core conftest.err conftest.$ac_objext \
12325 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012326LIBS=$ac_check_lib_save_LIBS
12327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12329$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012330if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012331 cat >>confdefs.h <<_ACEOF
12332#define HAVE_LIBRESOLV 1
12333_ACEOF
12334
12335 LIBS="-lresolv $LIBS"
12336
12337fi
12338
12339
12340fi
12341
12342
Christian Heimesd0764e22007-12-04 15:00:33 +000012343# On Tru64, chflags seems to be present, but calling it will
12344# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12346$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012347if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012349else
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012351 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012354/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012355
Christian Heimesd0764e22007-12-04 15:00:33 +000012356#include <sys/stat.h>
12357#include <unistd.h>
12358int main(int argc, char*argv[])
12359{
12360 if(chflags(argv[0], 0) != 0)
12361 return 1;
12362 return 0;
12363}
Ned Deily3eb67d52011-06-28 00:00:28 -070012364
Christian Heimesd0764e22007-12-04 15:00:33 +000012365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012366if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012367 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012368else
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12372 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012373fi
12374
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012375
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12378$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012379if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012381if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012382 ac_cv_have_chflags="yes"
12383else
12384 ac_cv_have_chflags="no"
12385fi
12386
12387fi
12388if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012389
Matthias Kloseb9621712010-04-24 17:59:49 +000012390$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012391
12392fi
12393
Matthias Kloseb9621712010-04-24 17:59:49 +000012394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12395$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012396if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012398else
Matthias Kloseb9621712010-04-24 17:59:49 +000012399 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012400 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012401else
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012403/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012404
Christian Heimesd0764e22007-12-04 15:00:33 +000012405#include <sys/stat.h>
12406#include <unistd.h>
12407int main(int argc, char*argv[])
12408{
12409 if(lchflags(argv[0], 0) != 0)
12410 return 1;
12411 return 0;
12412}
Ned Deily3eb67d52011-06-28 00:00:28 -070012413
Christian Heimesd0764e22007-12-04 15:00:33 +000012414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012415if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012416 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012417else
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12421 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012422fi
12423
12424
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12427$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012428if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012430if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012431 ac_cv_have_lchflags="yes"
12432else
12433 ac_cv_have_lchflags="no"
12434fi
12435
12436fi
12437if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012438
Matthias Kloseb9621712010-04-24 17:59:49 +000012439$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012440
12441fi
12442
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012443case $ac_sys_system/$ac_sys_release in
12444Darwin/*)
12445 _CUR_CFLAGS="${CFLAGS}"
12446 _CUR_LDFLAGS="${LDFLAGS}"
12447 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12448 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12449 ;;
12450esac
12451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12453$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012454if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012456else
12457 ac_check_lib_save_LIBS=$LIBS
12458LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012460/* end confdefs.h. */
12461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462/* Override any GCC internal prototype to avoid an error.
12463 Use char because int might match the return type of a GCC
12464 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012465#ifdef __cplusplus
12466extern "C"
12467#endif
12468char inflateCopy ();
12469int
12470main ()
12471{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012473 ;
12474 return 0;
12475}
12476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012477if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012478 ac_cv_lib_z_inflateCopy=yes
12479else
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012482rm -f core conftest.err conftest.$ac_objext \
12483 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012484LIBS=$ac_check_lib_save_LIBS
12485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12487$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012488if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012491
12492fi
12493
12494
12495case $ac_sys_system/$ac_sys_release in
12496Darwin/*)
12497 CFLAGS="${_CUR_CFLAGS}"
12498 LDFLAGS="${_CUR_LDFLAGS}"
12499 ;;
12500esac
12501
Matthias Kloseb9621712010-04-24 17:59:49 +000012502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12503$as_echo_n "checking for hstrerror... " >&6; }
12504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012505/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012506
Martin v. Löwise9416172003-05-03 10:12:45 +000012507#include <netdb.h>
12508
Martin v. Löwise9416172003-05-03 10:12:45 +000012509int
12510main ()
12511{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012512void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012513 ;
12514 return 0;
12515}
12516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012517if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012518
Matthias Kloseb9621712010-04-24 17:59:49 +000012519$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012520
Matthias Kloseb159a552010-04-25 21:00:44 +000012521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012522$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012523else
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12525$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012526
12527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012528rm -f core conftest.err conftest.$ac_objext \
12529 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530
Matthias Kloseb9621712010-04-24 17:59:49 +000012531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12532$as_echo_n "checking for inet_aton... " >&6; }
12533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012534/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012535
Martin v. Löwis86d66262006-02-17 08:40:11 +000012536#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012537#include <sys/socket.h>
12538#include <netinet/in.h>
12539#include <arpa/inet.h>
12540
Martin v. Löwise9416172003-05-03 10:12:45 +000012541int
12542main ()
12543{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012544void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012545 ;
12546 return 0;
12547}
12548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012550
Matthias Kloseb9621712010-04-24 17:59:49 +000012551$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012552
Matthias Kloseb159a552010-04-25 21:00:44 +000012553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012554$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012555else
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12557$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012558
12559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012560rm -f core conftest.err conftest.$ac_objext \
12561 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12564$as_echo_n "checking for inet_pton... " >&6; }
12565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012566/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012567
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012568#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012569#include <sys/socket.h>
12570#include <netinet/in.h>
12571#include <arpa/inet.h>
12572
Martin v. Löwise9416172003-05-03 10:12:45 +000012573int
12574main ()
12575{
12576void* p = inet_pton
12577 ;
12578 return 0;
12579}
12580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012581if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012582
Matthias Kloseb9621712010-04-24 17:59:49 +000012583$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012584
Matthias Kloseb159a552010-04-25 21:00:44 +000012585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012586$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012587else
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12589$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012590
12591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012593
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012594# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12596$as_echo_n "checking for setgroups... " >&6; }
12597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012598/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012599
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012600#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012601#ifdef HAVE_GRP_H
12602#include <grp.h>
12603#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012604
Martin v. Löwisd5843682002-11-21 20:41:28 +000012605int
12606main ()
12607{
12608void* p = setgroups
12609 ;
12610 return 0;
12611}
12612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012614
Matthias Kloseb9621712010-04-24 17:59:49 +000012615$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012616
Matthias Kloseb159a552010-04-25 21:00:44 +000012617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012618$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012619else
Matthias Kloseb9621712010-04-24 17:59:49 +000012620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012622
12623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012625
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012626# check for openpty and forkpty
12627
12628for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012629do :
12630 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012631if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012634_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012635
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012636else
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12638$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012639if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012641else
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012643LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012647/* Override any GCC internal prototype to avoid an error.
12648 Use char because int might match the return type of a GCC
12649 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012650#ifdef __cplusplus
12651extern "C"
12652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012653char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012654int
12655main ()
12656{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 ;
12659 return 0;
12660}
12661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012662if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012664else
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012667rm -f core conftest.err conftest.$ac_objext \
12668 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012669LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12672$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012673if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012675 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012676else
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12678$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012679if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012681else
12682 ac_check_lib_save_LIBS=$LIBS
12683LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012685/* end confdefs.h. */
12686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687/* Override any GCC internal prototype to avoid an error.
12688 Use char because int might match the return type of a GCC
12689 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012690#ifdef __cplusplus
12691extern "C"
12692#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012693char openpty ();
12694int
12695main ()
12696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012698 ;
12699 return 0;
12700}
12701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012703 ac_cv_lib_bsd_openpty=yes
12704else
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012707rm -f core conftest.err conftest.$ac_objext \
12708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012709LIBS=$ac_check_lib_save_LIBS
12710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12712$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012713if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012714 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012715 LIBS="$LIBS -lbsd"
12716fi
12717
12718
12719fi
12720
Fred Drake8cef4cf2000-06-28 16:40:38 +000012721
12722fi
12723done
12724
12725for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012726do :
12727 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012728if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012730#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012731_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012732
Fred Drake8cef4cf2000-06-28 16:40:38 +000012733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12735$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012736if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012738else
Martin v. Löwis11437992002-04-12 09:54:03 +000012739 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012740LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744/* Override any GCC internal prototype to avoid an error.
12745 Use char because int might match the return type of a GCC
12746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012747#ifdef __cplusplus
12748extern "C"
12749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012750char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012751int
12752main ()
12753{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012754return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ;
12756 return 0;
12757}
12758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012761else
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012764rm -f core conftest.err conftest.$ac_objext \
12765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012766LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12769$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012770if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012772 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012773else
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12775$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012776if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012778else
12779 ac_check_lib_save_LIBS=$LIBS
12780LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012782/* end confdefs.h. */
12783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784/* Override any GCC internal prototype to avoid an error.
12785 Use char because int might match the return type of a GCC
12786 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012787#ifdef __cplusplus
12788extern "C"
12789#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012790char forkpty ();
12791int
12792main ()
12793{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012795 ;
12796 return 0;
12797}
12798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012799if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012800 ac_cv_lib_bsd_forkpty=yes
12801else
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012804rm -f core conftest.err conftest.$ac_objext \
12805 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012806LIBS=$ac_check_lib_save_LIBS
12807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12809$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012810if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012812 LIBS="$LIBS -lbsd"
12813fi
12814
12815
12816fi
12817
Fred Drake8cef4cf2000-06-28 16:40:38 +000012818
12819fi
12820done
12821
Jack Jansendd19cf82001-12-06 22:36:17 +000012822
Michael W. Hudson54241132001-12-07 15:38:26 +000012823# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012824for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012825do :
12826 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12827ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012828if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012830#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012831_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012832
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012834done
12835
Michael W. Hudson54241132001-12-07 15:38:26 +000012836
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012837ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012838if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012839 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012840
Martin v. Löwis1142de32002-03-29 16:28:31 +000012841else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012843 *" dup2.$ac_objext "* ) ;;
12844 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012845 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012846esac
12847
Martin v. Löwis1142de32002-03-29 16:28:31 +000012848fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012849
Martin v. Löwis1142de32002-03-29 16:28:31 +000012850
12851for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012852do :
12853 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012854if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012855 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012856#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012859/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012860#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012861int
12862main ()
12863{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012864getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 ;
12866 return 0;
12867}
12868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012869if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012872
Guido van Rossum627b2d71993-12-24 10:39:16 +000012873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012875
Guido van Rossum627b2d71993-12-24 10:39:16 +000012876fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012877done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012878
Jack Jansen150753c2003-03-29 22:07:47 +000012879for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012880do :
12881 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012882if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012883 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012887/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012888#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012889int
12890main ()
12891{
12892setpgrp(0,0);
12893 ;
12894 return 0;
12895}
12896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012897if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012900
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012903
12904fi
12905done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012906
Michael W. Hudson54241132001-12-07 15:38:26 +000012907
Gregory P. Smith387512c2018-12-30 15:42:32 -080012908# We search for both crypt and crypt_r as one or the other may be defined
12909# This gets us our -lcrypt in LIBS when required on the target platform.
12910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12911$as_echo_n "checking for library containing crypt... " >&6; }
12912if ${ac_cv_search_crypt+:} false; then :
12913 $as_echo_n "(cached) " >&6
12914else
12915 ac_func_search_save_LIBS=$LIBS
12916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12917/* end confdefs.h. */
12918
12919/* Override any GCC internal prototype to avoid an error.
12920 Use char because int might match the return type of a GCC
12921 builtin and then its argument prototype would still apply. */
12922#ifdef __cplusplus
12923extern "C"
12924#endif
12925char crypt ();
12926int
12927main ()
12928{
12929return crypt ();
12930 ;
12931 return 0;
12932}
12933_ACEOF
12934for ac_lib in '' crypt; do
12935 if test -z "$ac_lib"; then
12936 ac_res="none required"
12937 else
12938 ac_res=-l$ac_lib
12939 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12940 fi
12941 if ac_fn_c_try_link "$LINENO"; then :
12942 ac_cv_search_crypt=$ac_res
12943fi
12944rm -f core conftest.err conftest.$ac_objext \
12945 conftest$ac_exeext
12946 if ${ac_cv_search_crypt+:} false; then :
12947 break
12948fi
12949done
12950if ${ac_cv_search_crypt+:} false; then :
12951
12952else
12953 ac_cv_search_crypt=no
12954fi
12955rm conftest.$ac_ext
12956LIBS=$ac_func_search_save_LIBS
12957fi
12958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12959$as_echo "$ac_cv_search_crypt" >&6; }
12960ac_res=$ac_cv_search_crypt
12961if test "$ac_res" != no; then :
12962 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12963
12964fi
12965
12966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12967$as_echo_n "checking for library containing crypt_r... " >&6; }
12968if ${ac_cv_search_crypt_r+:} false; then :
12969 $as_echo_n "(cached) " >&6
12970else
12971 ac_func_search_save_LIBS=$LIBS
12972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12973/* end confdefs.h. */
12974
12975/* Override any GCC internal prototype to avoid an error.
12976 Use char because int might match the return type of a GCC
12977 builtin and then its argument prototype would still apply. */
12978#ifdef __cplusplus
12979extern "C"
12980#endif
12981char crypt_r ();
12982int
12983main ()
12984{
12985return crypt_r ();
12986 ;
12987 return 0;
12988}
12989_ACEOF
12990for ac_lib in '' crypt; do
12991 if test -z "$ac_lib"; then
12992 ac_res="none required"
12993 else
12994 ac_res=-l$ac_lib
12995 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12996 fi
12997 if ac_fn_c_try_link "$LINENO"; then :
12998 ac_cv_search_crypt_r=$ac_res
12999fi
13000rm -f core conftest.err conftest.$ac_objext \
13001 conftest$ac_exeext
13002 if ${ac_cv_search_crypt_r+:} false; then :
13003 break
13004fi
13005done
13006if ${ac_cv_search_crypt_r+:} false; then :
13007
13008else
13009 ac_cv_search_crypt_r=no
13010fi
13011rm conftest.$ac_ext
13012LIBS=$ac_func_search_save_LIBS
13013fi
13014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13015$as_echo "$ac_cv_search_crypt_r" >&6; }
13016ac_res=$ac_cv_search_crypt_r
13017if test "$ac_res" != no; then :
13018 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13019
13020fi
13021
13022
13023ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13024if test "x$ac_cv_func_crypt_r" = xyes; then :
13025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13026/* end confdefs.h. */
13027
13028#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13029#include <crypt.h>
13030
13031int
13032main ()
13033{
13034
13035struct crypt_data d;
13036char *r = crypt_r("", "", &d);
13037
13038 ;
13039 return 0;
13040}
13041_ACEOF
13042if ac_fn_c_try_compile "$LINENO"; then :
13043
13044$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13045
13046fi
13047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13048
13049fi
13050
13051
Victor Stinnere0be4232011-10-25 13:06:09 +020013052for ac_func in clock_gettime
13053do :
13054 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13055if test "x$ac_cv_func_clock_gettime" = xyes; then :
13056 cat >>confdefs.h <<_ACEOF
13057#define HAVE_CLOCK_GETTIME 1
13058_ACEOF
13059
13060else
13061
13062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13063$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13064if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13065 $as_echo_n "(cached) " >&6
13066else
13067 ac_check_lib_save_LIBS=$LIBS
13068LIBS="-lrt $LIBS"
13069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13070/* end confdefs.h. */
13071
13072/* Override any GCC internal prototype to avoid an error.
13073 Use char because int might match the return type of a GCC
13074 builtin and then its argument prototype would still apply. */
13075#ifdef __cplusplus
13076extern "C"
13077#endif
13078char clock_gettime ();
13079int
13080main ()
13081{
13082return clock_gettime ();
13083 ;
13084 return 0;
13085}
13086_ACEOF
13087if ac_fn_c_try_link "$LINENO"; then :
13088 ac_cv_lib_rt_clock_gettime=yes
13089else
13090 ac_cv_lib_rt_clock_gettime=no
13091fi
13092rm -f core conftest.err conftest.$ac_objext \
13093 conftest$ac_exeext conftest.$ac_ext
13094LIBS=$ac_check_lib_save_LIBS
13095fi
13096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13097$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13098if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13099
Victor Stinner7efb8332014-08-29 15:41:08 +020013100 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013101 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13102
13103
13104$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13105
13106
13107fi
13108
13109
13110fi
13111done
13112
13113
13114for ac_func in clock_getres
13115do :
13116 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13117if test "x$ac_cv_func_clock_getres" = xyes; then :
13118 cat >>confdefs.h <<_ACEOF
13119#define HAVE_CLOCK_GETRES 1
13120_ACEOF
13121
13122else
13123
13124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13125$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13126if ${ac_cv_lib_rt_clock_getres+:} false; then :
13127 $as_echo_n "(cached) " >&6
13128else
13129 ac_check_lib_save_LIBS=$LIBS
13130LIBS="-lrt $LIBS"
13131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13132/* end confdefs.h. */
13133
13134/* Override any GCC internal prototype to avoid an error.
13135 Use char because int might match the return type of a GCC
13136 builtin and then its argument prototype would still apply. */
13137#ifdef __cplusplus
13138extern "C"
13139#endif
13140char clock_getres ();
13141int
13142main ()
13143{
13144return clock_getres ();
13145 ;
13146 return 0;
13147}
13148_ACEOF
13149if ac_fn_c_try_link "$LINENO"; then :
13150 ac_cv_lib_rt_clock_getres=yes
13151else
13152 ac_cv_lib_rt_clock_getres=no
13153fi
13154rm -f core conftest.err conftest.$ac_objext \
13155 conftest$ac_exeext conftest.$ac_ext
13156LIBS=$ac_check_lib_save_LIBS
13157fi
13158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13159$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13160if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13161
13162 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13163
13164
13165fi
13166
13167
13168fi
13169done
13170
13171
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013172for ac_func in clock_settime
13173do :
13174 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13175if test "x$ac_cv_func_clock_settime" = xyes; then :
13176 cat >>confdefs.h <<_ACEOF
13177#define HAVE_CLOCK_SETTIME 1
13178_ACEOF
13179
13180else
13181
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13183$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13184if ${ac_cv_lib_rt_clock_settime+:} false; then :
13185 $as_echo_n "(cached) " >&6
13186else
13187 ac_check_lib_save_LIBS=$LIBS
13188LIBS="-lrt $LIBS"
13189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13190/* end confdefs.h. */
13191
13192/* Override any GCC internal prototype to avoid an error.
13193 Use char because int might match the return type of a GCC
13194 builtin and then its argument prototype would still apply. */
13195#ifdef __cplusplus
13196extern "C"
13197#endif
13198char clock_settime ();
13199int
13200main ()
13201{
13202return clock_settime ();
13203 ;
13204 return 0;
13205}
13206_ACEOF
13207if ac_fn_c_try_link "$LINENO"; then :
13208 ac_cv_lib_rt_clock_settime=yes
13209else
13210 ac_cv_lib_rt_clock_settime=no
13211fi
13212rm -f core conftest.err conftest.$ac_objext \
13213 conftest$ac_exeext conftest.$ac_ext
13214LIBS=$ac_check_lib_save_LIBS
13215fi
13216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13217$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13218if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13219
13220 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13221
13222
13223fi
13224
13225
13226fi
13227done
13228
13229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13231$as_echo_n "checking for major... " >&6; }
13232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013233/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013234
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013235#if defined(MAJOR_IN_MKDEV)
13236#include <sys/mkdev.h>
13237#elif defined(MAJOR_IN_SYSMACROS)
13238#include <sys/sysmacros.h>
13239#else
13240#include <sys/types.h>
13241#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013242
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013243int
13244main ()
13245{
13246
13247 makedev(major(0),minor(0));
13248
13249 ;
13250 return 0;
13251}
13252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013253if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013254
13255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13259$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013260
13261else
Skip Montanaro6dead952003-09-25 14:50:04 +000013262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013265
13266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013267rm -f core conftest.err conftest.$ac_objext \
13268 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013269
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013270# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013271# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13273$as_echo_n "checking for getaddrinfo... " >&6; }
13274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013275/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013276
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013277#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013278#include <sys/socket.h>
13279#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013280#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013281
Martin v. Löwis11437992002-04-12 09:54:03 +000013282int
13283main ()
13284{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013285getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013286 ;
13287 return 0;
13288}
13289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013290if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013291 have_getaddrinfo=yes
13292else
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013295rm -f core conftest.err conftest.$ac_objext \
13296 conftest$ac_exeext conftest.$ac_ext
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13298$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013299if test $have_getaddrinfo = yes
13300then
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13302$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013303 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013305else
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013307
13308if test "${enable_ipv6+set}" = set; then
13309 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13310else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013311 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013312fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013315/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013316
Stefan Krah19c21392012-11-22 23:47:32 +010013317#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013318#include <sys/types.h>
13319#include <netdb.h>
13320#include <string.h>
13321#include <sys/socket.h>
13322#include <netinet/in.h>
13323
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013324int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013325{
13326 int passive, gaierr, inet4 = 0, inet6 = 0;
13327 struct addrinfo hints, *ai, *aitop;
13328 char straddr[INET6_ADDRSTRLEN], strport[16];
13329
13330 for (passive = 0; passive <= 1; passive++) {
13331 memset(&hints, 0, sizeof(hints));
13332 hints.ai_family = AF_UNSPEC;
13333 hints.ai_flags = passive ? AI_PASSIVE : 0;
13334 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013335 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013336 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13337 (void)gai_strerror(gaierr);
13338 goto bad;
13339 }
13340 for (ai = aitop; ai; ai = ai->ai_next) {
13341 if (ai->ai_addr == NULL ||
13342 ai->ai_addrlen == 0 ||
13343 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13344 straddr, sizeof(straddr), strport, sizeof(strport),
13345 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13346 goto bad;
13347 }
13348 switch (ai->ai_family) {
13349 case AF_INET:
13350 if (strcmp(strport, "54321") != 0) {
13351 goto bad;
13352 }
13353 if (passive) {
13354 if (strcmp(straddr, "0.0.0.0") != 0) {
13355 goto bad;
13356 }
13357 } else {
13358 if (strcmp(straddr, "127.0.0.1") != 0) {
13359 goto bad;
13360 }
13361 }
13362 inet4++;
13363 break;
13364 case AF_INET6:
13365 if (strcmp(strport, "54321") != 0) {
13366 goto bad;
13367 }
13368 if (passive) {
13369 if (strcmp(straddr, "::") != 0) {
13370 goto bad;
13371 }
13372 } else {
13373 if (strcmp(straddr, "::1") != 0) {
13374 goto bad;
13375 }
13376 }
13377 inet6++;
13378 break;
13379 case AF_UNSPEC:
13380 goto bad;
13381 break;
13382 default:
13383 /* another family support? */
13384 break;
13385 }
13386 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013387 freeaddrinfo(aitop);
13388 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013389 }
13390
13391 if (!(inet4 == 0 || inet4 == 2))
13392 goto bad;
13393 if (!(inet6 == 0 || inet6 == 2))
13394 goto bad;
13395
13396 if (aitop)
13397 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013398 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013399
13400 bad:
13401 if (aitop)
13402 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013403 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013404}
13405
Martin v. Löwis11437992002-04-12 09:54:03 +000013406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013407if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013408 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013415
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013416fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013417
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13421$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13422
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013423if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013424then
13425 if test $ipv6 = yes
13426 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013427 echo 'Fatal: You must get working getaddrinfo() function.'
13428 echo ' or you can specify "--disable-ipv6"'.
13429 exit 1
13430 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013431else
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013434
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013435fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013436
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013437for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013438do :
13439 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013440if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013442#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013443_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013444
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013445fi
13446done
13447
Michael W. Hudson54241132001-12-07 15:38:26 +000013448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013449# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13451$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013452if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454else
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013456/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457#include <sys/types.h>
13458#include <sys/time.h>
13459#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013460
Martin v. Löwis11437992002-04-12 09:54:03 +000013461int
13462main ()
13463{
13464if ((struct tm *) 0)
13465return 0;
13466 ;
13467 return 0;
13468}
13469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013470if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13478$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013479if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482
13483fi
13484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13486$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013487if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489else
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013491/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013492#include <sys/types.h>
13493#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
Martin v. Löwis11437992002-04-12 09:54:03 +000013495int
13496main ()
13497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013498struct tm tm;
13499 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013501 ;
13502 return 0;
13503}
13504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013505if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013506 ac_cv_struct_tm=time.h
13507else
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13513$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013514if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013517
13518fi
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520ac_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 +000013521#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523"
Victor Stinnere0be4232011-10-25 13:06:09 +020013524if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
13526cat >>confdefs.h <<_ACEOF
13527#define HAVE_STRUCT_TM_TM_ZONE 1
13528_ACEOF
13529
13530
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013532
Martin v. Löwis11437992002-04-12 09:54:03 +000013533if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536
13537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13539"
Victor Stinnere0be4232011-10-25 13:06:09 +020013540if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544fi
13545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013547#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548_ACEOF
13549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13551$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013552if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013554else
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013556/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013557#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558#if !HAVE_DECL_TZNAME
13559extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562int
13563main ()
13564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 ;
13567 return 0;
13568}
13569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013570if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013571 ac_cv_var_tzname=yes
13572else
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013575rm -f core conftest.err conftest.$ac_objext \
13576 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13579$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013580 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013583
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013584 fi
13585fi
13586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587ac_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 +020013588if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013589
13590cat >>confdefs.h <<_ACEOF
13591#define HAVE_STRUCT_STAT_ST_RDEV 1
13592_ACEOF
13593
13594
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013595fi
13596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597ac_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 +020013598if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013599
Martin v. Löwis11437992002-04-12 09:54:03 +000013600cat >>confdefs.h <<_ACEOF
13601#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13602_ACEOF
13603
13604
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013605fi
13606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607ac_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 +020013608if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013609
13610cat >>confdefs.h <<_ACEOF
13611#define HAVE_STRUCT_STAT_ST_FLAGS 1
13612_ACEOF
13613
13614
13615fi
13616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617ac_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 +020013618if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013619
13620cat >>confdefs.h <<_ACEOF
13621#define HAVE_STRUCT_STAT_ST_GEN 1
13622_ACEOF
13623
13624
13625fi
13626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627ac_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 +020013628if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013629
13630cat >>confdefs.h <<_ACEOF
13631#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13632_ACEOF
13633
13634
13635fi
13636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637ac_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 +020013638if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013639
Martin v. Löwis11437992002-04-12 09:54:03 +000013640cat >>confdefs.h <<_ACEOF
13641#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13642_ACEOF
13643
13644
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013645fi
13646
Stefan Krah267b6392016-04-26 01:09:18 +020013647ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13648 #include <sys/types.h>
13649 #include <pwd.h>
13650
13651"
13652if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13653
13654cat >>confdefs.h <<_ACEOF
13655#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13656_ACEOF
13657
13658
13659fi
13660ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13661 #include <sys/types.h>
13662 #include <pwd.h>
13663
13664"
13665if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13666
13667cat >>confdefs.h <<_ACEOF
13668#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13669_ACEOF
13670
13671
13672fi
13673
Zachary Ware6a6967e2016-10-01 00:47:27 -050013674# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13675ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13676"
13677if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13678
13679cat >>confdefs.h <<_ACEOF
13680#define HAVE_SIGINFO_T_SI_BAND 1
13681_ACEOF
13682
13683
13684fi
13685
Michael W. Hudson54241132001-12-07 15:38:26 +000013686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13688$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013689if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013691else
Matthias Kloseb159a552010-04-25 21:00:44 +000013692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013694/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013695#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013696int
13697main ()
13698{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013699return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 ;
13701 return 0;
13702}
13703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013704if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013705 ac_cv_header_time_altzone=yes
13706else
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013711fi
13712
Matthias Kloseb9621712010-04-24 17:59:49 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13714$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013715if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718
13719fi
13720
Guido van Rossumda88dad1995-01-26 00:46:29 +000013721was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13723$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013725/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013726
13727#include <sys/types.h>
13728#include <sys/select.h>
13729#include <sys/time.h>
13730
Martin v. Löwis11437992002-04-12 09:54:03 +000013731int
13732main ()
13733{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013734;
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 ;
13736 return 0;
13737}
13738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
13741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013743
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013744 was_it_defined=yes
13745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13749$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13752$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013753if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013755else
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013757/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013758#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013759int
13760main ()
13761{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013762struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 ;
13764 return 0;
13765}
13766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013767if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013768 ac_cv_struct_addrinfo=yes
13769else
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13773fi
13774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13776$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013777if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013780
13781fi
13782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13784$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013785if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013787else
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013789/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013790
13791# include <sys/types.h>
13792# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013793int
13794main ()
13795{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013796struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 ;
13798 return 0;
13799}
13800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013801if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013802 ac_cv_struct_sockaddr_storage=yes
13803else
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13807fi
13808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13810$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013811if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013814
13815fi
13816
Christian Heimesdffa3942016-09-05 23:54:41 +020013817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13818$as_echo_n "checking for sockaddr_alg... " >&6; }
13819if ${ac_cv_struct_sockaddr_alg+:} false; then :
13820 $as_echo_n "(cached) " >&6
13821else
13822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13823/* end confdefs.h. */
13824
13825# include <sys/types.h>
13826# include <sys/socket.h>
13827# include <linux/if_alg.h>
13828int
13829main ()
13830{
13831struct sockaddr_alg s
13832 ;
13833 return 0;
13834}
13835_ACEOF
13836if ac_fn_c_try_compile "$LINENO"; then :
13837 ac_cv_struct_sockaddr_alg=yes
13838else
13839 ac_cv_struct_sockaddr_alg=no
13840fi
13841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13842fi
13843
13844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13845$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13846if test $ac_cv_struct_sockaddr_alg = yes; then
13847
13848$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13849
13850fi
13851
Guido van Rossum627b2d71993-12-24 10:39:16 +000013852# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13855$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013856if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013861$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013862int
13863main ()
13864{
13865static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013866test_array [0] = 0;
13867return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
13869 ;
13870 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013871}
Martin v. Löwis11437992002-04-12 09:54:03 +000013872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013873if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013874 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013875else
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13881$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013882if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013884
13885fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13888$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013889if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013891else
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013893/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013894
Martin v. Löwis11437992002-04-12 09:54:03 +000013895int
13896main ()
13897{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013898
Martin v. Löwis11437992002-04-12 09:54:03 +000013899#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013900 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013902 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904 char const *const *pcpcc;
13905 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 /* NEC SVR4.0.2 mips cc rejects this. */
13907 struct point {int x, y;};
13908 static struct point const zero = {0,0};
13909 /* AIX XL C 1.02.0.0 rejects this.
13910 It does not let you subtract one const X* pointer from another in
13911 an arm of an if-expression whose if-part is not a constant
13912 expression */
13913 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916 ++pcpcc;
13917 ppc = (char**) pcpcc;
13918 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013919 { /* SCO 3.2v4 cc rejects this sort of thing. */
13920 char tx;
13921 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013923
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 }
13927 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13928 int x[] = {25, 17};
13929 const int *foo = &x[0];
13930 ++foo;
13931 }
13932 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13933 typedef const int *iptr;
13934 iptr p = 0;
13935 ++p;
13936 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013937 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013939 struct s { int j; const int *ap[3]; } bx;
13940 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 }
13942 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13943 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013944 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013947#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013948
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 ;
13950 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013951}
Martin v. Löwis11437992002-04-12 09:54:03 +000013952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013953if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013954 ac_cv_c_const=yes
13955else
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13961$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013962if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013965
13966fi
13967
Michael W. Hudson54241132001-12-07 15:38:26 +000013968
Guido van Rossumda88dad1995-01-26 00:46:29 +000013969works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13971$as_echo_n "checking for working signed char... " >&6; }
13972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013973/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013974
Martin v. Löwis11437992002-04-12 09:54:03 +000013975int
13976main ()
13977{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013978signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;
13980 return 0;
13981}
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013984 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013985else
Skip Montanaro6dead952003-09-25 14:50:04 +000013986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013988
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013989
Guido van Rossum7f43da71994-08-01 12:15:30 +000013990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13993$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013994
Guido van Rossumda88dad1995-01-26 00:46:29 +000013995have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13997$as_echo_n "checking for prototypes... " >&6; }
13998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013999/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014000int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014001int
14002main ()
14003{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014004return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014005 ;
14006 return 0;
14007}
14008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014009if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
Matthias Kloseb9621712010-04-24 17:59:49 +000014011$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
Matthias Kloseb159a552010-04-25 21:00:44 +000014013 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14017$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014018
Guido van Rossumda88dad1995-01-26 00:46:29 +000014019works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14021$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014023/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014024
14025#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014026int foo(int x, ...) {
14027 va_list va;
14028 va_start(va, x);
14029 va_arg(va, int);
14030 va_arg(va, char *);
14031 va_arg(va, double);
14032 return 0;
14033}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014034
Martin v. Löwis11437992002-04-12 09:54:03 +000014035int
14036main ()
14037{
Guido van Rossum90eea071996-08-30 20:58:57 +000014038return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 ;
14040 return 0;
14041}
14042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014043if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
14045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014047
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014048 works=yes
14049
Guido van Rossum627b2d71993-12-24 10:39:16 +000014050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14053$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014054
Martin v. Löwisd6320502004-08-12 13:45:08 +000014055# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14057$as_echo_n "checking for socketpair... " >&6; }
14058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014059/* end confdefs.h. */
14060
14061#include <sys/types.h>
14062#include <sys/socket.h>
14063
14064int
14065main ()
14066{
14067void *x=socketpair
14068 ;
14069 return 0;
14070}
14071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014073
Matthias Kloseb9621712010-04-24 17:59:49 +000014074$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014075
Matthias Kloseb159a552010-04-25 21:00:44 +000014076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014077$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014078else
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14080$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014081
14082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014084
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014085# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14087$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014089/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014090#include <sys/types.h>
14091#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014092int
14093main ()
14094{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014095struct sockaddr x;
14096x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 ;
14098 return 0;
14099}
14100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014101if ac_fn_c_try_compile "$LINENO"; then :
14102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14103$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
Matthias Kloseb9621712010-04-24 17:59:49 +000014105$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014106
14107else
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14109$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014110
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014113
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014114# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014115
14116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014118if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014121
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14123$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014124 OLD_CFLAGS=$CFLAGS
14125 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014127/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014128
14129# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014130
Martin v. Löwis11437992002-04-12 09:54:03 +000014131int
14132main ()
14133{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014134
14135 char *name;
14136 struct hostent *he, *res;
14137 char buffer[2048];
14138 int buflen = 2048;
14139 int h_errnop;
14140
14141 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
14143 ;
14144 return 0;
14145}
14146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014150
Martin v. Löwis11437992002-04-12 09:54:03 +000014151
Matthias Kloseb9621712010-04-24 17:59:49 +000014152$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14155$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014156
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014157else
Skip Montanaro6dead952003-09-25 14:50:04 +000014158
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14160$as_echo "no" >&6; }
14161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14162$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014164/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014165
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014166# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
Martin v. Löwis11437992002-04-12 09:54:03 +000014168int
14169main ()
14170{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014171
14172 char *name;
14173 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014174 char buffer[2048];
14175 int buflen = 2048;
14176 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014177
Matthias Kloseb159a552010-04-25 21:00:44 +000014178 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014179
14180 ;
14181 return 0;
14182}
14183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014184if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014187
Martin v. Löwis11437992002-04-12 09:54:03 +000014188
Matthias Kloseb159a552010-04-25 21:00:44 +000014189$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014190
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14192$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014193
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014194else
Skip Montanaro6dead952003-09-25 14:50:04 +000014195
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14197$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14199$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14201/* end confdefs.h. */
14202
14203# include <netdb.h>
14204
14205int
14206main ()
14207{
14208
14209 char *name;
14210 struct hostent *he;
14211 struct hostent_data data;
14212
14213 (void) gethostbyname_r(name, he, &data);
14214
14215 ;
14216 return 0;
14217}
14218_ACEOF
14219if ac_fn_c_try_compile "$LINENO"; then :
14220
14221 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14222
14223
14224$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14225
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14227$as_echo "yes" >&6; }
14228
14229else
14230
14231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14232$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000014236
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014242 CFLAGS=$OLD_CFLAGS
14243
14244else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014245
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 for ac_func in gethostbyname
14247do :
14248 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014249if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014251#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014252_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014253
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014254fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014255done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014256
Michael W. Hudson54241132001-12-07 15:38:26 +000014257
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014258fi
14259
Michael W. Hudson54241132001-12-07 15:38:26 +000014260
14261
14262
14263
14264
14265
Guido van Rossum627b2d71993-12-24 10:39:16 +000014266# checks for system services
14267# (none yet)
14268
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014269# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014270ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014271if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014272
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014273else
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14275$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014276if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014278else
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014280LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014284/* Override any GCC internal prototype to avoid an error.
14285 Use char because int might match the return type of a GCC
14286 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014287#ifdef __cplusplus
14288extern "C"
14289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014290char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014291int
14292main ()
14293{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014295 ;
14296 return 0;
14297}
14298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014299if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014300 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014301else
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014304rm -f core conftest.err conftest.$ac_objext \
14305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014306LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14309$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014310if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 cat >>confdefs.h <<_ACEOF
14312#define HAVE_LIBIEEE 1
14313_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014314
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014315 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014316
Guido van Rossum627b2d71993-12-24 10:39:16 +000014317fi
14318
Michael W. Hudson54241132001-12-07 15:38:26 +000014319
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014320fi
14321
Michael W. Hudson54241132001-12-07 15:38:26 +000014322
Guido van Rossum7f43da71994-08-01 12:15:30 +000014323# check for --with-libm=...
14324
Guido van Rossum563e7081996-09-10 18:20:48 +000014325case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014326Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014327*) LIBM=-lm
14328esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14330$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014333if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014335if test "$withval" = no
14336then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14338$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014339elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014340then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14342$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014343else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014344fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014345else
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14347$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348fi
14349
Guido van Rossum7f43da71994-08-01 12:15:30 +000014350
14351# check for --with-libc=...
14352
Matthias Kloseb9621712010-04-24 17:59:49 +000014353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14354$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014356# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014357if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014358 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014359if test "$withval" = no
14360then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14362$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014363elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014364then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14366$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014367else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014368fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014369else
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14371$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372fi
14373
Guido van Rossum7f43da71994-08-01 12:15:30 +000014374
Stefan Krah1919b7e2012-03-21 18:25:23 +010014375# **************************************
14376# * Check for gcc x64 inline assembler *
14377# **************************************
14378
14379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14380$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14382/* end confdefs.h. */
14383
14384int
14385main ()
14386{
14387
14388 __asm__ __volatile__ ("movq %rcx, %rax");
14389
14390 ;
14391 return 0;
14392}
14393_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014394if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014395 have_gcc_asm_for_x64=yes
14396else
14397 have_gcc_asm_for_x64=no
14398fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014399rm -f core conftest.err conftest.$ac_objext \
14400 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14402$as_echo "$have_gcc_asm_for_x64" >&6; }
14403if test "$have_gcc_asm_for_x64" = yes
14404then
14405
14406$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14407
14408fi
14409
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014410# **************************************************
14411# * Check for various properties of floating point *
14412# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014413
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14415$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14416if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014418else
14419
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014420
14421ax_cv_c_float_words_bigendian=unknown
14422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014423/* end confdefs.h. */
14424
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014425
14426double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14427
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014428
14429_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014430if ac_fn_c_try_compile "$LINENO"; then :
14431
14432
Arnon Yaari5dd83602020-04-01 18:19:09 +030014433if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014434 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014435fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014436if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014437 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14438 ax_cv_c_float_words_bigendian=no
14439 else
14440 ax_cv_c_float_words_bigendian=unknown
14441 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014442fi
14443
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014444
14445fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014447fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14449$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014450
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014451case $ax_cv_c_float_words_bigendian in
14452 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014453
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014454$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14455 ;;
14456 no)
14457 ;;
14458 *)
14459 as_fn_error $? "
14460
14461Unknown float word ordering. You need to manually preset
14462ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14463
14464 " "$LINENO" 5 ;;
14465esac
14466
14467
14468if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014469then
14470
Matthias Kloseb9621712010-04-24 17:59:49 +000014471$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014472
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014473elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014474then
14475
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014476$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14477
14478else
14479 # Some ARM platforms use a mixed-endian representation for doubles.
14480 # While Python doesn't currently have full support for these platforms
14481 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14482 # conversions work.
14483 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14484 # or little, then it must be this?
14485
Matthias Kloseb9621712010-04-24 17:59:49 +000014486$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014487
14488fi
14489
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014490# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014491# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014492# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014493# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014494# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014495# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014496
14497# This inline assembler syntax may also work for suncc and icc,
14498# so we try it on all platforms.
14499
Matthias Kloseb9621712010-04-24 17:59:49 +000014500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14501$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014503/* end confdefs.h. */
14504
14505int
14506main ()
14507{
14508
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014509 unsigned short cw;
14510 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14511 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014512
14513 ;
14514 return 0;
14515}
14516_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014517if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014518 have_gcc_asm_for_x87=yes
14519else
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014521fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014522rm -f core conftest.err conftest.$ac_objext \
14523 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14525$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014526if test "$have_gcc_asm_for_x87" = yes
14527then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014528
Matthias Kloseb9621712010-04-24 17:59:49 +000014529$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014530
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014532
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14534$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14536/* end confdefs.h. */
14537
14538int
14539main ()
14540{
14541
14542 unsigned int fpcr;
14543 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14544 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14545
14546 ;
14547 return 0;
14548}
14549_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014550if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014551 have_gcc_asm_for_mc68881=yes
14552else
14553 have_gcc_asm_for_mc68881=no
14554fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014555rm -f core conftest.err conftest.$ac_objext \
14556 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14558$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14559if test "$have_gcc_asm_for_mc68881" = yes
14560then
14561
14562$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14563
14564fi
14565
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014566# Detect whether system arithmetic is subject to x87-style double
14567# rounding issues. The result of this test has little meaning on non
14568# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14569# mode is round-to-nearest and double rounding issues are present, and
14570# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14572$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014573# $BASECFLAGS may affect the result
14574ac_save_cc="$CC"
14575CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014576if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014577 ac_cv_x87_double_rounding=no
14578else
Matthias Kloseb9621712010-04-24 17:59:49 +000014579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014580/* end confdefs.h. */
14581
14582#include <stdlib.h>
14583#include <math.h>
14584int main() {
14585 volatile double x, y, z;
14586 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14587 x = 0.99999999999999989; /* 1-2**-53 */
14588 y = 1./x;
14589 if (y != 1.)
14590 exit(0);
14591 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14592 x = 1e16;
14593 y = 2.99999;
14594 z = x + y;
14595 if (z != 1e16+4.)
14596 exit(0);
14597 /* both tests show evidence of double rounding */
14598 exit(1);
14599}
14600
14601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014602if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014603 ac_cv_x87_double_rounding=no
14604else
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14608 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014609fi
14610
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014611CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14613$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014614if test "$ac_cv_x87_double_rounding" = yes
14615then
14616
Matthias Kloseb9621712010-04-24 17:59:49 +000014617$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014618
14619fi
14620
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014621# ************************************
14622# * Check for mathematical functions *
14623# ************************************
14624
14625LIBS_SAVE=$LIBS
14626LIBS="$LIBS $LIBM"
14627
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014628for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14629do :
14630 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14631ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014632if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014633 cat >>confdefs.h <<_ACEOF
14634#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14635_ACEOF
14636
14637fi
14638done
14639
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014640for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014641do :
14642 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14643ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014644if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014645 cat >>confdefs.h <<_ACEOF
14646#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14647_ACEOF
14648
14649fi
14650done
14651
14652ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14653"
Victor Stinnere0be4232011-10-25 13:06:09 +020014654if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014655 ac_have_decl=1
14656else
14657 ac_have_decl=0
14658fi
14659
14660cat >>confdefs.h <<_ACEOF
14661#define HAVE_DECL_ISINF $ac_have_decl
14662_ACEOF
14663ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14664"
Victor Stinnere0be4232011-10-25 13:06:09 +020014665if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014666 ac_have_decl=1
14667else
14668 ac_have_decl=0
14669fi
14670
14671cat >>confdefs.h <<_ACEOF
14672#define HAVE_DECL_ISNAN $ac_have_decl
14673_ACEOF
14674ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14675"
Victor Stinnere0be4232011-10-25 13:06:09 +020014676if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014677 ac_have_decl=1
14678else
14679 ac_have_decl=0
14680fi
14681
14682cat >>confdefs.h <<_ACEOF
14683#define HAVE_DECL_ISFINITE $ac_have_decl
14684_ACEOF
14685
14686
Mark Dickinsona614f042009-11-28 12:48:43 +000014687# For multiprocessing module, check that sem_open
14688# actually works. For FreeBSD versions <= 7.2,
14689# the kernel module that provides POSIX semaphores
14690# isn't loaded by default, so an attempt to call
14691# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14693$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014694if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014696else
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014698 ac_cv_posix_semaphores_enabled=yes
14699else
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014701/* end confdefs.h. */
14702
14703#include <unistd.h>
14704#include <fcntl.h>
14705#include <stdio.h>
14706#include <semaphore.h>
14707#include <sys/stat.h>
14708
14709int main(void) {
14710 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14711 if (a == SEM_FAILED) {
14712 perror("sem_open");
14713 return 1;
14714 }
14715 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014716 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014717 return 0;
14718}
14719
14720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014721if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014722 ac_cv_posix_semaphores_enabled=yes
14723else
Matthias Kloseb9621712010-04-24 17:59:49 +000014724 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14727 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014728fi
14729
14730
Mark Dickinsona614f042009-11-28 12:48:43 +000014731fi
14732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14734$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014735if test $ac_cv_posix_semaphores_enabled = no
14736then
14737
Matthias Kloseb9621712010-04-24 17:59:49 +000014738$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014739
14740fi
14741
Mark Dickinson10683072009-04-18 21:18:19 +000014742# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14744$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014745if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014747else
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014749 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014750else
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014752/* end confdefs.h. */
14753
14754#include <unistd.h>
14755#include <fcntl.h>
14756#include <stdio.h>
14757#include <semaphore.h>
14758#include <sys/stat.h>
14759
14760int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014761 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014762 int count;
14763 int res;
14764 if(a==SEM_FAILED){
14765 perror("sem_open");
14766 return 1;
14767
14768 }
14769 res = sem_getvalue(a, &count);
14770 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014771 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014772 return res==-1 ? 1 : 0;
14773}
14774
Mark Dickinson10683072009-04-18 21:18:19 +000014775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014776if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014777 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014778else
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014783fi
14784
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014785
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014786fi
14787
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14789$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014790if test $ac_cv_broken_sem_getvalue = yes
14791then
14792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014794
14795fi
14796
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014797ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14798"
14799if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14800 ac_have_decl=1
14801else
14802 ac_have_decl=0
14803fi
14804
14805cat >>confdefs.h <<_ACEOF
14806#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14807_ACEOF
14808ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14809"
14810if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14811 ac_have_decl=1
14812else
14813 ac_have_decl=0
14814fi
14815
14816cat >>confdefs.h <<_ACEOF
14817#define HAVE_DECL_RTLD_NOW $ac_have_decl
14818_ACEOF
14819ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14820"
14821if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14822 ac_have_decl=1
14823else
14824 ac_have_decl=0
14825fi
14826
14827cat >>confdefs.h <<_ACEOF
14828#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14829_ACEOF
14830ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14831"
14832if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14833 ac_have_decl=1
14834else
14835 ac_have_decl=0
14836fi
14837
14838cat >>confdefs.h <<_ACEOF
14839#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14840_ACEOF
14841ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14842"
14843if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14844 ac_have_decl=1
14845else
14846 ac_have_decl=0
14847fi
14848
14849cat >>confdefs.h <<_ACEOF
14850#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14851_ACEOF
14852ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14853"
14854if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14855 ac_have_decl=1
14856else
14857 ac_have_decl=0
14858fi
14859
14860cat >>confdefs.h <<_ACEOF
14861#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14862_ACEOF
14863ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14864"
14865if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14866 ac_have_decl=1
14867else
14868 ac_have_decl=0
14869fi
14870
14871cat >>confdefs.h <<_ACEOF
14872#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14873_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014874ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14875"
14876if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14877 ac_have_decl=1
14878else
14879 ac_have_decl=0
14880fi
14881
14882cat >>confdefs.h <<_ACEOF
14883#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14884_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014885
14886
Mark Dickinsonbd792642009-03-18 20:06:12 +000014887# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14889$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014890# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014891if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014892 enableval=$enable_big_digits; case $enable_big_digits in
14893yes)
14894 enable_big_digits=30 ;;
14895no)
14896 enable_big_digits=15 ;;
1489715|30)
14898 ;;
14899*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014900 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 +000014901esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14903$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014904
14905cat >>confdefs.h <<_ACEOF
14906#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14907_ACEOF
14908
14909
14910else
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14912$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014913fi
14914
14915
Guido van Rossumef2255b2000-03-10 22:30:29 +000014916# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014917ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014918if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
14920
Matthias Kloseb9621712010-04-24 17:59:49 +000014921$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014922
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014923 wchar_h="yes"
14924
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925else
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014927
14928fi
14929
Michael W. Hudson54241132001-12-07 15:38:26 +000014930
Martin v. Löwis11437992002-04-12 09:54:03 +000014931
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014932# determine wchar_t size
14933if test "$wchar_h" = yes
14934then
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14938# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14940$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014941if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014943else
Matthias Kloseb9621712010-04-24 17:59:49 +000014944 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14945"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014946
Martin v. Löwis11437992002-04-12 09:54:03 +000014947else
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 if test "$ac_cv_type_wchar_t" = yes; then
14949 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014951as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014952See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953 else
14954 ac_cv_sizeof_wchar_t=0
14955 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014957
Martin v. Löwis11437992002-04-12 09:54:03 +000014958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14960$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961
14962
14963
Martin v. Löwis11437992002-04-12 09:54:03 +000014964cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014965#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014966_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014967
Michael W. Hudson54241132001-12-07 15:38:26 +000014968
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014969fi
14970
Matthias Kloseb9621712010-04-24 17:59:49 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14972$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014973have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014975/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014976
14977#include <tcl.h>
14978#if TCL_UTF_MAX != 6
14979# error "NOT UCS4_TCL"
14980#endif
14981int
14982main ()
14983{
14984
14985 ;
14986 return 0;
14987}
14988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014989if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014990
14991
Matthias Kloseb9621712010-04-24 17:59:49 +000014992$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014993
14994 have_ucs4_tcl=yes
14995
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14999$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015000
Skip Montanaro6dead952003-09-25 14:50:04 +000015001# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015002if test "$wchar_h" = yes
15003then
15004 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15006$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015007 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015009else
15010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015012 ac_cv_wchar_t_signed=yes
15013else
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015015/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015016
15017 #include <wchar.h>
15018 int main()
15019 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015020 /* Success: exit code 0 */
15021 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015022 }
15023
15024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015025if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015026 ac_cv_wchar_t_signed=yes
15027else
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15031 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015032fi
15033
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015034fi
15035
Matthias Kloseb9621712010-04-24 17:59:49 +000015036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15037$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038fi
15039
Michael Osipov3738fad2018-08-24 18:17:19 +020015040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15041$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015042# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015043if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015044 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015045then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015046
Matthias Kloseb9621712010-04-24 17:59:49 +000015047$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015048
Michael Osipov3738fad2018-08-24 18:17:19 +020015049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15050$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015051else
Michael Osipov3738fad2018-08-24 18:17:19 +020015052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15053$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015054fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015055
15056# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15058$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015059if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015061else
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 ac_cv_c_bigendian=unknown
15063 # See if we're dealing with a universal compiler.
15064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15065/* end confdefs.h. */
15066#ifndef __APPLE_CC__
15067 not a universal capable compiler
15068 #endif
15069 typedef int dummy;
15070
Skip Montanaro6dead952003-09-25 14:50:04 +000015071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015072if ac_fn_c_try_compile "$LINENO"; then :
15073
15074 # Check for potential -arch flags. It is not universal unless
15075 # there are at least two -arch flags with different values.
15076 ac_arch=
15077 ac_prev=
15078 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15079 if test -n "$ac_prev"; then
15080 case $ac_word in
15081 i?86 | x86_64 | ppc | ppc64)
15082 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15083 ac_arch=$ac_word
15084 else
15085 ac_cv_c_bigendian=universal
15086 break
15087 fi
15088 ;;
15089 esac
15090 ac_prev=
15091 elif test "x$ac_word" = "x-arch"; then
15092 ac_prev=arch
15093 fi
15094 done
15095fi
15096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15097 if test $ac_cv_c_bigendian = unknown; then
15098 # See if sys/param.h defines the BYTE_ORDER macro.
15099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015100/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015101#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015103
Martin v. Löwis11437992002-04-12 09:54:03 +000015104int
15105main ()
15106{
Matthias Kloseb9621712010-04-24 17:59:49 +000015107#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15108 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15109 && LITTLE_ENDIAN)
15110 bogus endian macros
15111 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015112
15113 ;
15114 return 0;
15115}
15116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015117if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015118 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015120/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015121#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015123
Martin v. Löwis11437992002-04-12 09:54:03 +000015124int
15125main ()
15126{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 not big endian
15129 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015130
15131 ;
15132 return 0;
15133}
15134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015135if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015136 ac_cv_c_bigendian=yes
15137else
Matthias Kloseb9621712010-04-24 17:59:49 +000015138 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015141fi
15142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15143 fi
15144 if test $ac_cv_c_bigendian = unknown; then
15145 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015147/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015148#include <limits.h>
15149
Martin v. Löwis11437992002-04-12 09:54:03 +000015150int
15151main ()
15152{
Matthias Kloseb9621712010-04-24 17:59:49 +000015153#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15154 bogus endian macros
15155 #endif
15156
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 ;
15158 return 0;
15159}
15160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015161if ac_fn_c_try_compile "$LINENO"; then :
15162 # It does; now see whether it defined to _BIG_ENDIAN or not.
15163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15164/* end confdefs.h. */
15165#include <limits.h>
15166
15167int
15168main ()
15169{
15170#ifndef _BIG_ENDIAN
15171 not big endian
15172 #endif
15173
15174 ;
15175 return 0;
15176}
15177_ACEOF
15178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015180else
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15184fi
15185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15186 fi
15187 if test $ac_cv_c_bigendian = unknown; then
15188 # Compile a test program.
15189 if test "$cross_compiling" = yes; then :
15190 # Try to guess by grepping values from an object file.
15191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15192/* end confdefs.h. */
15193short int ascii_mm[] =
15194 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15195 short int ascii_ii[] =
15196 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15197 int use_ascii (int i) {
15198 return ascii_mm[i] + ascii_ii[i];
15199 }
15200 short int ebcdic_ii[] =
15201 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15202 short int ebcdic_mm[] =
15203 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15204 int use_ebcdic (int i) {
15205 return ebcdic_mm[i] + ebcdic_ii[i];
15206 }
15207 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209int
15210main ()
15211{
15212return use_ascii (foo) == use_ebcdic (foo);
15213 ;
15214 return 0;
15215}
15216_ACEOF
15217if ac_fn_c_try_compile "$LINENO"; then :
15218 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15219 ac_cv_c_bigendian=yes
15220 fi
15221 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15222 if test "$ac_cv_c_bigendian" = unknown; then
15223 ac_cv_c_bigendian=no
15224 else
15225 # finding both strings is unlikely to happen, but who knows?
15226 ac_cv_c_bigendian=unknown
15227 fi
15228 fi
15229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015231else
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015233/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015235int
15236main ()
15237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 /* Are we little or big endian? From Harbison&Steele. */
15240 union
15241 {
15242 long int l;
15243 char c[sizeof (long int)];
15244 } u;
15245 u.l = 1;
15246 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247
15248 ;
15249 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015250}
Martin v. Löwis11437992002-04-12 09:54:03 +000015251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015252if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015253 ac_cv_c_bigendian=no
15254else
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15258 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15264$as_echo "$ac_cv_c_bigendian" >&6; }
15265 case $ac_cv_c_bigendian in #(
15266 yes)
15267 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15268;; #(
15269 no)
15270 ;; #(
15271 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015272
Matthias Kloseb9621712010-04-24 17:59:49 +000015273$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015274
Matthias Kloseb9621712010-04-24 17:59:49 +000015275 ;; #(
15276 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015277 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015278 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015280
Michael W. Hudson54241132001-12-07 15:38:26 +000015281
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015282# ABI version string for Python extension modules. This appears between the
15283# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15284# from the following attributes which affect the ABI of this Python build (in
15285# this order):
15286#
15287# * The Python implementation (always 'cpython-' for us)
15288# * The major and minor version numbers
15289# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015290#
15291# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015292# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15293# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015294#
15295# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15296# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015297
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15299$as_echo_n "checking ABIFLAGS... " >&6; }
15300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15301$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15303$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015304SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15306$as_echo "$SOABI" >&6; }
15307
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015308# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15309if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015310 # Similar to SOABI but remove "d" flag from ABIFLAGS
15311
15312 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15313
15314cat >>confdefs.h <<_ACEOF
15315#define ALT_SOABI "${ALT_SOABI}"
15316_ACEOF
15317
15318fi
15319
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015320
15321case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015322 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015323 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15324 *)
15325 EXT_SUFFIX=${SHLIB_SUFFIX};;
15326esac
15327
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15329$as_echo_n "checking LDVERSION... " >&6; }
15330LDVERSION='$(VERSION)$(ABIFLAGS)'
15331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15332$as_echo "$LDVERSION" >&6; }
15333
E. M. Brayc994c8f2019-05-24 17:33:47 +020015334# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015335
E. M. Brayb1fc4172019-05-24 18:39:39 +020015336if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015337 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015338else
15339 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015340fi
15341
doko@python.org87421192013-01-26 11:39:31 +010015342
Victor Stinner51ae31e2020-06-09 15:32:43 +020015343
15344BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15345
15346
15347# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015348# /usr/$LIDIRNAME/python$VERSION
15349
15350PLATLIBDIR="lib"
15351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15352$as_echo_n "checking for --with-platlibdir... " >&6; }
15353
15354# Check whether --with-platlibdir was given.
15355if test "${with_platlibdir+set}" = set; then :
15356 withval=$with_platlibdir;
15357# ignore 3 options:
15358# --with-platlibdir
15359# --with-platlibdir=
15360# --without-platlibdir
15361if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15362then
15363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15364$as_echo "yes" >&6; }
15365 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015366 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015367else
Victor Stinner8510f432020-03-10 09:53:09 +010015368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15369$as_echo "no" >&6; }
15370fi
15371else
15372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15373$as_echo "no" >&6; }
15374fi
15375
15376
15377
15378
15379if test x$PLATFORM_TRIPLET = x; then
15380 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15381else
15382 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015383fi
doko@python.org87421192013-01-26 11:39:31 +010015384
15385
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015386# Check whether right shifting a negative integer extends the sign bit
15387# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15389$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015390if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015391 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015392else
Martin v. Löwis11437992002-04-12 09:54:03 +000015393
Matthias Kloseb9621712010-04-24 17:59:49 +000015394if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015395 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015396else
Matthias Kloseb9621712010-04-24 17:59:49 +000015397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015398/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015399
15400int main()
15401{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015402 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015403}
15404
Martin v. Löwis11437992002-04-12 09:54:03 +000015405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015406if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015407 ac_cv_rshift_extends_sign=yes
15408else
Matthias Kloseb9621712010-04-24 17:59:49 +000015409 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15412 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015413fi
15414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015415fi
15416
Matthias Kloseb9621712010-04-24 17:59:49 +000015417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15418$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015419if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015420then
Martin v. Löwis11437992002-04-12 09:54:03 +000015421
Matthias Kloseb9621712010-04-24 17:59:49 +000015422$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015423
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015424fi
15425
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015426# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15428$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015429if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015430 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015431else
Martin v. Löwis11437992002-04-12 09:54:03 +000015432
Matthias Kloseb9621712010-04-24 17:59:49 +000015433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015434/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015435#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015436int
15437main ()
15438{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015439
15440 FILE *f = fopen("/dev/null", "r");
15441 flockfile(f);
15442 getc_unlocked(f);
15443 funlockfile(f);
15444
Martin v. Löwis11437992002-04-12 09:54:03 +000015445 ;
15446 return 0;
15447}
15448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015449if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015450 ac_cv_have_getc_unlocked=yes
15451else
Matthias Kloseb9621712010-04-24 17:59:49 +000015452 ac_cv_have_getc_unlocked=no
15453fi
15454rm -f core conftest.err conftest.$ac_objext \
15455 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457
Matthias Kloseb9621712010-04-24 17:59:49 +000015458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15459$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015460if test "$ac_cv_have_getc_unlocked" = yes
15461then
Martin v. Löwis11437992002-04-12 09:54:03 +000015462
Matthias Kloseb9621712010-04-24 17:59:49 +000015463$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015464
15465fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015466
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015467# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015468# save the value of LIBS so we don't actually link Python with readline
15469LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015470
Gregory P. Smith18820942008-09-07 06:24:49 +000015471# On some systems we need to link readline to a termcap compatible
15472# library. NOTE: Keep the precedence of listed libraries synchronised
15473# with setup.py.
15474py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15476$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015477for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015478 if test -z "$py_libtermcap"; then
15479 READLINE_LIBS="-lreadline"
15480 else
15481 READLINE_LIBS="-lreadline -l$py_libtermcap"
15482 fi
15483 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015485/* end confdefs.h. */
15486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487/* Override any GCC internal prototype to avoid an error.
15488 Use char because int might match the return type of a GCC
15489 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015490#ifdef __cplusplus
15491extern "C"
15492#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015493char readline ();
15494int
15495main ()
15496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015498 ;
15499 return 0;
15500}
15501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015502if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015503 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015505rm -f core conftest.err conftest.$ac_objext \
15506 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015507 if test $py_cv_lib_readline = yes; then
15508 break
15509 fi
15510done
15511# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15512#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015513if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15515$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015516else
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15518$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015519
Matthias Kloseb9621712010-04-24 17:59:49 +000015520$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015521
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015522fi
15523
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015524# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015526/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015527#include <readline/readline.h>
15528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015529if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015530 have_readline=yes
15531else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015532 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015533
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015534fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015535rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015536if test $have_readline = yes
15537then
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015539/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015540#include <readline/readline.h>
15541
15542_ACEOF
15543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015545
Matthias Kloseb9621712010-04-24 17:59:49 +000015546$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015547
15548fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015549rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015550
Matthias Kloseb9621712010-04-24 17:59:49 +000015551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015552/* end confdefs.h. */
15553#include <readline/readline.h>
15554
15555_ACEOF
15556if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015560
15561fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015562rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015563
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015564fi
15565
Martin v. Löwis0daad592001-09-30 21:09:59 +000015566# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15568$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015569if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015570 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015571else
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015573LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015577/* Override any GCC internal prototype to avoid an error.
15578 Use char because int might match the return type of a GCC
15579 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015580#ifdef __cplusplus
15581extern "C"
15582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015583char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015584int
15585main ()
15586{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015587return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 ;
15589 return 0;
15590}
15591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015592if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015594else
Matthias Kloseb9621712010-04-24 17:59:49 +000015595 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015597rm -f core conftest.err conftest.$ac_objext \
15598 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015599LIBS=$ac_check_lib_save_LIBS
15600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15602$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015603if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015606
Martin v. Löwis0daad592001-09-30 21:09:59 +000015607fi
15608
Michael W. Hudson54241132001-12-07 15:38:26 +000015609
Thomas Wouters89d996e2007-09-08 17:39:28 +000015610# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15612$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015613if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015615else
15616 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015617LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015619/* end confdefs.h. */
15620
15621/* Override any GCC internal prototype to avoid an error.
15622 Use char because int might match the return type of a GCC
15623 builtin and then its argument prototype would still apply. */
15624#ifdef __cplusplus
15625extern "C"
15626#endif
15627char rl_completion_display_matches_hook ();
15628int
15629main ()
15630{
15631return rl_completion_display_matches_hook ();
15632 ;
15633 return 0;
15634}
15635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015636if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015637 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15638else
Matthias Kloseb9621712010-04-24 17:59:49 +000015639 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015641rm -f core conftest.err conftest.$ac_objext \
15642 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015643LIBS=$ac_check_lib_save_LIBS
15644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15646$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015647if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015648
Matthias Kloseb9621712010-04-24 17:59:49 +000015649$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015650
15651fi
15652
15653
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015654# also in 4.0, but not in editline
15655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15656$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15657if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15658 $as_echo_n "(cached) " >&6
15659else
15660 ac_check_lib_save_LIBS=$LIBS
15661LIBS="-lreadline $READLINE_LIBS $LIBS"
15662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15663/* end confdefs.h. */
15664
15665/* Override any GCC internal prototype to avoid an error.
15666 Use char because int might match the return type of a GCC
15667 builtin and then its argument prototype would still apply. */
15668#ifdef __cplusplus
15669extern "C"
15670#endif
15671char rl_resize_terminal ();
15672int
15673main ()
15674{
15675return rl_resize_terminal ();
15676 ;
15677 return 0;
15678}
15679_ACEOF
15680if ac_fn_c_try_link "$LINENO"; then :
15681 ac_cv_lib_readline_rl_resize_terminal=yes
15682else
15683 ac_cv_lib_readline_rl_resize_terminal=no
15684fi
15685rm -f core conftest.err conftest.$ac_objext \
15686 conftest$ac_exeext conftest.$ac_ext
15687LIBS=$ac_check_lib_save_LIBS
15688fi
15689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15690$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15691if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15692
15693$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15694
15695fi
15696
15697
Martin v. Löwis0daad592001-09-30 21:09:59 +000015698# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15700$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015701if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015703else
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015705LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709/* Override any GCC internal prototype to avoid an error.
15710 Use char because int might match the return type of a GCC
15711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015712#ifdef __cplusplus
15713extern "C"
15714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015715char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015716int
15717main ()
15718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 ;
15721 return 0;
15722}
15723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015725 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015726else
Matthias Kloseb9621712010-04-24 17:59:49 +000015727 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015729rm -f core conftest.err conftest.$ac_objext \
15730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015731LIBS=$ac_check_lib_save_LIBS
15732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15734$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015735if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015736
Matthias Kloseb9621712010-04-24 17:59:49 +000015737$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015738
Guido van Rossum353ae582001-07-10 16:45:32 +000015739fi
15740
Jack Jansendd19cf82001-12-06 22:36:17 +000015741
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015742# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015744/* end confdefs.h. */
15745#include <readline/readline.h>
15746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015747if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015748 have_readline=yes
15749else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015750 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015751
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015752fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015753rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015754if test $have_readline = yes
15755then
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015757/* end confdefs.h. */
15758#include <readline/readline.h>
15759
15760_ACEOF
15761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015762 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015763
Matthias Kloseb9621712010-04-24 17:59:49 +000015764$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015765
15766fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015767rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015768
15769fi
15770
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15772$as_echo_n "checking for append_history in -lreadline... " >&6; }
15773if ${ac_cv_lib_readline_append_history+:} false; then :
15774 $as_echo_n "(cached) " >&6
15775else
15776 ac_check_lib_save_LIBS=$LIBS
15777LIBS="-lreadline $READLINE_LIBS $LIBS"
15778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15779/* end confdefs.h. */
15780
15781/* Override any GCC internal prototype to avoid an error.
15782 Use char because int might match the return type of a GCC
15783 builtin and then its argument prototype would still apply. */
15784#ifdef __cplusplus
15785extern "C"
15786#endif
15787char append_history ();
15788int
15789main ()
15790{
15791return append_history ();
15792 ;
15793 return 0;
15794}
15795_ACEOF
15796if ac_fn_c_try_link "$LINENO"; then :
15797 ac_cv_lib_readline_append_history=yes
15798else
15799 ac_cv_lib_readline_append_history=no
15800fi
15801rm -f core conftest.err conftest.$ac_objext \
15802 conftest$ac_exeext conftest.$ac_ext
15803LIBS=$ac_check_lib_save_LIBS
15804fi
15805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15806$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15807if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15808
15809$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15810
15811fi
15812
15813
Martin v. Löwis82bca632006-02-10 20:49:30 +000015814# End of readline checks: restore LIBS
15815LIBS=$LIBS_no_readline
15816
Matthias Kloseb9621712010-04-24 17:59:49 +000015817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15818$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015819if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015820 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015821else
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015824 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015825else
Matthias Kloseb9621712010-04-24 17:59:49 +000015826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015827/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015828
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015829#include <stdlib.h>
15830#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015831int main()
15832{
15833 int val1 = nice(1);
15834 if (val1 != -1 && val1 == nice(2))
15835 exit(0);
15836 exit(1);
15837}
15838
Martin v. Löwis11437992002-04-12 09:54:03 +000015839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015840if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015841 ac_cv_broken_nice=yes
15842else
Matthias Kloseb9621712010-04-24 17:59:49 +000015843 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015847fi
15848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849fi
15850
Matthias Kloseb9621712010-04-24 17:59:49 +000015851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15852$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015853if test "$ac_cv_broken_nice" = yes
15854then
Martin v. Löwis11437992002-04-12 09:54:03 +000015855
Matthias Kloseb9621712010-04-24 17:59:49 +000015856$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015857
15858fi
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15861$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015862if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015864else
Matthias Kloseb9621712010-04-24 17:59:49 +000015865 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015866 ac_cv_broken_poll=no
15867else
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015869/* end confdefs.h. */
15870
15871#include <poll.h>
15872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015873int main()
15874{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015875 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015876 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015877
15878 close (42);
15879
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015880 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015881 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015882 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015883 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015884 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015885 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015886 return 1;
15887}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015888
15889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015890if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015891 ac_cv_broken_poll=yes
15892else
Matthias Kloseb9621712010-04-24 17:59:49 +000015893 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015899fi
15900
Matthias Kloseb9621712010-04-24 17:59:49 +000015901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15902$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015903if test "$ac_cv_broken_poll" = yes
15904then
15905
Matthias Kloseb9621712010-04-24 17:59:49 +000015906$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015907
15908fi
15909
Martin v. Löwis1d459062005-03-14 21:23:33 +000015910# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15912$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015913if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015914 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015915else
15916
Matthias Kloseb9621712010-04-24 17:59:49 +000015917if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015918 ac_cv_working_tzset=no
15919else
Matthias Kloseb9621712010-04-24 17:59:49 +000015920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015921/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015922
15923#include <stdlib.h>
15924#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015925#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015926
15927#if HAVE_TZNAME
15928extern char *tzname[];
15929#endif
15930
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015931int main()
15932{
Brett Cannon18367812003-09-19 00:59:16 +000015933 /* Note that we need to ensure that not only does tzset(3)
15934 do 'something' with localtime, but it works as documented
15935 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015936 This includes making sure that tzname is set properly if
15937 tm->tm_zone does not exist since it is the alternative way
15938 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015939
15940 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015941 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015942 */
15943
Martin v. Löwis1d459062005-03-14 21:23:33 +000015944 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015945 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15946
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015947 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015948 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015949 if (localtime(&groundhogday)->tm_hour != 0)
15950 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015951#if HAVE_TZNAME
15952 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15953 if (strcmp(tzname[0], "UTC") ||
15954 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15955 exit(1);
15956#endif
Brett Cannon18367812003-09-19 00:59:16 +000015957
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015958 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015959 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015960 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015961 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015962#if HAVE_TZNAME
15963 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15964 exit(1);
15965#endif
Brett Cannon18367812003-09-19 00:59:16 +000015966
15967 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15968 tzset();
15969 if (localtime(&groundhogday)->tm_hour != 11)
15970 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015971#if HAVE_TZNAME
15972 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15973 exit(1);
15974#endif
15975
15976#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015977 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15978 exit(1);
15979 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15980 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015981#endif
Brett Cannon18367812003-09-19 00:59:16 +000015982
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015983 exit(0);
15984}
15985
15986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015987if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015988 ac_cv_working_tzset=yes
15989else
Matthias Kloseb9621712010-04-24 17:59:49 +000015990 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15993 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015994fi
15995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015996fi
15997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15999$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016000if test "$ac_cv_working_tzset" = yes
16001then
16002
Matthias Kloseb9621712010-04-24 17:59:49 +000016003$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016004
16005fi
16006
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016007# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16009$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016010if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016011 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016012else
Matthias Kloseb9621712010-04-24 17:59:49 +000016013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016014/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016015#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016016int
16017main ()
16018{
16019
16020struct stat st;
16021st.st_mtim.tv_nsec = 1;
16022
16023 ;
16024 return 0;
16025}
16026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016027if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016028 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016029else
Matthias Kloseb9621712010-04-24 17:59:49 +000016030 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16033fi
16034
Matthias Kloseb9621712010-04-24 17:59:49 +000016035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16036$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016037if test "$ac_cv_stat_tv_nsec" = yes
16038then
16039
Matthias Kloseb9621712010-04-24 17:59:49 +000016040$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016041
16042fi
16043
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016044# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16046$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016047if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016048 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016049else
Matthias Kloseb9621712010-04-24 17:59:49 +000016050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016051/* end confdefs.h. */
16052#include <sys/stat.h>
16053int
16054main ()
16055{
16056
16057struct stat st;
16058st.st_mtimespec.tv_nsec = 1;
16059
16060 ;
16061 return 0;
16062}
16063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016064if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016065 ac_cv_stat_tv_nsec2=yes
16066else
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16070fi
16071
Matthias Kloseb9621712010-04-24 17:59:49 +000016072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16073$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016074if test "$ac_cv_stat_tv_nsec2" = yes
16075then
16076
Matthias Kloseb9621712010-04-24 17:59:49 +000016077$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016078
16079fi
16080
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016081# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016082ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016083if test "$cross_compiling" = no; then
16084 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16085fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016086
16087for ac_header in curses.h ncurses.h
16088do :
16089 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16090ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16091if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16092 cat >>confdefs.h <<_ACEOF
16093#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16094_ACEOF
16095
16096fi
16097
16098done
16099
16100
16101# On Solaris, term.h requires curses.h
16102for ac_header in term.h
16103do :
16104 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16105#ifdef HAVE_CURSES_H
16106#include <curses.h>
16107#endif
16108
16109"
16110if test "x$ac_cv_header_term_h" = xyes; then :
16111 cat >>confdefs.h <<_ACEOF
16112#define HAVE_TERM_H 1
16113_ACEOF
16114
16115fi
16116
16117done
16118
16119
Jack Jansen666b1e72001-10-31 12:11:48 +000016120# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16122$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016123if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016125else
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016127/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016128#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016129int
16130main ()
16131{
Jack Jansen666b1e72001-10-31 12:11:48 +000016132
16133 int rtn;
16134 rtn = mvwdelch(0,0,0);
16135
Martin v. Löwis11437992002-04-12 09:54:03 +000016136 ;
16137 return 0;
16138}
16139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016140if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016141 ac_cv_mvwdelch_is_expression=yes
16142else
Matthias Kloseb9621712010-04-24 17:59:49 +000016143 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16146fi
16147
Matthias Kloseb9621712010-04-24 17:59:49 +000016148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16149$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016150
16151if test "$ac_cv_mvwdelch_is_expression" = yes
16152then
Martin v. Löwis11437992002-04-12 09:54:03 +000016153
Matthias Kloseb9621712010-04-24 17:59:49 +000016154$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016155
16156fi
16157
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016158# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16159# structs since version 5.7. If the macro is defined as zero before including
16160# [n]curses.h, ncurses will expose fields of the structs regardless of the
16161# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16163$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016164if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016165 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016166else
Matthias Kloseb9621712010-04-24 17:59:49 +000016167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016168/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016169
16170 #define NCURSES_OPAQUE 0
16171 #include <curses.h>
16172
Martin v. Löwis11437992002-04-12 09:54:03 +000016173int
16174main ()
16175{
Jack Jansen666b1e72001-10-31 12:11:48 +000016176
16177 WINDOW *w;
16178 w->_flags = 0;
16179
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 ;
16181 return 0;
16182}
16183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016184if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016185 ac_cv_window_has_flags=yes
16186else
Matthias Kloseb9621712010-04-24 17:59:49 +000016187 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16190fi
16191
Matthias Kloseb9621712010-04-24 17:59:49 +000016192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16193$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016194
Jack Jansen666b1e72001-10-31 12:11:48 +000016195
16196if test "$ac_cv_window_has_flags" = yes
16197then
Martin v. Löwis11437992002-04-12 09:54:03 +000016198
Matthias Kloseb9621712010-04-24 17:59:49 +000016199$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016200
16201fi
16202
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16204$as_echo_n "checking for is_pad... " >&6; }
16205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16206/* end confdefs.h. */
16207#include <curses.h>
16208int
16209main ()
16210{
16211
16212#ifndef is_pad
16213void *x=is_pad
16214#endif
16215
16216 ;
16217 return 0;
16218}
16219_ACEOF
16220if ac_fn_c_try_compile "$LINENO"; then :
16221
16222$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16223
16224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16225$as_echo "yes" >&6; }
16226else
16227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16228$as_echo "no" >&6; }
16229
16230fi
16231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16232
Matthias Kloseb9621712010-04-24 17:59:49 +000016233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16234$as_echo_n "checking for is_term_resized... " >&6; }
16235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016236/* end confdefs.h. */
16237#include <curses.h>
16238int
16239main ()
16240{
16241void *x=is_term_resized
16242 ;
16243 return 0;
16244}
16245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016249
Matthias Kloseb159a552010-04-25 21:00:44 +000016250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016251$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016252else
Matthias Kloseb9621712010-04-24 17:59:49 +000016253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16254$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016255
16256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16258
Matthias Kloseb9621712010-04-24 17:59:49 +000016259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16260$as_echo_n "checking for resize_term... " >&6; }
16261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016262/* end confdefs.h. */
16263#include <curses.h>
16264int
16265main ()
16266{
16267void *x=resize_term
16268 ;
16269 return 0;
16270}
16271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016272if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016273
Matthias Kloseb9621712010-04-24 17:59:49 +000016274$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016275
Matthias Kloseb159a552010-04-25 21:00:44 +000016276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016277$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016278else
Matthias Kloseb9621712010-04-24 17:59:49 +000016279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16280$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016281
16282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16284
Matthias Kloseb9621712010-04-24 17:59:49 +000016285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16286$as_echo_n "checking for resizeterm... " >&6; }
16287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016288/* end confdefs.h. */
16289#include <curses.h>
16290int
16291main ()
16292{
16293void *x=resizeterm
16294 ;
16295 return 0;
16296}
16297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016298if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016299
Matthias Kloseb9621712010-04-24 17:59:49 +000016300$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016301
Matthias Kloseb159a552010-04-25 21:00:44 +000016302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016303$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016304else
Matthias Kloseb9621712010-04-24 17:59:49 +000016305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16306$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016307
16308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016310
16311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16312$as_echo_n "checking for immedok... " >&6; }
16313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16314/* end confdefs.h. */
16315#include <curses.h>
16316int
16317main ()
16318{
16319
16320#ifndef immedok
16321void *x=immedok
16322#endif
16323
16324 ;
16325 return 0;
16326}
16327_ACEOF
16328if ac_fn_c_try_compile "$LINENO"; then :
16329
16330$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16331
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16333$as_echo "yes" >&6; }
16334else
16335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16336$as_echo "no" >&6; }
16337
16338fi
16339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16340
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16342$as_echo_n "checking for syncok... " >&6; }
16343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16344/* end confdefs.h. */
16345#include <curses.h>
16346int
16347main ()
16348{
16349
16350#ifndef syncok
16351void *x=syncok
16352#endif
16353
16354 ;
16355 return 0;
16356}
16357_ACEOF
16358if ac_fn_c_try_compile "$LINENO"; then :
16359
16360$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16361
16362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16363$as_echo "yes" >&6; }
16364else
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16366$as_echo "no" >&6; }
16367
16368fi
16369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16370
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16372$as_echo_n "checking for wchgat... " >&6; }
16373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16374/* end confdefs.h. */
16375#include <curses.h>
16376int
16377main ()
16378{
16379
16380#ifndef wchgat
16381void *x=wchgat
16382#endif
16383
16384 ;
16385 return 0;
16386}
16387_ACEOF
16388if ac_fn_c_try_compile "$LINENO"; then :
16389
16390$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16391
16392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16393$as_echo "yes" >&6; }
16394else
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16396$as_echo "no" >&6; }
16397
16398fi
16399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16400
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16402$as_echo_n "checking for filter... " >&6; }
16403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16404/* end confdefs.h. */
16405#include <curses.h>
16406int
16407main ()
16408{
16409
16410#ifndef filter
16411void *x=filter
16412#endif
16413
16414 ;
16415 return 0;
16416}
16417_ACEOF
16418if ac_fn_c_try_compile "$LINENO"; then :
16419
16420$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16421
16422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16423$as_echo "yes" >&6; }
16424else
16425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16426$as_echo "no" >&6; }
16427
16428fi
16429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16430
16431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16432$as_echo_n "checking for has_key... " >&6; }
16433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16434/* end confdefs.h. */
16435#include <curses.h>
16436int
16437main ()
16438{
16439
16440#ifndef has_key
16441void *x=has_key
16442#endif
16443
16444 ;
16445 return 0;
16446}
16447_ACEOF
16448if ac_fn_c_try_compile "$LINENO"; then :
16449
16450$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16451
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16453$as_echo "yes" >&6; }
16454else
16455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16456$as_echo "no" >&6; }
16457
16458fi
16459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16460
16461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16462$as_echo_n "checking for typeahead... " >&6; }
16463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16464/* end confdefs.h. */
16465#include <curses.h>
16466int
16467main ()
16468{
16469
16470#ifndef typeahead
16471void *x=typeahead
16472#endif
16473
16474 ;
16475 return 0;
16476}
16477_ACEOF
16478if ac_fn_c_try_compile "$LINENO"; then :
16479
16480$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16481
16482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16483$as_echo "yes" >&6; }
16484else
16485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16486$as_echo "no" >&6; }
16487
16488fi
16489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16490
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16492$as_echo_n "checking for use_env... " >&6; }
16493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16494/* end confdefs.h. */
16495#include <curses.h>
16496int
16497main ()
16498{
16499
16500#ifndef use_env
16501void *x=use_env
16502#endif
16503
16504 ;
16505 return 0;
16506}
16507_ACEOF
16508if ac_fn_c_try_compile "$LINENO"; then :
16509
16510$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16511
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16513$as_echo "yes" >&6; }
16514else
16515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16516$as_echo "no" >&6; }
16517
16518fi
16519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016520# last curses configure check
16521CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16524$as_echo "$as_me: checking for device files" >&6;}
16525
16526if test "x$cross_compiling" = xyes; then
16527 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16529$as_echo_n "checking for /dev/ptmx... " >&6; }
16530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16531$as_echo "not set" >&6; }
16532 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16533 fi
16534 if test "${ac_cv_file__dev_ptc+set}" != set; then
16535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16536$as_echo_n "checking for /dev/ptc... " >&6; }
16537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16538$as_echo "not set" >&6; }
16539 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16540 fi
16541fi
16542
Matthias Kloseb9621712010-04-24 17:59:49 +000016543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16544$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016545if ${ac_cv_file__dev_ptmx+:} false; then :
16546 $as_echo_n "(cached) " >&6
16547else
16548 test "$cross_compiling" = yes &&
16549 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16550if test -r "/dev/ptmx"; then
16551 ac_cv_file__dev_ptmx=yes
16552else
16553 ac_cv_file__dev_ptmx=no
16554fi
16555fi
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16557$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16558if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016559
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016560fi
16561
16562if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016563
Matthias Kloseb9621712010-04-24 17:59:49 +000016564$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016565
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16568$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016569if ${ac_cv_file__dev_ptc+:} false; then :
16570 $as_echo_n "(cached) " >&6
16571else
16572 test "$cross_compiling" = yes &&
16573 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16574if test -r "/dev/ptc"; then
16575 ac_cv_file__dev_ptc=yes
16576else
16577 ac_cv_file__dev_ptc=no
16578fi
16579fi
16580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16581$as_echo "$ac_cv_file__dev_ptc" >&6; }
16582if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016583
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016584fi
16585
16586if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016587
Matthias Kloseb9621712010-04-24 17:59:49 +000016588$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016589
Neal Norwitz865400f2003-03-21 01:42:58 +000016590fi
16591
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016592if test $ac_sys_system = Darwin
16593then
16594 LIBS="$LIBS -framework CoreFoundation"
16595fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016596
Matthias Kloseb9621712010-04-24 17:59:49 +000016597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16598$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016599if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016600 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016601else
Matthias Kloseb9621712010-04-24 17:59:49 +000016602 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016603 ac_cv_have_size_t_format="cross -- assuming yes"
16604
Thomas Wouters477c8d52006-05-27 19:21:47 +000016605else
Matthias Kloseb9621712010-04-24 17:59:49 +000016606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016607/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016608
Thomas Wouters477c8d52006-05-27 19:21:47 +000016609#include <stdio.h>
16610#include <stddef.h>
16611#include <string.h>
16612
Christian Heimes2c181612007-12-17 20:04:13 +000016613#ifdef HAVE_SYS_TYPES_H
16614#include <sys/types.h>
16615#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016616
16617#ifdef HAVE_SSIZE_T
16618typedef ssize_t Py_ssize_t;
16619#elif SIZEOF_VOID_P == SIZEOF_LONG
16620typedef long Py_ssize_t;
16621#else
16622typedef int Py_ssize_t;
16623#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016624
Christian Heimes2c181612007-12-17 20:04:13 +000016625int main()
16626{
16627 char buffer[256];
16628
Thomas Wouters477c8d52006-05-27 19:21:47 +000016629 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16630 return 1;
16631
Thomas Wouters89f507f2006-12-13 04:49:30 +000016632 if (strcmp(buffer, "123"))
16633 return 1;
16634
16635 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16636 return 1;
16637
16638 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016639 return 1;
16640
16641 return 0;
16642}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016643
Thomas Wouters477c8d52006-05-27 19:21:47 +000016644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016645if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016646 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016647else
Matthias Kloseb9621712010-04-24 17:59:49 +000016648 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016652fi
16653
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16656$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016657if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016658
Matthias Kloseb9621712010-04-24 17:59:49 +000016659$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016660
16661fi
16662
Matthias Kloseb9621712010-04-24 17:59:49 +000016663ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016664#ifdef HAVE_SYS_TYPES_H
16665#include <sys/types.h>
16666#endif
16667#ifdef HAVE_SYS_SOCKET_H
16668#include <sys/socket.h>
16669#endif
16670
Matthias Kloseb9621712010-04-24 17:59:49 +000016671"
Victor Stinnere0be4232011-10-25 13:06:09 +020016672if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016673
Martin v. Löwis11437992002-04-12 09:54:03 +000016674else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016675
Matthias Kloseb9621712010-04-24 17:59:49 +000016676$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016677
16678fi
16679
Michael W. Hudson54241132001-12-07 15:38:26 +000016680
Matthias Kloseb9621712010-04-24 17:59:49 +000016681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16682$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016683if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016684 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016685else
Matthias Kloseb9621712010-04-24 17:59:49 +000016686 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016687 ac_cv_broken_mbstowcs=no
16688else
Matthias Kloseb9621712010-04-24 17:59:49 +000016689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016690/* end confdefs.h. */
16691
Stefan Krah19c21392012-11-22 23:47:32 +010016692#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016693#include<stdlib.h>
16694int main() {
16695 size_t len = -1;
16696 const char *str = "text";
16697 len = mbstowcs(NULL, str, 0);
16698 return (len != 4);
16699}
16700
16701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016702if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016703 ac_cv_broken_mbstowcs=no
16704else
Matthias Kloseb9621712010-04-24 17:59:49 +000016705 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016709fi
16710
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016711fi
16712
Matthias Kloseb9621712010-04-24 17:59:49 +000016713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16714$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016715if test "$ac_cv_broken_mbstowcs" = yes
16716then
16717
Matthias Kloseb9621712010-04-24 17:59:49 +000016718$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016719
16720fi
16721
Antoine Pitroub52ec782009-01-25 16:34:23 +000016722# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16724$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016725
16726# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016727if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016728 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016729if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016730then
16731
Matthias Kloseb9621712010-04-24 17:59:49 +000016732$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016733
Matthias Kloseb9621712010-04-24 17:59:49 +000016734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16735$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016736fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016737if test "$withval" = no
16738then
16739
16740$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16741
Matthias Kloseb9621712010-04-24 17:59:49 +000016742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16743$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016744fi
16745
Antoine Pitrou042b1282010-08-13 21:15:58 +000016746else
16747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16748$as_echo "no value specified" >&6; }
16749fi
16750
Antoine Pitroub52ec782009-01-25 16:34:23 +000016751
Matthias Kloseb17289e2012-03-15 19:51:34 +010016752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16753$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16754if ${ac_cv_computed_gotos+:} false; then :
16755 $as_echo_n "(cached) " >&6
16756else
16757 if test "$cross_compiling" = yes; then :
16758 if test "${with_computed_gotos+set}" = set; then
16759 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16760 else
16761 ac_cv_computed_gotos=no
16762 fi
16763else
16764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16765/* end confdefs.h. */
16766
16767int main(int argc, char **argv)
16768{
16769 static void *targets[1] = { &&LABEL1 };
16770 goto LABEL2;
16771LABEL1:
16772 return 0;
16773LABEL2:
16774 goto *targets[0];
16775 return 1;
16776}
16777
16778_ACEOF
16779if ac_fn_c_try_run "$LINENO"; then :
16780 ac_cv_computed_gotos=yes
16781else
16782 ac_cv_computed_gotos=no
16783fi
16784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16785 conftest.$ac_objext conftest.beam conftest.$ac_ext
16786fi
16787
16788fi
16789
16790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16791$as_echo "$ac_cv_computed_gotos" >&6; }
16792case "$ac_cv_computed_gotos" in yes*)
16793
16794$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16795
16796esac
16797
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016798case $ac_sys_system in
16799AIX*)
16800
16801$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16802 ;;
16803esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016804
Michael W. Hudson54241132001-12-07 15:38:26 +000016805
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016806
16807
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016808for h in `(cd $srcdir;echo Python/thread_*.h)`
16809do
16810 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16811done
16812
Michael W. Hudson54241132001-12-07 15:38:26 +000016813
Ned Deily8d02f912020-06-25 10:46:44 -040016814SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16816$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016817for dir in $SRCDIRS; do
16818 if test ! -d $dir; then
16819 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016820 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016821done
Matthias Kloseb9621712010-04-24 17:59:49 +000016822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16823$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016824
Stefan Krah1919b7e2012-03-21 18:25:23 +010016825# Availability of -O2:
16826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16827$as_echo_n "checking for -O2... " >&6; }
16828saved_cflags="$CFLAGS"
16829CFLAGS="-O2"
16830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16831/* end confdefs.h. */
16832
16833int
16834main ()
16835{
16836
16837
16838 ;
16839 return 0;
16840}
16841_ACEOF
16842if ac_fn_c_try_compile "$LINENO"; then :
16843 have_O2=yes
16844else
16845 have_O2=no
16846fi
16847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16849$as_echo "$have_O2" >&6; }
16850CFLAGS="$saved_cflags"
16851
16852# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16853# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16855$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16856saved_cflags="$CFLAGS"
16857CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16858if test "$have_O2" = no; then
16859 CFLAGS=""
16860fi
16861if test "$cross_compiling" = yes; then :
16862 have_glibc_memmove_bug=undefined
16863else
16864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16865/* end confdefs.h. */
16866
16867#include <stdio.h>
16868#include <stdlib.h>
16869#include <string.h>
16870void foo(void *p, void *q) { memmove(p, q, 19); }
16871int main() {
16872 char a[32] = "123456789000000000";
16873 foo(&a[9], a);
16874 if (strcmp(a, "123456789123456789000000000") != 0)
16875 return 1;
16876 foo(a, &a[9]);
16877 if (strcmp(a, "123456789000000000") != 0)
16878 return 1;
16879 return 0;
16880}
16881
16882_ACEOF
16883if ac_fn_c_try_run "$LINENO"; then :
16884 have_glibc_memmove_bug=no
16885else
16886 have_glibc_memmove_bug=yes
16887fi
16888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16889 conftest.$ac_objext conftest.beam conftest.$ac_ext
16890fi
16891
16892CFLAGS="$saved_cflags"
16893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16894$as_echo "$have_glibc_memmove_bug" >&6; }
16895if test "$have_glibc_memmove_bug" = yes; then
16896
16897$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16898
16899fi
16900
16901if test "$have_gcc_asm_for_x87" = yes; then
16902 # Some versions of gcc miscompile inline asm:
16903 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16904 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16905 case $CC in
16906 *gcc*)
16907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16908$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16909 saved_cflags="$CFLAGS"
16910 CFLAGS="-O2"
16911 if test "$cross_compiling" = yes; then :
16912 have_ipa_pure_const_bug=undefined
16913else
16914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16915/* end confdefs.h. */
16916
16917 __attribute__((noinline)) int
16918 foo(int *p) {
16919 int r;
16920 asm ( "movl \$6, (%1)\n\t"
16921 "xorl %0, %0\n\t"
16922 : "=r" (r) : "r" (p) : "memory"
16923 );
16924 return r;
16925 }
16926 int main() {
16927 int p = 8;
16928 if ((foo(&p) ? : p) != 6)
16929 return 1;
16930 return 0;
16931 }
16932
16933_ACEOF
16934if ac_fn_c_try_run "$LINENO"; then :
16935 have_ipa_pure_const_bug=no
16936else
16937 have_ipa_pure_const_bug=yes
16938fi
16939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16940 conftest.$ac_objext conftest.beam conftest.$ac_ext
16941fi
16942
16943 CFLAGS="$saved_cflags"
16944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16945$as_echo "$have_ipa_pure_const_bug" >&6; }
16946 if test "$have_ipa_pure_const_bug" = yes; then
16947
16948$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16949
16950 fi
16951 ;;
16952 esac
16953fi
16954
Victor Stinner4f5366e2015-01-09 02:13:19 +010016955# Check for stdatomic.h
16956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16957$as_echo_n "checking for stdatomic.h... " >&6; }
16958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16959/* end confdefs.h. */
16960
16961
16962 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016963 atomic_int int_var;
16964 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016965 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016966 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16967 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16968 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016969 return 0;
16970 }
16971
16972
16973_ACEOF
16974if ac_fn_c_try_link "$LINENO"; then :
16975 have_stdatomic_h=yes
16976else
16977 have_stdatomic_h=no
16978fi
16979rm -f core conftest.err conftest.$ac_objext \
16980 conftest$ac_exeext conftest.$ac_ext
16981
16982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16983$as_echo "$have_stdatomic_h" >&6; }
16984
16985if test "$have_stdatomic_h" = yes; then
16986
16987$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16988
16989fi
16990
16991# Check for GCC >= 4.7 __atomic builtins
16992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16993$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16995/* end confdefs.h. */
16996
16997
16998 volatile int val = 1;
16999 int main() {
17000 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
17001 return 0;
17002 }
17003
17004
17005_ACEOF
17006if ac_fn_c_try_link "$LINENO"; then :
17007 have_builtin_atomic=yes
17008else
17009 have_builtin_atomic=no
17010fi
17011rm -f core conftest.err conftest.$ac_objext \
17012 conftest$ac_exeext conftest.$ac_ext
17013
17014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17015$as_echo "$have_builtin_atomic" >&6; }
17016
17017if test "$have_builtin_atomic" = yes; then
17018
17019$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17020
17021fi
17022
Ned Deily322f5ba2013-11-21 23:01:59 -080017023# ensurepip option
17024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17025$as_echo_n "checking for ensurepip... " >&6; }
17026
17027# Check whether --with-ensurepip was given.
17028if test "${with_ensurepip+set}" = set; then :
17029 withval=$with_ensurepip;
17030else
17031 with_ensurepip=upgrade
17032fi
17033
17034case $with_ensurepip in #(
17035 yes|upgrade) :
17036 ENSUREPIP=upgrade ;; #(
17037 install) :
17038 ENSUREPIP=install ;; #(
17039 no) :
17040 ENSUREPIP=no ;; #(
17041 *) :
17042 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17043esac
17044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17045$as_echo "$ENSUREPIP" >&6; }
17046
17047
Victor Stinner35a97c02015-03-08 02:59:09 +010017048# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17050$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17052/* end confdefs.h. */
17053
17054
17055 #include <dirent.h>
17056
17057 int main() {
17058 struct dirent entry;
17059 return entry.d_type == DT_UNKNOWN;
17060 }
17061
17062
17063_ACEOF
17064if ac_fn_c_try_link "$LINENO"; then :
17065 have_dirent_d_type=yes
17066else
17067 have_dirent_d_type=no
17068fi
17069rm -f core conftest.err conftest.$ac_objext \
17070 conftest$ac_exeext conftest.$ac_ext
17071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17072$as_echo "$have_dirent_d_type" >&6; }
17073
17074if test "$have_dirent_d_type" = yes; then
17075
17076$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17077
17078fi
17079
Victor Stinner9eb57c52015-03-19 22:21:49 +010017080# check if the Linux getrandom() syscall is available
17081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17082$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17084/* end confdefs.h. */
17085
17086
Victor Stinner1b80b242016-04-12 22:34:58 +020017087 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017088 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017089 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017090
17091 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017092 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017093 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017094 const int flags = GRND_NONBLOCK;
17095 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017096 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017097 return 0;
17098 }
17099
17100
17101_ACEOF
17102if ac_fn_c_try_link "$LINENO"; then :
17103 have_getrandom_syscall=yes
17104else
17105 have_getrandom_syscall=no
17106fi
17107rm -f core conftest.err conftest.$ac_objext \
17108 conftest$ac_exeext conftest.$ac_ext
17109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17110$as_echo "$have_getrandom_syscall" >&6; }
17111
17112if test "$have_getrandom_syscall" = yes; then
17113
17114$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17115
17116fi
17117
Victor Stinner3abf44e2015-09-18 15:38:37 +020017118# check if the getrandom() function is available
17119# the test was written for the Solaris function of <sys/random.h>
17120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17121$as_echo_n "checking for the getrandom() function... " >&6; }
17122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17123/* end confdefs.h. */
17124
17125
17126 #include <sys/random.h>
17127
17128 int main() {
17129 char buffer[1];
17130 const size_t buflen = sizeof(buffer);
17131 const int flags = 0;
17132 /* ignore the result, Python checks for ENOSYS at runtime */
17133 (void)getrandom(buffer, buflen, flags);
17134 return 0;
17135 }
17136
17137
17138_ACEOF
17139if ac_fn_c_try_link "$LINENO"; then :
17140 have_getrandom=yes
17141else
17142 have_getrandom=no
17143fi
17144rm -f core conftest.err conftest.$ac_objext \
17145 conftest$ac_exeext conftest.$ac_ext
17146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17147$as_echo "$have_getrandom" >&6; }
17148
17149if test "$have_getrandom" = yes; then
17150
17151$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17152
17153fi
17154
Neil Schemenauer5741c452019-02-08 10:48:46 -080017155# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17156# shm_* may only be available if linking against librt
17157save_LIBS="$LIBS"
17158save_includes_default="$ac_includes_default"
17159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17160$as_echo_n "checking for library containing shm_open... " >&6; }
17161if ${ac_cv_search_shm_open+:} false; then :
17162 $as_echo_n "(cached) " >&6
17163else
17164 ac_func_search_save_LIBS=$LIBS
17165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17166/* end confdefs.h. */
17167
17168/* Override any GCC internal prototype to avoid an error.
17169 Use char because int might match the return type of a GCC
17170 builtin and then its argument prototype would still apply. */
17171#ifdef __cplusplus
17172extern "C"
17173#endif
17174char shm_open ();
17175int
17176main ()
17177{
17178return shm_open ();
17179 ;
17180 return 0;
17181}
17182_ACEOF
17183for ac_lib in '' rt; do
17184 if test -z "$ac_lib"; then
17185 ac_res="none required"
17186 else
17187 ac_res=-l$ac_lib
17188 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17189 fi
17190 if ac_fn_c_try_link "$LINENO"; then :
17191 ac_cv_search_shm_open=$ac_res
17192fi
17193rm -f core conftest.err conftest.$ac_objext \
17194 conftest$ac_exeext
17195 if ${ac_cv_search_shm_open+:} false; then :
17196 break
17197fi
17198done
17199if ${ac_cv_search_shm_open+:} false; then :
17200
17201else
17202 ac_cv_search_shm_open=no
17203fi
17204rm conftest.$ac_ext
17205LIBS=$ac_func_search_save_LIBS
17206fi
17207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17208$as_echo "$ac_cv_search_shm_open" >&6; }
17209ac_res=$ac_cv_search_shm_open
17210if test "$ac_res" != no; then :
17211 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17212
17213fi
17214
17215if test "$ac_cv_search_shm_open" = "-lrt"; then
17216
17217$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17218
17219fi
17220for ac_header in sys/mman.h
17221do :
17222 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17223if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17224 cat >>confdefs.h <<_ACEOF
17225#define HAVE_SYS_MMAN_H 1
17226_ACEOF
17227
17228fi
17229
17230done
17231
17232# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17233ac_includes_default="\
17234${ac_includes_default}
17235#ifndef __cplusplus
17236# ifdef HAVE_SYS_MMAN_H
17237# include <sys/mman.h>
17238# endif
17239#endif
17240"
17241for ac_func in shm_open shm_unlink
17242do :
17243 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17244ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17245if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17246 cat >>confdefs.h <<_ACEOF
17247#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17248_ACEOF
17249
17250fi
17251done
17252
17253# we don't want to link with librt always, restore LIBS
17254LIBS="$save_LIBS"
17255ac_includes_default="$save_includes_default"
17256
Christian Heimesff5be6e2018-01-20 13:19:21 +010017257# Check for usable OpenSSL
17258
17259 found=false
17260
17261# Check whether --with-openssl was given.
17262if test "${with_openssl+set}" = set; then :
17263 withval=$with_openssl;
17264 case "$withval" in
17265 "" | y | ye | yes | n | no)
17266 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17267 ;;
17268 *) ssldirs="$withval"
17269 ;;
17270 esac
17271
17272else
17273
17274 # if pkg-config is installed and openssl has installed a .pc file,
17275 # then use that information and don't search ssldirs
17276 if test -n "$ac_tool_prefix"; then
17277 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17278set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17280$as_echo_n "checking for $ac_word... " >&6; }
17281if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17282 $as_echo_n "(cached) " >&6
17283else
17284 if test -n "$PKG_CONFIG"; then
17285 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17286else
17287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17288for as_dir in $PATH
17289do
17290 IFS=$as_save_IFS
17291 test -z "$as_dir" && as_dir=.
17292 for ac_exec_ext in '' $ac_executable_extensions; do
17293 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17294 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17296 break 2
17297 fi
17298done
17299 done
17300IFS=$as_save_IFS
17301
17302fi
17303fi
17304PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17305if test -n "$PKG_CONFIG"; then
17306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17307$as_echo "$PKG_CONFIG" >&6; }
17308else
17309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17310$as_echo "no" >&6; }
17311fi
17312
17313
17314fi
17315if test -z "$ac_cv_prog_PKG_CONFIG"; then
17316 ac_ct_PKG_CONFIG=$PKG_CONFIG
17317 # Extract the first word of "pkg-config", so it can be a program name with args.
17318set dummy pkg-config; ac_word=$2
17319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17320$as_echo_n "checking for $ac_word... " >&6; }
17321if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17322 $as_echo_n "(cached) " >&6
17323else
17324 if test -n "$ac_ct_PKG_CONFIG"; then
17325 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17326else
17327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17328for as_dir in $PATH
17329do
17330 IFS=$as_save_IFS
17331 test -z "$as_dir" && as_dir=.
17332 for ac_exec_ext in '' $ac_executable_extensions; do
17333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17334 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17336 break 2
17337 fi
17338done
17339 done
17340IFS=$as_save_IFS
17341
17342fi
17343fi
17344ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17345if test -n "$ac_ct_PKG_CONFIG"; then
17346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17347$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17348else
17349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17350$as_echo "no" >&6; }
17351fi
17352
17353 if test "x$ac_ct_PKG_CONFIG" = x; then
17354 PKG_CONFIG=""
17355 else
17356 case $cross_compiling:$ac_tool_warned in
17357yes:)
17358{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17359$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17360ac_tool_warned=yes ;;
17361esac
17362 PKG_CONFIG=$ac_ct_PKG_CONFIG
17363 fi
17364else
17365 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17366fi
17367
17368 if test x"$PKG_CONFIG" != x""; then
17369 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17370 if test $? = 0; then
17371 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17372 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17373 found=true
17374 fi
17375 fi
17376
17377 # no such luck; use some default ssldirs
17378 if ! $found; then
17379 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17380 fi
17381
17382
17383fi
17384
17385
17386
17387 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17388 # an 'openssl' subdirectory
17389
17390 if ! $found; then
17391 OPENSSL_INCLUDES=
17392 for ssldir in $ssldirs; do
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17394$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17395 if test -f "$ssldir/include/openssl/ssl.h"; then
17396 OPENSSL_INCLUDES="-I$ssldir/include"
17397 OPENSSL_LDFLAGS="-L$ssldir/lib"
17398 OPENSSL_LIBS="-lssl -lcrypto"
17399 found=true
17400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17401$as_echo "yes" >&6; }
17402 break
17403 else
17404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17405$as_echo "no" >&6; }
17406 fi
17407 done
17408
17409 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17410 # it will just work!
17411 fi
17412
17413 # try the preprocessor and linker with our new flags,
17414 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17415
17416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17417$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17418 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17419 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17420
17421 save_LIBS="$LIBS"
17422 save_LDFLAGS="$LDFLAGS"
17423 save_CPPFLAGS="$CPPFLAGS"
17424 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17425 LIBS="$OPENSSL_LIBS $LIBS"
17426 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17428/* end confdefs.h. */
17429#include <openssl/ssl.h>
17430int
17431main ()
17432{
17433SSL_new(NULL)
17434 ;
17435 return 0;
17436}
17437_ACEOF
17438if ac_fn_c_try_link "$LINENO"; then :
17439
17440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17441$as_echo "yes" >&6; }
17442 have_openssl=yes
17443
17444else
17445
17446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17447$as_echo "no" >&6; }
17448 have_openssl=no
17449
17450fi
17451rm -f core conftest.err conftest.$ac_objext \
17452 conftest$ac_exeext conftest.$ac_ext
17453 CPPFLAGS="$save_CPPFLAGS"
17454 LDFLAGS="$save_LDFLAGS"
17455 LIBS="$save_LIBS"
17456
17457
17458
17459
17460
17461
17462if test "$have_openssl" = yes; then
17463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17464$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17465
17466 save_LIBS="$LIBS"
17467 save_LDFLAGS="$LDFLAGS"
17468 save_CPPFLAGS="$CPPFLAGS"
17469 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17470 LIBS="$OPENSSL_LIBS $LIBS"
17471 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17472
17473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17474/* end confdefs.h. */
17475
17476 #include <openssl/x509_vfy.h>
17477
17478int
17479main ()
17480{
17481
17482 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17483 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17484 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17485 X509_VERIFY_PARAM_set_hostflags(p, 0);
17486
17487 ;
17488 return 0;
17489}
17490
17491_ACEOF
17492if ac_fn_c_try_link "$LINENO"; then :
17493
17494 ac_cv_has_x509_verify_param_set1_host=yes
17495
17496else
17497
17498 ac_cv_has_x509_verify_param_set1_host=no
17499
17500fi
17501rm -f core conftest.err conftest.$ac_objext \
17502 conftest$ac_exeext conftest.$ac_ext
17503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17504$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17505 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17506
17507$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17508
17509 fi
17510
17511 CPPFLAGS="$save_CPPFLAGS"
17512 LDFLAGS="$save_LDFLAGS"
17513 LIBS="$save_LIBS"
17514fi
17515
Christian Heimes892d66e2018-01-29 14:10:18 +010017516# ssl module default cipher suite string
17517
17518
17519
17520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17521$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17522
17523# Check whether --with-ssl-default-suites was given.
17524if test "${with_ssl_default_suites+set}" = set; then :
17525 withval=$with_ssl_default_suites;
17526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17527$as_echo "$withval" >&6; }
17528case "$withval" in
17529 python)
17530 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17531
17532 ;;
17533 openssl)
17534 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17535
17536 ;;
17537 *)
17538 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17539
17540 cat >>confdefs.h <<_ACEOF
17541#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17542_ACEOF
17543
17544 ;;
17545esac
17546
17547else
17548
17549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17550$as_echo "python" >&6; }
17551$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17552
17553
17554fi
17555
17556
Christian Heimes9b60e552020-05-15 23:54:53 +020017557# builtin hash modules
17558default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17559
17560$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17561
17562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17563$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17564
17565# Check whether --with-builtin-hashlib-hashes was given.
17566if test "${with_builtin_hashlib_hashes+set}" = set; then :
17567 withval=$with_builtin_hashlib_hashes;
17568case "$withval" in
17569 yes)
17570 withval=$default_hashlib_hashes
17571 ;;
17572 no)
17573 withval=""
17574 ;;
17575esac
17576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17577$as_echo "$withval" >&6; }
17578cat >>confdefs.h <<_ACEOF
17579#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17580_ACEOF
17581
17582
17583else
17584
17585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17586$as_echo "$default_hashlib_hashes" >&6; };
17587cat >>confdefs.h <<_ACEOF
17588#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17589_ACEOF
17590
17591
17592fi
17593
17594
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017595# --with-experimental-isolated-subinterpreters
17596
17597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17598$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17599
17600# Check whether --with-experimental-isolated-subinterpreters was given.
17601if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17602 withval=$with_experimental_isolated_subinterpreters;
17603if test "$withval" != no
17604then
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17606$as_echo "yes" >&6; };
17607 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17608
17609else
17610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17611$as_echo "no" >&6; };
17612fi
17613else
17614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17615$as_echo "no" >&6; }
17616fi
17617
17618
Christian Heimes892d66e2018-01-29 14:10:18 +010017619
Guido van Rossum627b2d71993-12-24 10:39:16 +000017620# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017621ac_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 +000017622
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017623ac_config_files="$ac_config_files Modules/ld_so_aix"
17624
Martin v. Löwis11437992002-04-12 09:54:03 +000017625cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017626# This file is a shell script that caches the results of configure
17627# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017628# scripts and configure runs, see configure's option --config-cache.
17629# It is not useful on other systems. If it contains results you don't
17630# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017631#
Martin v. Löwis11437992002-04-12 09:54:03 +000017632# config.status only pays attention to the cache file if you give it
17633# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017634#
Skip Montanaro6dead952003-09-25 14:50:04 +000017635# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017636# loading this file, other *unset* `ac_cv_foo' will be assigned the
17637# following values.
17638
17639_ACEOF
17640
Guido van Rossumf78abae1997-01-21 22:02:36 +000017641# The following way of writing the cache mishandles newlines in values,
17642# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017644# Ultrix sh set writes to stderr and can't be redirected directly,
17645# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646(
17647 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17648 eval ac_val=\$$ac_var
17649 case $ac_val in #(
17650 *${as_nl}*)
17651 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017652 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17653$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 esac
17655 case $ac_var in #(
17656 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017657 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17658 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659 esac ;;
17660 esac
17661 done
17662
Martin v. Löwis11437992002-04-12 09:54:03 +000017663 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17665 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017666 # `set' does not quote correctly, so add quotes: double-quote
17667 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017669 "s/'/'\\\\''/g;
17670 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017672 *)
17673 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017675 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017676 esac |
17677 sort
17678) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017679 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017681 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017683 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17684 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17686 :end' >>confcache
17687if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17688 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017689 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017690 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17691$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017692 if test ! -f "$cache_file" || test -h "$cache_file"; then
17693 cat confcache >"$cache_file"
17694 else
17695 case $cache_file in #(
17696 */* | ?:*)
17697 mv -f confcache "$cache_file"$$ &&
17698 mv -f "$cache_file"$$ "$cache_file" ;; #(
17699 *)
17700 mv -f confcache "$cache_file" ;;
17701 esac
17702 fi
17703 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017704 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017705 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17706$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017708fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017709rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017710
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017711test "x$prefix" = xNONE && prefix=$ac_default_prefix
17712# Let make expand exec_prefix.
17713test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017714
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017715DEFS=-DHAVE_CONFIG_H
17716
Skip Montanaro6dead952003-09-25 14:50:04 +000017717ac_libobjs=
17718ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017719U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017720for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17721 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017723 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17725 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017726 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17727 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017728done
17729LIBOBJS=$ac_libobjs
17730
17731LTLIBOBJS=$ac_ltlibobjs
17732
17733
Martin v. Löwis11437992002-04-12 09:54:03 +000017734
Matthias Kloseb9621712010-04-24 17:59:49 +000017735
Victor Stinnere0be4232011-10-25 13:06:09 +020017736: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017737ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017738ac_clean_files_save=$ac_clean_files
17739ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017740{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17741$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17742as_write_fail=0
17743cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017744#! $SHELL
17745# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017746# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017747# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017748# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017749
Martin v. Löwis11437992002-04-12 09:54:03 +000017750debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017751ac_cs_recheck=false
17752ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017753
Matthias Kloseb9621712010-04-24 17:59:49 +000017754SHELL=\${CONFIG_SHELL-$SHELL}
17755export SHELL
17756_ASEOF
17757cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17758## -------------------- ##
17759## M4sh Initialization. ##
17760## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762# Be more Bourne compatible
17763DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017764if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 emulate sh
17766 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017767 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017768 # is contrary to our usage. Disable this feature.
17769 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017771else
Matthias Kloseb9621712010-04-24 17:59:49 +000017772 case `(set -o) 2>/dev/null` in #(
17773 *posix*) :
17774 set -o posix ;; #(
17775 *) :
17776 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017778fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017779
17780
Matthias Kloseb9621712010-04-24 17:59:49 +000017781as_nl='
17782'
17783export as_nl
17784# Printing a long string crashes Solaris 7 /usr/bin/printf.
17785as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17786as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17787as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17788# Prefer a ksh shell builtin over an external printf program on Solaris,
17789# but without wasting forks for bash or zsh.
17790if test -z "$BASH_VERSION$ZSH_VERSION" \
17791 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17792 as_echo='print -r --'
17793 as_echo_n='print -rn --'
17794elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17795 as_echo='printf %s\n'
17796 as_echo_n='printf %s'
17797else
17798 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17799 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17800 as_echo_n='/usr/ucb/echo -n'
17801 else
17802 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17803 as_echo_n_body='eval
17804 arg=$1;
17805 case $arg in #(
17806 *"$as_nl"*)
17807 expr "X$arg" : "X\\(.*\\)$as_nl";
17808 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17809 esac;
17810 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17811 '
17812 export as_echo_n_body
17813 as_echo_n='sh -c $as_echo_n_body as_echo'
17814 fi
17815 export as_echo_body
17816 as_echo='sh -c $as_echo_body as_echo'
17817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017818
17819# The user is always right.
17820if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017821 PATH_SEPARATOR=:
17822 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17823 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17824 PATH_SEPARATOR=';'
17825 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828
17829# IFS
17830# We need space, tab and new line, in precisely that order. Quoting is
17831# there to prevent editors from complaining about space-tab.
17832# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17833# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834IFS=" "" $as_nl"
17835
17836# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017837as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017838case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839 *[\\/]* ) as_myself=$0 ;;
17840 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017841for as_dir in $PATH
17842do
17843 IFS=$as_save_IFS
17844 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017845 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17846 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849 ;;
17850esac
17851# We did not find ourselves, most probably we were run as `sh COMMAND'
17852# in which case we are not to be found in the path.
17853if test "x$as_myself" = x; then
17854 as_myself=$0
17855fi
17856if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017857 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17858 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859fi
17860
Matthias Kloseb9621712010-04-24 17:59:49 +000017861# Unset variables that we do not need and which cause bugs (e.g. in
17862# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17863# suppresses any "Segmentation fault" message there. '((' could
17864# trigger a bug in pdksh 5.2.14.
17865for as_var in BASH_ENV ENV MAIL MAILPATH
17866do eval test x\${$as_var+set} = xset \
17867 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868done
17869PS1='$ '
17870PS2='> '
17871PS4='+ '
17872
17873# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017874LC_ALL=C
17875export LC_ALL
17876LANGUAGE=C
17877export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017878
Matthias Kloseb9621712010-04-24 17:59:49 +000017879# CDPATH.
17880(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17881
17882
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017883# as_fn_error STATUS ERROR [LINENO LOG_FD]
17884# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017885# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17886# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017887# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017888as_fn_error ()
17889{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017890 as_status=$1; test $as_status -eq 0 && as_status=1
17891 if test "$4"; then
17892 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17893 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017894 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017895 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017896 as_fn_exit $as_status
17897} # as_fn_error
17898
17899
17900# as_fn_set_status STATUS
17901# -----------------------
17902# Set $? to STATUS, without forking.
17903as_fn_set_status ()
17904{
17905 return $1
17906} # as_fn_set_status
17907
17908# as_fn_exit STATUS
17909# -----------------
17910# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17911as_fn_exit ()
17912{
17913 set +e
17914 as_fn_set_status $1
17915 exit $1
17916} # as_fn_exit
17917
17918# as_fn_unset VAR
17919# ---------------
17920# Portably unset VAR.
17921as_fn_unset ()
17922{
17923 { eval $1=; unset $1;}
17924}
17925as_unset=as_fn_unset
17926# as_fn_append VAR VALUE
17927# ----------------------
17928# Append the text in VALUE to the end of the definition contained in VAR. Take
17929# advantage of any shell optimizations that allow amortized linear growth over
17930# repeated appends, instead of the typical quadratic growth present in naive
17931# implementations.
17932if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17933 eval 'as_fn_append ()
17934 {
17935 eval $1+=\$2
17936 }'
17937else
17938 as_fn_append ()
17939 {
17940 eval $1=\$$1\$2
17941 }
17942fi # as_fn_append
17943
17944# as_fn_arith ARG...
17945# ------------------
17946# Perform arithmetic evaluation on the ARGs, and store the result in the
17947# global $as_val. Take advantage of shells that can avoid forks. The arguments
17948# must be portable across $(()) and expr.
17949if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17950 eval 'as_fn_arith ()
17951 {
17952 as_val=$(( $* ))
17953 }'
17954else
17955 as_fn_arith ()
17956 {
17957 as_val=`expr "$@" || test $? -eq 1`
17958 }
17959fi # as_fn_arith
17960
17961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017962if expr a : '\(a\)' >/dev/null 2>&1 &&
17963 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17964 as_expr=expr
17965else
17966 as_expr=false
17967fi
17968
17969if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17970 as_basename=basename
17971else
17972 as_basename=false
17973fi
17974
Matthias Kloseb9621712010-04-24 17:59:49 +000017975if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17976 as_dirname=dirname
17977else
17978 as_dirname=false
17979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981as_me=`$as_basename -- "$0" ||
17982$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17983 X"$0" : 'X\(//\)$' \| \
17984 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017985$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986 sed '/^.*\/\([^/][^/]*\)\/*$/{
17987 s//\1/
17988 q
17989 }
17990 /^X\/\(\/\/\)$/{
17991 s//\1/
17992 q
17993 }
17994 /^X\/\(\/\).*/{
17995 s//\1/
17996 q
17997 }
17998 s/.*/./; q'`
17999
Matthias Kloseb9621712010-04-24 17:59:49 +000018000# Avoid depending upon Character Ranges.
18001as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18002as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18003as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18004as_cr_digits='0123456789'
18005as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006
18007ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018008case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018010 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018011 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018012 xy) ECHO_C='\c';;
18013 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18014 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015 esac;;
18016*)
18017 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018019
Martin v. Löwis11437992002-04-12 09:54:03 +000018020rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021if test -d conf$$.dir; then
18022 rm -f conf$$.dir/conf$$.file
18023else
18024 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018025 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018027if (echo >conf$$.file) 2>/dev/null; then
18028 if ln -s conf$$.file conf$$ 2>/dev/null; then
18029 as_ln_s='ln -s'
18030 # ... but there are two gotchas:
18031 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18032 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018033 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018034 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018035 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018036 elif ln conf$$.file conf$$ 2>/dev/null; then
18037 as_ln_s=ln
18038 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018039 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018040 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018041else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018042 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18045rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018046
Matthias Kloseb9621712010-04-24 17:59:49 +000018047
18048# as_fn_mkdir_p
18049# -------------
18050# Create "$as_dir" as a directory, including parents if necessary.
18051as_fn_mkdir_p ()
18052{
18053
18054 case $as_dir in #(
18055 -*) as_dir=./$as_dir;;
18056 esac
18057 test -d "$as_dir" || eval $as_mkdir_p || {
18058 as_dirs=
18059 while :; do
18060 case $as_dir in #(
18061 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18062 *) as_qdir=$as_dir;;
18063 esac
18064 as_dirs="'$as_qdir' $as_dirs"
18065 as_dir=`$as_dirname -- "$as_dir" ||
18066$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18067 X"$as_dir" : 'X\(//\)[^/]' \| \
18068 X"$as_dir" : 'X\(//\)$' \| \
18069 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18070$as_echo X"$as_dir" |
18071 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18072 s//\1/
18073 q
18074 }
18075 /^X\(\/\/\)[^/].*/{
18076 s//\1/
18077 q
18078 }
18079 /^X\(\/\/\)$/{
18080 s//\1/
18081 q
18082 }
18083 /^X\(\/\).*/{
18084 s//\1/
18085 q
18086 }
18087 s/.*/./; q'`
18088 test -d "$as_dir" && break
18089 done
18090 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018091 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018092
18093
18094} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018095if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018096 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018097else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018098 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018099 as_mkdir_p=false
18100fi
18101
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018102
18103# as_fn_executable_p FILE
18104# -----------------------
18105# Test if FILE is an executable regular file.
18106as_fn_executable_p ()
18107{
18108 test -f "$1" && test -x "$1"
18109} # as_fn_executable_p
18110as_test_x='test -x'
18111as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018112
18113# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018114as_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 +000018115
18116# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018117as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018118
18119
Martin v. Löwis11437992002-04-12 09:54:03 +000018120exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018121## ----------------------------------- ##
18122## Main body of $CONFIG_STATUS script. ##
18123## ----------------------------------- ##
18124_ASEOF
18125test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018126
Matthias Kloseb9621712010-04-24 17:59:49 +000018127cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18128# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018129# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130# values after options handling.
18131ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018132This file was extended by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018133generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018134
18135 CONFIG_FILES = $CONFIG_FILES
18136 CONFIG_HEADERS = $CONFIG_HEADERS
18137 CONFIG_LINKS = $CONFIG_LINKS
18138 CONFIG_COMMANDS = $CONFIG_COMMANDS
18139 $ $0 $@
18140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141on `(hostname || uname -n) 2>/dev/null | sed 1q`
18142"
18143
Martin v. Löwis11437992002-04-12 09:54:03 +000018144_ACEOF
18145
Matthias Kloseb9621712010-04-24 17:59:49 +000018146case $ac_config_files in *"
18147"*) set x $ac_config_files; shift; ac_config_files=$*;;
18148esac
18149
18150case $ac_config_headers in *"
18151"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18152esac
18153
18154
18155cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018156# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018157config_files="$ac_config_files"
18158config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018161
Matthias Kloseb9621712010-04-24 17:59:49 +000018162cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018163ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018164\`$as_me' instantiates files and other configuration actions
18165from templates according to the current configuration. Unless the files
18166and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018167
Matthias Kloseb9621712010-04-24 17:59:49 +000018168Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018169
18170 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018172 --config print configuration, then exit
18173 -q, --quiet, --silent
18174 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018175 -d, --debug don't remove temporary files
18176 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018177 --file=FILE[:TEMPLATE]
18178 instantiate the configuration file FILE
18179 --header=FILE[:TEMPLATE]
18180 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018181
18182Configuration files:
18183$config_files
18184
18185Configuration headers:
18186$config_headers
18187
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018188Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018191cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18192ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018193ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018194python config.status 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018195configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018196 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018197
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018198Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018199This config.status script is free software; the Free Software Foundation
18200gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201
18202ac_pwd='$ac_pwd'
18203srcdir='$srcdir'
18204INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018205MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018206test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018207_ACEOF
18208
Matthias Kloseb9621712010-04-24 17:59:49 +000018209cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18210# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018211ac_need_defaults=:
18212while test $# != 0
18213do
18214 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018215 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018216 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18217 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018218 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018219 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018220 --*=)
18221 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18222 ac_optarg=
18223 ac_shift=:
18224 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018225 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018226 ac_option=$1
18227 ac_optarg=$2
18228 ac_shift=shift
18229 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018230 esac
18231
Skip Montanaro6dead952003-09-25 14:50:04 +000018232 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018233 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018234 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18235 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018236 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018237 $as_echo "$ac_cs_version"; exit ;;
18238 --config | --confi | --conf | --con | --co | --c )
18239 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018240 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018241 debug=: ;;
18242 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018243 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018244 case $ac_optarg in
18245 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018246 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018247 esac
18248 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018249 ac_need_defaults=false;;
18250 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018251 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018252 case $ac_optarg in
18253 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18254 esac
18255 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018256 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018257 --he | --h)
18258 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018259 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018260Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018262 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018263 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18264 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18265 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018266
18267 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018268 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018269Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018270
Matthias Kloseb9621712010-04-24 17:59:49 +000018271 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018272 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018273
18274 esac
18275 shift
18276done
18277
Skip Montanaro6dead952003-09-25 14:50:04 +000018278ac_configure_extra_args=
18279
18280if $ac_cs_silent; then
18281 exec 6>/dev/null
18282 ac_configure_extra_args="$ac_configure_extra_args --silent"
18283fi
18284
18285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018287if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018288 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018289 shift
18290 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18291 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018292 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018293 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018294fi
18295
Martin v. Löwis11437992002-04-12 09:54:03 +000018296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018297cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018298exec 5>>config.log
18299{
18300 echo
18301 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18302## Running $as_me. ##
18303_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018304 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018308cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018310
Matthias Kloseb9621712010-04-24 17:59:49 +000018311cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018312
18313# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018314for ac_config_target in $ac_config_targets
18315do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018316 case $ac_config_target in
18317 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18318 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18319 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018320 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18321 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018323 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018324 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018325 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018326 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018327
Victor Stinnere0be4232011-10-25 13:06:09 +020018328 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018329 esac
18330done
18331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018332
Martin v. Löwis11437992002-04-12 09:54:03 +000018333# If the user did not use the arguments to specify the items to instantiate,
18334# then the envvar interface is used. Set only those that are not.
18335# We use the long form for the default assignment because of an extremely
18336# bizarre bug on SunOS 4.1.3.
18337if $ac_need_defaults; then
18338 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18339 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18340fi
18341
Skip Montanaro6dead952003-09-25 14:50:04 +000018342# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018343# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018344# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345# Hook for its removal unless debugging.
18346# Note that there is a small window in which the directory will not be cleaned:
18347# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018348$debug ||
18349{
Victor Stinnere0be4232011-10-25 13:06:09 +020018350 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018351 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018352 : "${ac_tmp:=$tmp}"
18353 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018355 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018356}
Martin v. Löwis11437992002-04-12 09:54:03 +000018357# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018358
Martin v. Löwis11437992002-04-12 09:54:03 +000018359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018360 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018361 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018362} ||
18363{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018364 tmp=./conf$$-$RANDOM
18365 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018366} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018367ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018368
Matthias Kloseb9621712010-04-24 17:59:49 +000018369# Set up the scripts for CONFIG_FILES section.
18370# No need to generate them if there are no CONFIG_FILES.
18371# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018372if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018373
Matthias Kloseb9621712010-04-24 17:59:49 +000018374
18375ac_cr=`echo X | tr X '\015'`
18376# On cygwin, bash can eat \r inside `` if the user requested igncr.
18377# But we know of no other shell where ac_cr would be empty at this
18378# point, so we can use a bashism as a fallback.
18379if test "x$ac_cr" = x; then
18380 eval ac_cr=\$\'\\r\'
18381fi
18382ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18383if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018384 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018385else
18386 ac_cs_awk_cr=$ac_cr
18387fi
18388
Victor Stinnere0be4232011-10-25 13:06:09 +020018389echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018390_ACEOF
18391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392
Matthias Kloseb9621712010-04-24 17:59:49 +000018393{
18394 echo "cat >conf$$subs.awk <<_ACEOF" &&
18395 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18396 echo "_ACEOF"
18397} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018398 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18399ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400ac_delim='%!_!# '
18401for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018402 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018403 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404
Matthias Kloseb9621712010-04-24 17:59:49 +000018405 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18406 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018407 break
18408 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018409 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018410 else
18411 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413done
Matthias Kloseb9621712010-04-24 17:59:49 +000018414rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018415
Matthias Kloseb9621712010-04-24 17:59:49 +000018416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018417cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018419sed -n '
18420h
18421s/^/S["/; s/!.*/"]=/
18422p
18423g
18424s/^[^!]*!//
18425:repl
18426t repl
18427s/'"$ac_delim"'$//
18428t delim
18429:nl
18430h
18431s/\(.\{148\}\)..*/\1/
18432t more1
18433s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18434p
18435n
18436b repl
18437:more1
18438s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18439p
18440g
18441s/.\{148\}//
18442t nl
18443:delim
18444h
18445s/\(.\{148\}\)..*/\1/
18446t more2
18447s/["\\]/\\&/g; s/^/"/; s/$/"/
18448p
18449b
18450:more2
18451s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18452p
18453g
18454s/.\{148\}//
18455t delim
18456' <conf$$subs.awk | sed '
18457/^[^""]/{
18458 N
18459 s/\n//
18460}
18461' >>$CONFIG_STATUS || ac_write_fail=1
18462rm -f conf$$subs.awk
18463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18464_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018465cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018466 for (key in S) S_is_set[key] = 1
18467 FS = ""
18468
18469}
18470{
18471 line = $ 0
18472 nfields = split(line, field, "@")
18473 substed = 0
18474 len = length(field[1])
18475 for (i = 2; i < nfields; i++) {
18476 key = field[i]
18477 keylen = length(key)
18478 if (S_is_set[key]) {
18479 value = S[key]
18480 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18481 len += length(value) + length(field[++i])
18482 substed = 1
18483 } else
18484 len += 1 + keylen
18485 }
18486
18487 print line
18488}
18489
18490_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18493if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18494 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18495else
18496 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018497fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018498 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018499_ACEOF
18500
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018501# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18502# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503# trailing colons and then remove the whole line if VPATH becomes empty
18504# (actually we leave an empty line to preserve line numbers).
18505if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018506 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18507h
18508s///
18509s/^/:/
18510s/[ ]*$/:/
18511s/:\$(srcdir):/:/g
18512s/:\${srcdir}:/:/g
18513s/:@srcdir@:/:/g
18514s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018516x
18517s/\(=[ ]*\).*/\1/
18518G
18519s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018520s/^[^=]*=[ ]*$//
18521}'
18522fi
18523
Matthias Kloseb9621712010-04-24 17:59:49 +000018524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018525fi # test -n "$CONFIG_FILES"
18526
Matthias Kloseb9621712010-04-24 17:59:49 +000018527# Set up the scripts for CONFIG_HEADERS section.
18528# No need to generate them if there are no CONFIG_HEADERS.
18529# This happens for instance with `./config.status Makefile'.
18530if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018531cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018532BEGIN {
18533_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018534
Matthias Kloseb9621712010-04-24 17:59:49 +000018535# Transform confdefs.h into an awk script `defines.awk', embedded as
18536# here-document in config.status, that substitutes the proper values into
18537# config.h.in to produce config.h.
18538
18539# Create a delimiter string that does not exist in confdefs.h, to ease
18540# handling of long lines.
18541ac_delim='%!_!# '
18542for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018543 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18544 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018545 break
18546 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018547 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018548 else
18549 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18550 fi
18551done
18552
18553# For the awk script, D is an array of macro values keyed by name,
18554# likewise P contains macro parameters if any. Preserve backslash
18555# newline sequences.
18556
18557ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18558sed -n '
18559s/.\{148\}/&'"$ac_delim"'/g
18560t rset
18561:rset
18562s/^[ ]*#[ ]*define[ ][ ]*/ /
18563t def
18564d
18565:def
18566s/\\$//
18567t bsnl
18568s/["\\]/\\&/g
18569s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18570D["\1"]=" \3"/p
18571s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18572d
18573:bsnl
18574s/["\\]/\\&/g
18575s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18576D["\1"]=" \3\\\\\\n"\\/p
18577t cont
18578s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18579t cont
18580d
18581:cont
18582n
18583s/.\{148\}/&'"$ac_delim"'/g
18584t clear
18585:clear
18586s/\\$//
18587t bsnlc
18588s/["\\]/\\&/g; s/^/"/; s/$/"/p
18589d
18590:bsnlc
18591s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18592b cont
18593' <confdefs.h | sed '
18594s/'"$ac_delim"'/"\\\
18595"/g' >>$CONFIG_STATUS || ac_write_fail=1
18596
18597cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18598 for (key in D) D_is_set[key] = 1
18599 FS = ""
18600}
18601/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18602 line = \$ 0
18603 split(line, arg, " ")
18604 if (arg[1] == "#") {
18605 defundef = arg[2]
18606 mac1 = arg[3]
18607 } else {
18608 defundef = substr(arg[1], 2)
18609 mac1 = arg[2]
18610 }
18611 split(mac1, mac2, "(") #)
18612 macro = mac2[1]
18613 prefix = substr(line, 1, index(line, defundef) - 1)
18614 if (D_is_set[macro]) {
18615 # Preserve the white space surrounding the "#".
18616 print prefix "define", macro P[macro] D[macro]
18617 next
18618 } else {
18619 # Replace #undef with comments. This is necessary, for example,
18620 # in the case of _POSIX_SOURCE, which is predefined and required
18621 # on some systems where configure will not decide to define it.
18622 if (defundef == "undef") {
18623 print "/*", prefix defundef, macro, "*/"
18624 next
18625 }
18626 }
18627}
18628{ print }
18629_ACAWK
18630_ACEOF
18631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018632 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018633fi # test -n "$CONFIG_HEADERS"
18634
18635
18636eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18637shift
18638for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018639do
18640 case $ac_tag in
18641 :[FHLC]) ac_mode=$ac_tag; continue;;
18642 esac
18643 case $ac_mode$ac_tag in
18644 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018645 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018646 :[FH]-) ac_tag=-:-;;
18647 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18648 esac
18649 ac_save_IFS=$IFS
18650 IFS=:
18651 set x $ac_tag
18652 IFS=$ac_save_IFS
18653 shift
18654 ac_file=$1
18655 shift
18656
18657 case $ac_mode in
18658 :L) ac_source=$1;;
18659 :[FH])
18660 ac_file_inputs=
18661 for ac_f
18662 do
18663 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018664 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018665 *) # Look for the file first in the build tree, then in the source tree
18666 # (if the path is not absolute). The absolute path cannot be DOS-style,
18667 # because $ac_f cannot contain `:'.
18668 test -f "$ac_f" ||
18669 case $ac_f in
18670 [\\/$]*) false;;
18671 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18672 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018673 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018674 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018675 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18676 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018677 done
18678
18679 # Let's still pretend it is `configure' which instantiates (i.e., don't
18680 # use $as_me), people would be surprised to read:
18681 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018682 configure_input='Generated from '`
18683 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18684 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018685 if test x"$ac_file" != x-; then
18686 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018687 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18688$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018689 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018690 # Neutralize special characters interpreted by sed in replacement strings.
18691 case $configure_input in #(
18692 *\&* | *\|* | *\\* )
18693 ac_sed_conf_input=`$as_echo "$configure_input" |
18694 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18695 *) ac_sed_conf_input=$configure_input;;
18696 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018697
18698 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018699 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18700 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018701 esac
18702 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018703 esac
18704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018705 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018706$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018707 X"$ac_file" : 'X\(//\)[^/]' \| \
18708 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018709 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018710$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018711 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18712 s//\1/
18713 q
18714 }
18715 /^X\(\/\/\)[^/].*/{
18716 s//\1/
18717 q
18718 }
18719 /^X\(\/\/\)$/{
18720 s//\1/
18721 q
18722 }
18723 /^X\(\/\).*/{
18724 s//\1/
18725 q
18726 }
18727 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018728 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018729 ac_builddir=.
18730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018731case "$ac_dir" in
18732.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18733*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018734 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018735 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018736 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018737 case $ac_top_builddir_sub in
18738 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18739 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18740 esac ;;
18741esac
18742ac_abs_top_builddir=$ac_pwd
18743ac_abs_builddir=$ac_pwd$ac_dir_suffix
18744# for backward compatibility:
18745ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018746
18747case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018748 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018749 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018750 ac_top_srcdir=$ac_top_builddir_sub
18751 ac_abs_top_srcdir=$ac_pwd ;;
18752 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018753 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018754 ac_top_srcdir=$srcdir
18755 ac_abs_top_srcdir=$srcdir ;;
18756 *) # Relative name.
18757 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18758 ac_top_srcdir=$ac_top_build_prefix$srcdir
18759 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018760esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018761ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018762
Martin v. Löwis11437992002-04-12 09:54:03 +000018763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018764 case $ac_mode in
18765 :F)
18766 #
18767 # CONFIG_FILE
18768 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018769
18770 case $INSTALL in
18771 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018772 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018773 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018774 ac_MKDIR_P=$MKDIR_P
18775 case $MKDIR_P in
18776 [\\/$]* | ?:[\\/]* ) ;;
18777 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18778 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018779_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018780
Matthias Kloseb9621712010-04-24 17:59:49 +000018781cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018782# If the template does not know about datarootdir, expand it.
18783# FIXME: This hack should be removed a few years after 2.60.
18784ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018785ac_sed_dataroot='
18786/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018787 p
18788 q
18789}
18790/@datadir@/p
18791/@docdir@/p
18792/@infodir@/p
18793/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018794/@mandir@/p'
18795case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018796*datarootdir*) ac_datarootdir_seen=yes;;
18797*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18799$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018801cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018802 ac_datarootdir_hack='
18803 s&@datadir@&$datadir&g
18804 s&@docdir@&$docdir&g
18805 s&@infodir@&$infodir&g
18806 s&@localedir@&$localedir&g
18807 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018808 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018809esac
18810_ACEOF
18811
18812# Neutralize VPATH when `$srcdir' = `.'.
18813# Shell code in configure.ac might set extrasub.
18814# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018815cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18816ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018817$extrasub
18818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018819cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018820:t
18821/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018822s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018823s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018824s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018825s&@srcdir@&$ac_srcdir&;t t
18826s&@abs_srcdir@&$ac_abs_srcdir&;t t
18827s&@top_srcdir@&$ac_top_srcdir&;t t
18828s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18829s&@builddir@&$ac_builddir&;t t
18830s&@abs_builddir@&$ac_abs_builddir&;t t
18831s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18832s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018833s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018834$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018835"
Victor Stinnere0be4232011-10-25 13:06:09 +020018836eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18837 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018839test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018840 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18841 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18842 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018844which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018845$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018846which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018847
Victor Stinnere0be4232011-10-25 13:06:09 +020018848 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018849 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018850 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18851 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018852 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018853 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018854 ;;
18855 :H)
18856 #
18857 # CONFIG_HEADER
18858 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018859 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018860 {
18861 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018862 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18863 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018864 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018865 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018866 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18867$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018868 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018869 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018870 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018871 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018872 fi
18873 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018874 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018875 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018876 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018877 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018878 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018880
18881 esac
18882
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018883
18884 case $ac_file$ac_mode in
18885 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18886
18887 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018888done # for ac_tag
18889
Guido van Rossum627b2d71993-12-24 10:39:16 +000018890
Matthias Kloseb9621712010-04-24 17:59:49 +000018891as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018892_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018893ac_clean_files=$ac_clean_files_save
18894
Matthias Kloseb9621712010-04-24 17:59:49 +000018895test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018896 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018897
Martin v. Löwis11437992002-04-12 09:54:03 +000018898
18899# configure is writing to config.log, and then calls config.status.
18900# config.status does its own redirection, appending to config.log.
18901# Unfortunately, on DOS this fails, as config.log is still kept open
18902# by configure, so config.status won't be able to write to it; its
18903# output is simply discarded. So we exec the FD to /dev/null,
18904# effectively closing config.log, so it can be properly (re)opened and
18905# appended to by config.status. When coming back to configure, we
18906# need to make the FD available again.
18907if test "$no_create" != yes; then
18908 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018909 ac_config_status_args=
18910 test "$silent" = yes &&
18911 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018912 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018913 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018914 exec 5>>config.log
18915 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18916 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018917 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018918fi
18919if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18921$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018922fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018923
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018924
Christian Heimes75ed8902013-11-20 01:11:18 +010018925echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018926if test ! -f Modules/Setup.local
18927then
18928 echo "# Edit this file for local setup changes" >Modules/Setup.local
18929fi
18930
Christian Heimes75ed8902013-11-20 01:11:18 +010018931echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018932$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018933 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018934 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018935mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018936
18937if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18938 echo "" >&6
18939 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018940 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 +000018941 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018942 echo "" >&6
18943 echo "" >&6
18944fi
18945