blob: 5691c27cf66febd4a72ec41362c70b62587cc942 [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
pxinwr277ce302020-12-30 20:50:39 +0800626TEST_MODULES
Christian Heimesff5be6e2018-01-20 13:19:21 +0100627OPENSSL_LDFLAGS
628OPENSSL_LIBS
629OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800630ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000631SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000632THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100633LIBPL
634PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100635PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200636BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200637LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700638EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200639ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000640SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000641LIBC
642LIBM
643HAVE_GETHOSTBYNAME
644HAVE_GETHOSTBYNAME_R
645HAVE_GETHOSTBYNAME_R_3_ARG
646HAVE_GETHOSTBYNAME_R_5_ARG
647HAVE_GETHOSTBYNAME_R_6_ARG
648LIBOBJS
649TRUE
650MACHDEP_OBJS
651DYNLOADFILE
652DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700653DTRACE_OBJS
654DTRACE_HEADERS
655DFLAGS
656DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700657TCLTK_LIBS
658TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000659LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800660PKG_CONFIG_LIBDIR
661PKG_CONFIG_PATH
662PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400663TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000664SHLIBS
665CFLAGSFORSHARED
666LINKFORSHARED
667CCSHARED
668BLDSHARED
669LDCXXSHARED
670LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700671SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000672LIBTOOL_CRUFT
673OTHER_LIBTOOL_OPT
674UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100675LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700676CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000677BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200678CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000679OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700681LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700682LLVM_PROF_ERR
683LLVM_PROF_FILE
684LLVM_PROF_MERGER
685PGO_PROF_USE_FLAG
686PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200687LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200688LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700689PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700690DEF_MAKE_RULE
691DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000693LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100694MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000695INSTALL_DATA
696INSTALL_SCRIPT
697INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200698ac_ct_READELF
699READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000700ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200701ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000703GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200704EXPORTSFROM
705EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000706LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000707LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000708RUNSHARED
709INSTSONAME
710LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000711PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000712BLDLIBRARY
713DLLLIBRARY
714LDLIBRARY
715LIBRARY
716BUILDEXEEXT
717EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200718NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200719MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720PLATFORM_TRIPLET
721MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200722ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000723MAINCC
724CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700725SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200726GREP
727CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000728OBJEXT
729EXEEXT
730ac_ct_CC
731CPPFLAGS
732LDFLAGS
733CFLAGS
734CC
735EXPORT_MACOSX_DEPLOYMENT_TARGET
736CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200737_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000738MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000739FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000740FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800741FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000742FRAMEWORKALTINSTALLLAST
743FRAMEWORKALTINSTALLFIRST
744FRAMEWORKINSTALLLAST
745FRAMEWORKINSTALLFIRST
746PYTHONFRAMEWORKINSTALLDIR
747PYTHONFRAMEWORKPREFIX
748PYTHONFRAMEWORKDIR
749PYTHONFRAMEWORKIDENTIFIER
750PYTHONFRAMEWORK
751LIPO_32BIT_FLAGS
752ARCH_RUN_32BIT
753UNIVERSALSDK
754CONFIG_ARGS
755SOVERSION
756VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200757PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200758PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100759host_os
760host_vendor
761host_cpu
762host
763build_os
764build_vendor
765build_cpu
766build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500767HAS_GIT
768GITBRANCH
769GITTAG
770GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400771BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000772target_alias
773host_alias
774build_alias
775LIBS
776ECHO_T
777ECHO_N
778ECHO_C
779DEFS
780mandir
781localedir
782libdir
783psdir
784pdfdir
785dvidir
786htmldir
787infodir
788docdir
789oldincludedir
790includedir
791localstatedir
792sharedstatedir
793sysconfdir
794datadir
795datarootdir
796libexecdir
797sbindir
798bindir
799program_transform_name
800prefix
801exec_prefix
802PACKAGE_URL
803PACKAGE_BUGREPORT
804PACKAGE_STRING
805PACKAGE_VERSION
806PACKAGE_TARNAME
807PACKAGE_NAME
808PATH_SEPARATOR
809SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000810ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000811ac_user_opts='
812enable_option_checking
813enable_universalsdk
814with_universal_archs
815with_framework_name
816enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_cxx_main
818with_suffix
819enable_shared
820enable_profiling
821with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200822with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200823with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000824enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700825with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100826with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400827with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100828with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800829with_memory_sanitizer
830with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_libs
832with_system_expat
833with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100834with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100835with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000836enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700837with_tcltk_includes
838with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000840enable_ipv6
841with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000843with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700845with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000846with_libm
847with_libc
848enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100849with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000850with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800851with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100852with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100853with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200854with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200855with_experimental_isolated_subinterpreters
pxinwr277ce302020-12-30 20:50:39 +0800856enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000857'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 ac_precious_vars='build_alias
859host_alias
860target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100861MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862CC
863CFLAGS
864LDFLAGS
865LIBS
866CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800867CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700868PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800869PKG_CONFIG
870PKG_CONFIG_PATH
871PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872
Guido van Rossum627b2d71993-12-24 10:39:16 +0000873
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000875ac_init_help=
876ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000877ac_unrecognized_opts=
878ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879# The variables have the same names as the options, with
880# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000881cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884no_recursion=
885prefix=NONE
886program_prefix=NONE
887program_suffix=NONE
888program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893x_includes=NONE
894x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000895
896# Installation directory options.
897# These are left unexpanded so users can "make install exec_prefix=/foo"
898# and all the variables that are supposed to be based on exec_prefix
899# by default will actually change.
900# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902bindir='${exec_prefix}/bin'
903sbindir='${exec_prefix}/sbin'
904libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905datarootdir='${prefix}/share'
906datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907sysconfdir='${prefix}/etc'
908sharedstatedir='${prefix}/com'
909localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910includedir='${prefix}/include'
911oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
913infodir='${datarootdir}/info'
914htmldir='${docdir}'
915dvidir='${docdir}'
916pdfdir='${docdir}'
917psdir='${docdir}'
918libdir='${exec_prefix}/lib'
919localedir='${datarootdir}/locale'
920mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000925do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926 # If the previous option needs an argument, assign it.
927 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 ac_prev=
930 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000931 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200934 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
935 *=) ac_optarg= ;;
936 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Accept the important Cygnus configure options, so we can diagnose typos.
940
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 case $ac_dashdash$ac_option in
942 --)
943 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 -bindir | --bindir | --bindi | --bind | --bin | --bi)
946 ac_prev=bindir ;;
947 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
950 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 -cache-file | --cache-file | --cache-fil | --cache-fi \
956 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
957 ac_prev=cache_file ;;
958 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
959 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 cache_file=$ac_optarg ;;
961
962 --config-cache | -C)
963 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
971 | --dataroo | --dataro | --datar)
972 ac_prev=datarootdir ;;
973 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
974 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
975 datarootdir=$ac_optarg ;;
976
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000978 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000979 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000980 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200981 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000982 ac_useropt_orig=$ac_useropt
983 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
984 case $ac_user_opts in
985 *"
986"enable_$ac_useropt"
987"*) ;;
988 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
989 ac_unrecognized_sep=', ';;
990 esac
991 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000992
993 -docdir | --docdir | --docdi | --doc | --do)
994 ac_prev=docdir ;;
995 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
996 docdir=$ac_optarg ;;
997
998 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
999 ac_prev=dvidir ;;
1000 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1001 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
1003 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001004 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001006 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001007 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001008 ac_useropt_orig=$ac_useropt
1009 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1010 case $ac_user_opts in
1011 *"
1012"enable_$ac_useropt"
1013"*) ;;
1014 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1015 ac_unrecognized_sep=', ';;
1016 esac
1017 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1020 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1021 | --exec | --exe | --ex)
1022 ac_prev=exec_prefix ;;
1023 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1024 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1025 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001029 # Obsolete; use --with-gas.
1030 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 -help | --help | --hel | --he | -h)
1033 ac_init_help=long ;;
1034 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1035 ac_init_help=recursive ;;
1036 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1037 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
1039 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001044 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1045 ac_prev=htmldir ;;
1046 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1047 | --ht=*)
1048 htmldir=$ac_optarg ;;
1049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -includedir | --includedir | --includedi | --included | --include \
1051 | --includ | --inclu | --incl | --inc)
1052 ac_prev=includedir ;;
1053 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1054 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -infodir | --infodir | --infodi | --infod | --info | --inf)
1058 ac_prev=infodir ;;
1059 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
1062 -libdir | --libdir | --libdi | --libd)
1063 ac_prev=libdir ;;
1064 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
1067 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1068 | --libexe | --libex | --libe)
1069 ac_prev=libexecdir ;;
1070 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1071 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 -localedir | --localedir | --localedi | --localed | --locale)
1075 ac_prev=localedir ;;
1076 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1077 localedir=$ac_optarg ;;
1078
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001080 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 ac_prev=localstatedir ;;
1082 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001083 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085
1086 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1087 ac_prev=mandir ;;
1088 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092 # Obsolete; use --without-fp.
1093 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 no_create=yes ;;
1098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001099 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1100 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1101 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1104 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1105 | --oldin | --oldi | --old | --ol | --o)
1106 ac_prev=oldincludedir ;;
1107 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1108 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1109 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1113 ac_prev=prefix ;;
1114 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1118 | --program-pre | --program-pr | --program-p)
1119 ac_prev=program_prefix ;;
1120 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1121 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
1124 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1125 | --program-suf | --program-su | --program-s)
1126 ac_prev=program_suffix ;;
1127 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1128 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
1131 -program-transform-name | --program-transform-name \
1132 | --program-transform-nam | --program-transform-na \
1133 | --program-transform-n | --program-transform- \
1134 | --program-transform | --program-transfor \
1135 | --program-transfo | --program-transf \
1136 | --program-trans | --program-tran \
1137 | --progr-tra | --program-tr | --program-t)
1138 ac_prev=program_transform_name ;;
1139 -program-transform-name=* | --program-transform-name=* \
1140 | --program-transform-nam=* | --program-transform-na=* \
1141 | --program-transform-n=* | --program-transform-=* \
1142 | --program-transform=* | --program-transfor=* \
1143 | --program-transfo=* | --program-transf=* \
1144 | --program-trans=* | --program-tran=* \
1145 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001148 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1149 ac_prev=pdfdir ;;
1150 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1151 pdfdir=$ac_optarg ;;
1152
1153 -psdir | --psdir | --psdi | --psd | --ps)
1154 ac_prev=psdir ;;
1155 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1156 psdir=$ac_optarg ;;
1157
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1159 | -silent | --silent | --silen | --sile | --sil)
1160 silent=yes ;;
1161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1163 ac_prev=sbindir ;;
1164 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1165 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
1168 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1169 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1170 | --sharedst | --shareds | --shared | --share | --shar \
1171 | --sha | --sh)
1172 ac_prev=sharedstatedir ;;
1173 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1174 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1175 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1176 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001179 -site | --site | --sit)
1180 ac_prev=site ;;
1181 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1185 ac_prev=srcdir ;;
1186 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1190 | --syscon | --sysco | --sysc | --sys | --sy)
1191 ac_prev=sysconfdir ;;
1192 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1193 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001195
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1202 verbose=yes ;;
1203
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 -version | --version | --versio | --versi | --vers | -V)
1205 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001211 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt_orig=$ac_useropt
1213 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214 case $ac_user_opts in
1215 *"
1216"with_$ac_useropt"
1217"*) ;;
1218 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1219 ac_unrecognized_sep=', ';;
1220 esac
1221 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
1223 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001227 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 ac_useropt_orig=$ac_useropt
1229 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1230 case $ac_user_opts in
1231 *"
1232"with_$ac_useropt"
1233"*) ;;
1234 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1235 ac_unrecognized_sep=', ';;
1236 esac
1237 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239 --x)
1240 # Obsolete; use --with-x.
1241 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1244 | --x-incl | --x-inc | --x-in | --x-i)
1245 ac_prev=x_includes ;;
1246 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1247 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
1250 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1251 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1252 ac_prev=x_libraries ;;
1253 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1254 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1258Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ;;
1260
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 *=*)
1262 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1263 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 case $ac_envvar in #(
1265 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 export $ac_envvar ;;
1270
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001271 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001276 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 ;;
1278
1279 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280done
1281
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285fi
1286
Matthias Kloseb9621712010-04-24 17:59:49 +00001287if test -n "$ac_unrecognized_opts"; then
1288 case $enable_option_checking in
1289 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1292 esac
1293fi
1294
1295# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1297 datadir sysconfdir sharedstatedir localstatedir includedir \
1298 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001299 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001302 # Remove trailing slashes.
1303 case $ac_val in
1304 */ )
1305 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1306 eval $ac_var=\$ac_val;;
1307 esac
1308 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001309 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 [\\/$]* | ?:[\\/]* ) continue;;
1311 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001313 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001314done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# There might be people who depend on the old broken behavior: `$host'
1317# used to hold the argument of --host etc.
1318# FIXME: To remove some day.
1319build=$build_alias
1320host=$host_alias
1321target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Martin v. Löwis11437992002-04-12 09:54:03 +00001323# FIXME: To remove some day.
1324if test "x$host_alias" != x; then
1325 if test "x$build_alias" = x; then
1326 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001327 elif test "x$build_alias" != "x$host_alias"; then
1328 cross_compiling=yes
1329 fi
1330fi
1331
1332ac_tool_prefix=
1333test -n "$host_alias" && ac_tool_prefix=$host_alias-
1334
1335test "$silent" = yes && exec 6>/dev/null
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338ac_pwd=`pwd` && test -n "$ac_pwd" &&
1339ac_ls_di=`ls -di .` &&
1340ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344
1345
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346# Find the source files, if location was not specified.
1347if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001348 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 ac_confdir=`$as_dirname -- "$as_myself" ||
1351$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1352 X"$as_myself" : 'X\(//\)[^/]' \| \
1353 X"$as_myself" : 'X\(//\)$' \| \
1354 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1355$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\/\)[^/].*/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\/\)$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\).*/{
1369 s//\1/
1370 q
1371 }
1372 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001373 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375 srcdir=..
1376 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377else
1378 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380if test ! -r "$srcdir/$ac_unique_file"; then
1381 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001382 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1385ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001386 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387 pwd)`
1388# When building in place, set srcdir=.
1389if test "$ac_abs_confdir" = "$ac_pwd"; then
1390 srcdir=.
1391fi
1392# Remove unnecessary trailing slashes from srcdir.
1393# Double slashes in file names in object file debugging info
1394# mess up M-x gdb in Emacs.
1395case $srcdir in
1396*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1397esac
1398for ac_var in $ac_precious_vars; do
1399 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_env_${ac_var}_value=\$${ac_var}
1401 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1402 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1403done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001404
Martin v. Löwis11437992002-04-12 09:54:03 +00001405#
1406# Report the --help message.
1407#
1408if test "$ac_init_help" = "long"; then
1409 # Omit some internal or obsolete options to make the list less imposing.
1410 # This message is too long to be a string in the A/UX 3.1 sh.
1411 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001412\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413
1414Usage: $0 [OPTION]... [VAR=VALUE]...
1415
1416To assign environment variables (e.g., CC, CFLAGS...), specify them as
1417VAR=VALUE. See below for descriptions of some of the useful variables.
1418
1419Defaults for the options are specified in brackets.
1420
1421Configuration:
1422 -h, --help display this help and exit
1423 --help=short display options specific to this package
1424 --help=recursive display the short help of all the included packages
1425 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001426 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --cache-file=FILE cache test results in FILE [disabled]
1428 -C, --config-cache alias for \`--cache-file=config.cache'
1429 -n, --no-create do not create output files
1430 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432Installation directories:
1433 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438By default, \`make install' will install all the files in
1439\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1440an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1441for instance \`--prefix=\$HOME'.
1442
1443For better control, use the options below.
1444
1445Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --bindir=DIR user executables [EPREFIX/bin]
1447 --sbindir=DIR system admin executables [EPREFIX/sbin]
1448 --libexecdir=DIR program executables [EPREFIX/libexec]
1449 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1450 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1451 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1452 --libdir=DIR object code libraries [EPREFIX/lib]
1453 --includedir=DIR C header files [PREFIX/include]
1454 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1455 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1456 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1457 --infodir=DIR info documentation [DATAROOTDIR/info]
1458 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1459 --mandir=DIR man documentation [DATAROOTDIR/man]
1460 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1461 --htmldir=DIR html documentation [DOCDIR]
1462 --dvidir=DIR dvi documentation [DOCDIR]
1463 --pdfdir=DIR pdf documentation [DOCDIR]
1464 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466
1467 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001468
1469System types:
1470 --build=BUILD configure for building on BUILD [guessed]
1471 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001477 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001486 create a universal binary build. SDKDIR specifies
1487 which macOS SDK should be used to perform the build,
1488 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001490 create a Python.framework rather than a traditional
1491 Unix install. optional INSTALLDIR specifies the
1492 installation path. see Mac/README.rst (default is
1493 no)
1494 --enable-shared enable building a shared Python library (default is
1495 no)
1496 --enable-profiling enable C-level code profiling with gprof (default is
1497 no)
1498 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1499 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001500 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001501 support loadable extensions in _sqlite module, see
1502 Doc/library/sqlite3.rst (default is no)
1503 --enable-ipv6 enable ipv6 (with ipv4) support, see
1504 Doc/library/socket.rst (default is yes if supported)
1505 --enable-big-digits[=15|30]
1506 use big digits (30 or 15 bits) for Python longs
1507 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001508 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
1510Optional Packages:
1511 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1512 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001513 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001514 specify the kind of universal binary that should be
1515 created. this option is only valid when
1516 --enable-universalsdk is set; options are:
Ronald Oussoren41761932020-11-08 10:05:27 +01001517 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1518 "intel-32", "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001519 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001520 specify the name for the python framework on macOS
1521 only valid when --enable-framework is set. see
1522 Mac/README.rst (default is 'Python')
1523 --with-cxx-main[=COMPILER]
1524 compile main() and link Python executable with C++
1525 compiler specified in COMPILER (default is $CXX)
1526 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1527 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001528 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001529 (default is no)
1530 --with-assertions build with C assertions enabled (default is no)
1531 --with-lto enable Link-Time-Optimization in any build (default
1532 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001533 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001534 select hash algorithm for use in Python/pyhash.c
1535 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001536 --with-tzpath=<list of absolute paths separated by pathsep>
1537 Select the default time zone search path for zoneinfo.TZPATH
1538
Charles-François Natalid30b0222014-05-08 23:08:51 +01001539 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001540 enable AddressSanitizer memory error detector,
1541 'asan' (default is no)
1542 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1543 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001544 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001545 enable UndefinedBehaviorSanitizer undefined
1546 behaviour detector, 'ubsan' (default is no)
1547 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001548 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001549 library, see Doc/library/pyexpat.rst (default is no)
1550 --with-system-ffi build _ctypes module using an installed ffi library,
1551 see Doc/library/ctypes.rst (default is
1552 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001553 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001554 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001555 --with-decimal-contextvar
1556 build _decimal module using a coroutine-local rather
1557 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001558 --with-tcltk-includes='-I...'
1559 override search for Tcl and Tk include files
1560 --with-tcltk-libs='-L...'
1561 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001562 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001563 override order to check db backends for dbm; a valid
1564 value is a colon separated string with the backend
1565 names `ndbm', `gdbm' and `bdb'.
1566 --with-doc-strings enable documentation strings (default is yes)
1567 --with-pymalloc enable specialized mallocs (default is yes)
1568 --with-c-locale-coercion
1569 enable C locale coercion to a UTF-8 based locale
1570 (default is yes)
1571 --with-valgrind enable Valgrind support (default is no)
1572 --with-dtrace enable DTrace support (default is no)
1573 --with-libm=STRING override libm math library to STRING (default is
1574 system-dependent)
1575 --with-libc=STRING override libc C library to STRING (default is
1576 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001577 --with-platlibdir=DIRNAME
1578 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001579 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001580 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001581 --with-ensurepip[=install|upgrade|no]
1582 "install" or "upgrade" using bundled pip (default is
1583 upgrade)
1584 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001585 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001586 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001587 Python's preferred selection (default), openssl:
1588 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001589 custom string, PROTOCOL_SSLv2 ignores the setting,
1590 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001591 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1592 builtin hash modules, md5, sha1, sha256, sha512,
1593 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001594 --with-experimental-isolated-subinterpreters
1595 better isolate subinterpreters, experimental build
1596 mode (default is no)
Martin v. Löwis11437992002-04-12 09:54:03 +00001597
1598Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001599 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 CC C compiler command
1601 CFLAGS C compiler flags
1602 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1603 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001605 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001608 PROFILE_TASK
1609 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001610 PKG_CONFIG path to pkg-config utility
1611 PKG_CONFIG_PATH
1612 directories to add to pkg-config's search path
1613 PKG_CONFIG_LIBDIR
1614 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001615
1616Use these variables to override the choices made by `configure' or to help
1617it to find libraries and programs with nonstandard names/locations.
1618
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001619Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001620_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001622fi
1623
1624if test "$ac_init_help" = "recursive"; then
1625 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001626 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001627 test -d "$ac_dir" ||
1628 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1629 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001630 ac_builddir=.
1631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632case "$ac_dir" in
1633.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1634*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001635 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001637 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638 case $ac_top_builddir_sub in
1639 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1640 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1641 esac ;;
1642esac
1643ac_abs_top_builddir=$ac_pwd
1644ac_abs_builddir=$ac_pwd$ac_dir_suffix
1645# for backward compatibility:
1646ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001647
1648case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 ac_top_srcdir=$ac_top_builddir_sub
1652 ac_abs_top_srcdir=$ac_pwd ;;
1653 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655 ac_top_srcdir=$srcdir
1656 ac_abs_top_srcdir=$srcdir ;;
1657 *) # Relative name.
1658 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1659 ac_top_srcdir=$ac_top_build_prefix$srcdir
1660 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001661esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001662ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001664 cd "$ac_dir" || { ac_status=$?; continue; }
1665 # Check for guested configure.
1666 if test -f "$ac_srcdir/configure.gnu"; then
1667 echo &&
1668 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1669 elif test -f "$ac_srcdir/configure"; then
1670 echo &&
1671 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001672 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001674 fi || ac_status=$?
1675 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001676 done
1677fi
1678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001679test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001680if $ac_init_version; then
1681 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001682python configure 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001683generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001684
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001685Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001686This configure script is free software; the Free Software Foundation
1687gives unlimited permission to copy, distribute and modify it.
1688_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001689 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001691
1692## ------------------------ ##
1693## Autoconf initialization. ##
1694## ------------------------ ##
1695
1696# ac_fn_c_try_compile LINENO
1697# --------------------------
1698# Try to compile conftest.$ac_ext, and return whether this succeeded.
1699ac_fn_c_try_compile ()
1700{
1701 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1702 rm -f conftest.$ac_objext
1703 if { { ac_try="$ac_compile"
1704case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_compile") 2>conftest.err
1711 ac_status=$?
1712 if test -s conftest.err; then
1713 grep -v '^ *+' conftest.err >conftest.er1
1714 cat conftest.er1 >&5
1715 mv -f conftest.er1 conftest.err
1716 fi
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; } && {
1719 test -z "$ac_c_werror_flag" ||
1720 test ! -s conftest.err
1721 } && test -s conftest.$ac_objext; then :
1722 ac_retval=0
1723else
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=1
1728fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001729 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_compile
1733
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001734# ac_fn_c_try_cpp LINENO
1735# ----------------------
1736# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1737ac_fn_c_try_cpp ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 if { { ac_try="$ac_cpp conftest.$ac_ext"
1741case "(($ac_try" in
1742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1743 *) ac_try_echo=$ac_try;;
1744esac
1745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1746$as_echo "$ac_try_echo"; } >&5
1747 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1748 ac_status=$?
1749 if test -s conftest.err; then
1750 grep -v '^ *+' conftest.err >conftest.er1
1751 cat conftest.er1 >&5
1752 mv -f conftest.er1 conftest.err
1753 fi
1754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755 test $ac_status = 0; } > conftest.i && {
1756 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1757 test ! -s conftest.err
1758 }; then :
1759 ac_retval=0
1760else
1761 $as_echo "$as_me: failed program was:" >&5
1762sed 's/^/| /' conftest.$ac_ext >&5
1763
1764 ac_retval=1
1765fi
1766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1767 as_fn_set_status $ac_retval
1768
1769} # ac_fn_c_try_cpp
1770
Matthias Kloseb9621712010-04-24 17:59:49 +00001771# ac_fn_c_try_link LINENO
1772# -----------------------
1773# Try to link conftest.$ac_ext, and return whether this succeeded.
1774ac_fn_c_try_link ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1777 rm -f conftest.$ac_objext conftest$ac_exeext
1778 if { { ac_try="$ac_link"
1779case "(($ac_try" in
1780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1781 *) ac_try_echo=$ac_try;;
1782esac
1783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1784$as_echo "$ac_try_echo"; } >&5
1785 (eval "$ac_link") 2>conftest.err
1786 ac_status=$?
1787 if test -s conftest.err; then
1788 grep -v '^ *+' conftest.err >conftest.er1
1789 cat conftest.er1 >&5
1790 mv -f conftest.er1 conftest.err
1791 fi
1792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793 test $ac_status = 0; } && {
1794 test -z "$ac_c_werror_flag" ||
1795 test ! -s conftest.err
1796 } && test -s conftest$ac_exeext && {
1797 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001798 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001799 }; then :
1800 ac_retval=0
1801else
1802 $as_echo "$as_me: failed program was:" >&5
1803sed 's/^/| /' conftest.$ac_ext >&5
1804
1805 ac_retval=1
1806fi
1807 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1808 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1809 # interfere with the next link command; also delete a directory that is
1810 # left behind by Apple's compiler. We do this before executing the actions.
1811 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001812 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001813 as_fn_set_status $ac_retval
1814
1815} # ac_fn_c_try_link
1816
Matthias Kloseb9621712010-04-24 17:59:49 +00001817# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1818# -------------------------------------------------------
1819# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1820# the include files in INCLUDES and setting the cache variable VAR
1821# accordingly.
1822ac_fn_c_check_header_mongrel ()
1823{
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001825 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001828if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001829 $as_echo_n "(cached) " >&6
1830fi
1831eval ac_res=\$$3
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1833$as_echo "$ac_res" >&6; }
1834else
1835 # Is the header compilable?
1836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1837$as_echo_n "checking $2 usability... " >&6; }
1838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840$4
1841#include <$2>
1842_ACEOF
1843if ac_fn_c_try_compile "$LINENO"; then :
1844 ac_header_compiler=yes
1845else
1846 ac_header_compiler=no
1847fi
1848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1850$as_echo "$ac_header_compiler" >&6; }
1851
1852# Is the header present?
1853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1854$as_echo_n "checking $2 presence... " >&6; }
1855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857#include <$2>
1858_ACEOF
1859if ac_fn_c_try_cpp "$LINENO"; then :
1860 ac_header_preproc=yes
1861else
1862 ac_header_preproc=no
1863fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001864rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1866$as_echo "$ac_header_preproc" >&6; }
1867
1868# So? What about this header?
1869case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1870 yes:no: )
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1872$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1874$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1875 ;;
1876 no:yes:* )
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1878$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1880$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1882$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1883 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1884$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1886$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001887( $as_echo "## --------------------------------------- ##
1888## Report this to https://bugs.python.org/ ##
1889## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 ) | sed "s/^/$as_me: WARNING: /" >&2
1891 ;;
1892esac
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001896 $as_echo_n "(cached) " >&6
1897else
1898 eval "$3=\$ac_header_compiler"
1899fi
1900eval ac_res=\$$3
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1902$as_echo "$ac_res" >&6; }
1903fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001904 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001905
1906} # ac_fn_c_check_header_mongrel
1907
1908# ac_fn_c_try_run LINENO
1909# ----------------------
1910# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1911# that executables *can* be run.
1912ac_fn_c_try_run ()
1913{
1914 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1915 if { { ac_try="$ac_link"
1916case "(($ac_try" in
1917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1918 *) ac_try_echo=$ac_try;;
1919esac
1920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1921$as_echo "$ac_try_echo"; } >&5
1922 (eval "$ac_link") 2>&5
1923 ac_status=$?
1924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1925 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1926 { { case "(($ac_try" in
1927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1928 *) ac_try_echo=$ac_try;;
1929esac
1930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1931$as_echo "$ac_try_echo"; } >&5
1932 (eval "$ac_try") 2>&5
1933 ac_status=$?
1934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1935 test $ac_status = 0; }; }; then :
1936 ac_retval=0
1937else
1938 $as_echo "$as_me: program exited with status $ac_status" >&5
1939 $as_echo "$as_me: failed program was:" >&5
1940sed 's/^/| /' conftest.$ac_ext >&5
1941
1942 ac_retval=$ac_status
1943fi
1944 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001945 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001946 as_fn_set_status $ac_retval
1947
1948} # ac_fn_c_try_run
1949
1950# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1951# -------------------------------------------------------
1952# Tests whether HEADER exists and can be compiled using the include files in
1953# INCLUDES, setting the cache variable VAR accordingly.
1954ac_fn_c_check_header_compile ()
1955{
1956 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1958$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001959if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001960 $as_echo_n "(cached) " >&6
1961else
1962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1963/* end confdefs.h. */
1964$4
1965#include <$2>
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968 eval "$3=yes"
1969else
1970 eval "$3=no"
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973fi
1974eval ac_res=\$$3
1975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1976$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001977 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001978
1979} # ac_fn_c_check_header_compile
1980
Matthias Kloseb9621712010-04-24 17:59:49 +00001981# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1982# -------------------------------------------
1983# Tests whether TYPE exists after having included INCLUDES, setting cache
1984# variable VAR accordingly.
1985ac_fn_c_check_type ()
1986{
1987 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1989$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001990if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001991 $as_echo_n "(cached) " >&6
1992else
1993 eval "$3=no"
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997int
1998main ()
1999{
2000if (sizeof ($2))
2001 return 0;
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$4
2010int
2011main ()
2012{
2013if (sizeof (($2)))
2014 return 0;
2015 ;
2016 return 0;
2017}
2018_ACEOF
2019if ac_fn_c_try_compile "$LINENO"; then :
2020
2021else
2022 eval "$3=yes"
2023fi
2024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2025fi
2026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2027fi
2028eval ac_res=\$$3
2029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2030$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002031 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002032
2033} # ac_fn_c_check_type
2034
Matthias Kloseb9621712010-04-24 17:59:49 +00002035# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2036# --------------------------------------------
2037# Tries to find the compile-time value of EXPR in a program that includes
2038# INCLUDES, setting VAR accordingly. Returns whether the value could be
2039# computed
2040ac_fn_c_compute_int ()
2041{
2042 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2043 if test "$cross_compiling" = yes; then
2044 # Depending upon the size, compute the lo and hi bounds.
2045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002052test_array [0] = 0;
2053return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_lo=0 ac_mid=0
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002069test_array [0] = 0;
2070return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002071
2072 ;
2073 return 0;
2074}
2075_ACEOF
2076if ac_fn_c_try_compile "$LINENO"; then :
2077 ac_hi=$ac_mid; break
2078else
2079 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2080 if test $ac_lo -le $ac_mid; then
2081 ac_lo= ac_hi=
2082 break
2083 fi
2084 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087 done
2088else
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002096test_array [0] = 0;
2097return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=-1 ac_mid=-1
2105 while :; do
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002113test_array [0] = 0;
2114return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002115
2116 ;
2117 return 0;
2118}
2119_ACEOF
2120if ac_fn_c_try_compile "$LINENO"; then :
2121 ac_lo=$ac_mid; break
2122else
2123 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2124 if test $ac_mid -le $ac_hi; then
2125 ac_lo= ac_hi=
2126 break
2127 fi
2128 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2129fi
2130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2131 done
2132else
2133 ac_lo= ac_hi=
2134fi
2135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2136fi
2137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2138# Binary search between lo and hi bounds.
2139while test "x$ac_lo" != "x$ac_hi"; do
2140 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h. */
2143$4
2144int
2145main ()
2146{
2147static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002148test_array [0] = 0;
2149return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_compile "$LINENO"; then :
2156 ac_hi=$ac_mid
2157else
2158 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161done
2162case $ac_lo in #((
2163?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2164'') ac_retval=1 ;;
2165esac
2166 else
2167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h. */
2169$4
2170static long int longval () { return $2; }
2171static unsigned long int ulongval () { return $2; }
2172#include <stdio.h>
2173#include <stdlib.h>
2174int
2175main ()
2176{
2177
2178 FILE *f = fopen ("conftest.val", "w");
2179 if (! f)
2180 return 1;
2181 if (($2) < 0)
2182 {
2183 long int i = longval ();
2184 if (i != ($2))
2185 return 1;
2186 fprintf (f, "%ld", i);
2187 }
2188 else
2189 {
2190 unsigned long int i = ulongval ();
2191 if (i != ($2))
2192 return 1;
2193 fprintf (f, "%lu", i);
2194 }
2195 /* Do not output a trailing newline, as this causes \r\n confusion
2196 on some platforms. */
2197 return ferror (f) || fclose (f) != 0;
2198
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_run "$LINENO"; then :
2204 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2205else
2206 ac_retval=1
2207fi
2208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2209 conftest.$ac_objext conftest.beam conftest.$ac_ext
2210rm -f conftest.val
2211
2212 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002213 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002214 as_fn_set_status $ac_retval
2215
2216} # ac_fn_c_compute_int
2217
2218# ac_fn_c_check_func LINENO FUNC VAR
2219# ----------------------------------
2220# Tests whether FUNC exists, setting the cache variable VAR accordingly
2221ac_fn_c_check_func ()
2222{
2223 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2225$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002226if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002227 $as_echo_n "(cached) " >&6
2228else
2229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230/* end confdefs.h. */
2231/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2232 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2233#define $2 innocuous_$2
2234
2235/* System header to define __stub macros and hopefully few prototypes,
2236 which can conflict with char $2 (); below.
2237 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2238 <limits.h> exists even on freestanding compilers. */
2239
2240#ifdef __STDC__
2241# include <limits.h>
2242#else
2243# include <assert.h>
2244#endif
2245
2246#undef $2
2247
2248/* Override any GCC internal prototype to avoid an error.
2249 Use char because int might match the return type of a GCC
2250 builtin and then its argument prototype would still apply. */
2251#ifdef __cplusplus
2252extern "C"
2253#endif
2254char $2 ();
2255/* The GNU C library defines this for functions which it implements
2256 to always fail with ENOSYS. Some functions are actually named
2257 something starting with __ and the normal name is an alias. */
2258#if defined __stub_$2 || defined __stub___$2
2259choke me
2260#endif
2261
2262int
2263main ()
2264{
2265return $2 ();
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_link "$LINENO"; then :
2271 eval "$3=yes"
2272else
2273 eval "$3=no"
2274fi
2275rm -f core conftest.err conftest.$ac_objext \
2276 conftest$ac_exeext conftest.$ac_ext
2277fi
2278eval ac_res=\$$3
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2280$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002281 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002282
2283} # ac_fn_c_check_func
2284
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002285# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2286# ---------------------------------------------
2287# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2288# accordingly.
2289ac_fn_c_check_decl ()
2290{
2291 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2292 as_decl_name=`echo $2|sed 's/ *(.*//'`
2293 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2295$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2296if eval \${$3+:} false; then :
2297 $as_echo_n "(cached) " >&6
2298else
2299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h. */
2301$4
2302int
2303main ()
2304{
2305#ifndef $as_decl_name
2306#ifdef __cplusplus
2307 (void) $as_decl_use;
2308#else
2309 (void) $as_decl_name;
2310#endif
2311#endif
2312
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_compile "$LINENO"; then :
2318 eval "$3=yes"
2319else
2320 eval "$3=no"
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324eval ac_res=\$$3
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2326$as_echo "$ac_res" >&6; }
2327 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2328
2329} # ac_fn_c_check_decl
2330
Matthias Kloseb9621712010-04-24 17:59:49 +00002331# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2332# ----------------------------------------------------
2333# Tries to find if the field MEMBER exists in type AGGR, after including
2334# INCLUDES, setting cache variable VAR accordingly.
2335ac_fn_c_check_member ()
2336{
2337 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2339$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002340if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002341 $as_echo_n "(cached) " >&6
2342else
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h. */
2345$5
2346int
2347main ()
2348{
2349static $2 ac_aggr;
2350if (ac_aggr.$3)
2351return 0;
2352 ;
2353 return 0;
2354}
2355_ACEOF
2356if ac_fn_c_try_compile "$LINENO"; then :
2357 eval "$4=yes"
2358else
2359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h. */
2361$5
2362int
2363main ()
2364{
2365static $2 ac_aggr;
2366if (sizeof ac_aggr.$3)
2367return 0;
2368 ;
2369 return 0;
2370}
2371_ACEOF
2372if ac_fn_c_try_compile "$LINENO"; then :
2373 eval "$4=yes"
2374else
2375 eval "$4=no"
2376fi
2377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2378fi
2379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2380fi
2381eval ac_res=\$$4
2382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2383$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002384 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002385
2386} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002387cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002388This file contains any messages produced by compilers while
2389running configure, to aid debugging if configure makes a mistake.
2390
Pablo Galindod4fe0982020-05-19 03:33:01 +01002391It was created by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002392generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394 $ $0 $@
2395
2396_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002398{
2399cat <<_ASUNAME
2400## --------- ##
2401## Platform. ##
2402## --------- ##
2403
2404hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2405uname -m = `(uname -m) 2>/dev/null || echo unknown`
2406uname -r = `(uname -r) 2>/dev/null || echo unknown`
2407uname -s = `(uname -s) 2>/dev/null || echo unknown`
2408uname -v = `(uname -v) 2>/dev/null || echo unknown`
2409
2410/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2411/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2412
2413/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2414/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2415/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002416/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002417/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2418/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2419/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2420
2421_ASUNAME
2422
2423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2424for as_dir in $PATH
2425do
2426 IFS=$as_save_IFS
2427 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 $as_echo "PATH: $as_dir"
2429 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002431
2432} >&5
2433
2434cat >&5 <<_ACEOF
2435
2436
2437## ----------- ##
2438## Core tests. ##
2439## ----------- ##
2440
2441_ACEOF
2442
2443
2444# Keep a trace of the command line.
2445# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002446# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002447# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002448# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002449ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002450ac_configure_args0=
2451ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002452ac_must_keep_next=false
2453for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002454do
Skip Montanaro6dead952003-09-25 14:50:04 +00002455 for ac_arg
2456 do
2457 case $ac_arg in
2458 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2459 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2460 | -silent | --silent | --silen | --sile | --sil)
2461 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 esac
2465 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002467 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002468 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002470 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002471 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002472 case $ac_arg in
2473 *=* | --config-cache | -C | -disable-* | --disable-* \
2474 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2475 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2476 | -with-* | --with-* | -without-* | --without-* | --x)
2477 case "$ac_configure_args0 " in
2478 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2479 esac
2480 ;;
2481 -* ) ac_must_keep_next=true ;;
2482 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002484 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 ;;
2486 esac
2487 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002488done
Matthias Kloseb9621712010-04-24 17:59:49 +00002489{ ac_configure_args0=; unset ac_configure_args0;}
2490{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002491
2492# When interrupted or exit'd, cleanup temporary files, and complete
2493# config.log. We remove comments because anyway the quotes in there
2494# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495# WARNING: Use '\'' to represent an apostrophe within the trap.
2496# 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 +00002497trap 'exit_status=$?
2498 # Save into config.log some information that might help in debugging.
2499 {
2500 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002501
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002503## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002505 echo
2506 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507(
2508 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2509 eval ac_val=\$$ac_var
2510 case $ac_val in #(
2511 *${as_nl}*)
2512 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2514$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
2516 case $ac_var in #(
2517 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2519 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 esac ;;
2521 esac
2522 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2525 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 "s/'\''/'\''\\\\'\'''\''/g;
2528 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2529 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002530 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002532 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 esac |
2534 sort
2535)
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002537
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002538 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002539## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002540## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 echo
2542 for ac_var in $ac_subst_vars
2543 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 eval ac_val=\$$ac_var
2545 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002549 done | sort
2550 echo
2551
2552 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002553 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002555## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002556 echo
2557 for ac_var in $ac_subst_files
2558 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 eval ac_val=\$$ac_var
2560 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002563 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002564 done | sort
2565 echo
2566 fi
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002569 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002570## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002571## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 echo
2575 fi
2576 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 $as_echo "$as_me: caught signal $ac_signal"
2578 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 rm -f core *.core core.conftest.* &&
2581 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002584for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002586done
2587ac_signal=0
2588
2589# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002591
Matthias Kloseb9621712010-04-24 17:59:49 +00002592$as_echo "/* confdefs.h */" > confdefs.h
2593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594# Predefined preprocessor variables.
2595
2596cat >>confdefs.h <<_ACEOF
2597#define PACKAGE_NAME "$PACKAGE_NAME"
2598_ACEOF
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600cat >>confdefs.h <<_ACEOF
2601#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2602_ACEOF
2603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604cat >>confdefs.h <<_ACEOF
2605#define PACKAGE_VERSION "$PACKAGE_VERSION"
2606_ACEOF
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608cat >>confdefs.h <<_ACEOF
2609#define PACKAGE_STRING "$PACKAGE_STRING"
2610_ACEOF
2611
Martin v. Löwis11437992002-04-12 09:54:03 +00002612cat >>confdefs.h <<_ACEOF
2613#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2614_ACEOF
2615
Matthias Kloseb9621712010-04-24 17:59:49 +00002616cat >>confdefs.h <<_ACEOF
2617#define PACKAGE_URL "$PACKAGE_URL"
2618_ACEOF
2619
Martin v. Löwis11437992002-04-12 09:54:03 +00002620
2621# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002622# Prefer an explicitly selected file to automatically selected ones.
2623ac_site_file1=NONE
2624ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002626 # We do not want a PATH search for config.site.
2627 case $CONFIG_SITE in #((
2628 -*) ac_site_file1=./$CONFIG_SITE;;
2629 */*) ac_site_file1=$CONFIG_SITE;;
2630 *) ac_site_file1=./$CONFIG_SITE;;
2631 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 ac_site_file1=$prefix/share/config.site
2634 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635else
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 ac_site_file1=$ac_default_prefix/share/config.site
2637 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002639for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640do
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 test "x$ac_site_file" = xNONE && continue
2642 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2644$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002646 . "$ac_site_file" \
2647 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2649as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002650See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002651 fi
2652done
2653
2654if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 # Some versions of bash will fail to source /dev/null (special files
2656 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2657 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2659$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2662 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 esac
2664 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665else
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2667$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 >$cache_file
2669fi
2670
2671# Check that the precious variables saved in the cache have kept the same
2672# value.
2673ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2676 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002677 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2678 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 case $ac_old_set,$ac_new_set in
2680 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2682$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 +00002683 ac_cache_corrupted=: ;;
2684 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2686$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 ac_cache_corrupted=: ;;
2688 ,);;
2689 *)
2690 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002691 # differences in whitespace do not lead to failure.
2692 ac_old_val_w=`echo x $ac_old_val`
2693 ac_new_val_w=`echo x $ac_new_val`
2694 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2696$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2697 ac_cache_corrupted=:
2698 else
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2700$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2701 eval $ac_var=\$ac_old_val
2702 fi
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2704$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2706$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 fi;;
2708 esac
2709 # Pass precious variables to config.status.
2710 if test "$ac_new_set" = set; then
2711 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 *) ac_arg=$ac_var=$ac_new_val ;;
2714 esac
2715 case " $ac_configure_args " in
2716 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 esac
2719 fi
2720done
2721if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2725$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002726 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002728## -------------------- ##
2729## Main body of script. ##
2730## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731
Guido van Rossum7f43da71994-08-01 12:15:30 +00002732ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002733ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002734ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2735ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2736ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737
Guido van Rossum627b2d71993-12-24 10:39:16 +00002738
Michael W. Hudson54241132001-12-07 15:38:26 +00002739
Trent Nelson4d4ec652012-10-16 08:51:24 -04002740
Christian Heimesff5be6e2018-01-20 13:19:21 +01002741
2742
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002743if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002744 # If we're building out-of-tree, we need to make sure the following
2745 # resources get picked up before their $srcdir counterparts.
2746 # Objects/ -> typeslots.inc
Lysandros Nikolaou314858e2020-06-20 21:07:25 +03002747 # Include/ -> Python-ast.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002748 # Python/ -> importlib.h
2749 # (A side effect of this is that these resources will automatically be
2750 # regenerated when building out-of-tree, regardless of whether or not
2751 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2752 # off.)
2753 BASECPPFLAGS="-IObjects -IInclude -IPython"
2754else
2755 BASECPPFLAGS=""
2756fi
2757
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758
2759
2760
2761
Victor Stinner9ed34a82017-05-02 22:35:58 +02002762if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764# Extract the first word of "git", so it can be a program name with args.
2765set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2767$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769 $as_echo_n "(cached) " >&6
2770else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002771 if test -n "$HAS_GIT"; then
2772 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773else
2774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2775for as_dir in $PATH
2776do
2777 IFS=$as_save_IFS
2778 test -z "$as_dir" && as_dir=.
2779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002781 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2783 break 2
2784 fi
2785done
2786 done
2787IFS=$as_save_IFS
2788
Ned Deily5c4b0d02017-03-04 00:19:55 -05002789 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002790fi
2791fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002792HAS_GIT=$ac_cv_prog_HAS_GIT
2793if test -n "$HAS_GIT"; then
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2795$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002796else
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2798$as_echo "no" >&6; }
2799fi
2800
2801
2802else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002803HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002805if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002806then
Xiang Zhang4c855572018-08-20 22:36:19 +08002807 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2808 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2809 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002810else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002811 GITVERSION=""
2812 GITTAG=""
2813 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002814fi
2815
2816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002817ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002818
2819
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002820ac_aux_dir=
2821for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2822 if test -f "$ac_dir/install-sh"; then
2823 ac_aux_dir=$ac_dir
2824 ac_install_sh="$ac_aux_dir/install-sh -c"
2825 break
2826 elif test -f "$ac_dir/install.sh"; then
2827 ac_aux_dir=$ac_dir
2828 ac_install_sh="$ac_aux_dir/install.sh -c"
2829 break
2830 elif test -f "$ac_dir/shtool"; then
2831 ac_aux_dir=$ac_dir
2832 ac_install_sh="$ac_aux_dir/shtool install -c"
2833 break
2834 fi
2835done
2836if test -z "$ac_aux_dir"; then
2837 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2838fi
2839
2840# These three variables are undocumented and unsupported,
2841# and are intended to be withdrawn in a future Autoconf release.
2842# They can cause serious problems if a builder's source tree is in a directory
2843# whose full name contains unusual characters.
2844ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2845ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2846ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2847
2848
2849# Make sure we can run config.sub.
2850$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2851 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2852
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2854$as_echo_n "checking build system type... " >&6; }
2855if ${ac_cv_build+:} false; then :
2856 $as_echo_n "(cached) " >&6
2857else
2858 ac_build_alias=$build_alias
2859test "x$ac_build_alias" = x &&
2860 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2861test "x$ac_build_alias" = x &&
2862 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2863ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2864 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2865
2866fi
2867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2868$as_echo "$ac_cv_build" >&6; }
2869case $ac_cv_build in
2870*-*-*) ;;
2871*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2872esac
2873build=$ac_cv_build
2874ac_save_IFS=$IFS; IFS='-'
2875set x $ac_cv_build
2876shift
2877build_cpu=$1
2878build_vendor=$2
2879shift; shift
2880# Remember, the first character of IFS is used to create $*,
2881# except with old shells:
2882build_os=$*
2883IFS=$ac_save_IFS
2884case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2885
2886
2887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2888$as_echo_n "checking host system type... " >&6; }
2889if ${ac_cv_host+:} false; then :
2890 $as_echo_n "(cached) " >&6
2891else
2892 if test "x$host_alias" = x; then
2893 ac_cv_host=$ac_cv_build
2894else
2895 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2896 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2897fi
2898
2899fi
2900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2901$as_echo "$ac_cv_host" >&6; }
2902case $ac_cv_host in
2903*-*-*) ;;
2904*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2905esac
2906host=$ac_cv_host
2907ac_save_IFS=$IFS; IFS='-'
2908set x $ac_cv_host
2909shift
2910host_cpu=$1
2911host_vendor=$2
2912shift; shift
2913# Remember, the first character of IFS is used to create $*,
2914# except with old shells:
2915host_os=$*
2916IFS=$ac_save_IFS
2917case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2918
2919
2920
doko@python.orga10e4a92013-01-25 18:45:12 +01002921
2922
Ned Deilyfcbc2462014-08-22 13:32:49 -07002923# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2924rm -f pybuilddir.txt
2925
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926for ac_prog in python$PACKAGE_VERSION python3 python
2927do
2928 # Extract the first word of "$ac_prog", so it can be a program name with args.
2929set dummy $ac_prog; ac_word=$2
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2931$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002932if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002933 $as_echo_n "(cached) " >&6
2934else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002935 if test -n "$PYTHON_FOR_REGEN"; then
2936 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002937else
2938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2939for as_dir in $PATH
2940do
2941 IFS=$as_save_IFS
2942 test -z "$as_dir" && as_dir=.
2943 for ac_exec_ext in '' $ac_executable_extensions; do
2944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002945 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2947 break 2
2948 fi
2949done
2950 done
2951IFS=$as_save_IFS
2952
2953fi
2954fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002955PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2956if test -n "$PYTHON_FOR_REGEN"; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2958$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002959else
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2961$as_echo "no" >&6; }
2962fi
2963
2964
Victor Stinnera5c62a82017-05-03 18:21:48 +02002965 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002966done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002967test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002968
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002969
2970
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002971if test "$cross_compiling" = yes; then
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2973$as_echo_n "checking for python interpreter for cross build... " >&6; }
2974 if test -z "$PYTHON_FOR_BUILD"; then
2975 for interp in python$PACKAGE_VERSION python3 python; do
2976 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002977 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 +02002978 break
2979 fi
2980 interp=
2981 done
2982 if test x$interp = x; then
2983 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2984 fi
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2986$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002987 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 +02002988 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002989elif test "$cross_compiling" = maybe; then
2990 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002991else
2992 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2993fi
2994
2995
Martin v. Löwis11437992002-04-12 09:54:03 +00002996
Benjamin Petersond23f8222009-04-05 19:13:16 +00002997if test "$prefix" != "/"; then
2998 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2999fi
3000
3001
Martin v. Löwis11437992002-04-12 09:54:03 +00003002
3003
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003004# We don't use PACKAGE_ variables, and they cause conflicts
3005# with other autoconf-based packages that include Python.h
3006grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3007rm confdefs.h
3008mv confdefs.h.new confdefs.h
3009
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003010
Pablo Galindod4fe0982020-05-19 03:33:01 +01003011VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003012
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003013# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003014
3015SOVERSION=1.0
3016
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003017# The later defininition of _XOPEN_SOURCE disables certain features
3018# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003021
3022
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003023# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3024# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3025# them.
3026
Matthias Kloseb9621712010-04-24 17:59:49 +00003027$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003028
3029
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003030# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3031# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3032# them.
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003035
3036
Martin v. Löwisd6320502004-08-12 13:45:08 +00003037# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003038# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3039# them.
3040
Matthias Kloseb9621712010-04-24 17:59:49 +00003041$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003042
3043
3044
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003045define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003046
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003047# Arguments passed to configure.
3048
3049CONFIG_ARGS="$ac_configure_args"
3050
Matthias Kloseb9621712010-04-24 17:59:49 +00003051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3052$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003053# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003054if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003055 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056 case $enableval in
3057 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003058 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059 # information
3060 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003061 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3064 if test ! -d "${enableval}"
3065 then
3066 enableval=/
3067 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003069 ;;
3070 esac
3071 case $enableval in
3072 no)
3073 UNIVERSALSDK=
3074 enable_universalsdk=
3075 ;;
3076 *)
3077 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003078 if test ! -d "${UNIVERSALSDK}"
3079 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003080 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003081 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003082 ;;
3083 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003084
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085
Thomas Wouters477c8d52006-05-27 19:21:47 +00003086else
3087
3088 UNIVERSALSDK=
3089 enable_universalsdk=
3090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003093if test -n "${UNIVERSALSDK}"
3094then
Matthias Kloseb9621712010-04-24 17:59:49 +00003095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3096$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003097else
Matthias Kloseb9621712010-04-24 17:59:49 +00003098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3099$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003100fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003102
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003103
Ned Deily87adb6e2013-10-18 21:09:56 -07003104ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003105
Ned Deilycbfb9a52012-06-23 16:02:19 -07003106# For backward compatibility reasons we prefer to select '32-bit' if available,
3107# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003108UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003109if test "`uname -s`" = "Darwin"
3110then
3111 if test -n "${UNIVERSALSDK}"
3112 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003113 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003114 then
3115 UNIVERSAL_ARCHS="intel"
3116 fi
3117 fi
3118fi
3119
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003120
Matthias Kloseb9621712010-04-24 17:59:49 +00003121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3122$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003123
3124# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003125if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003126 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127 UNIVERSAL_ARCHS="$withval"
3128
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003129fi
3130
Ned Deily87adb6e2013-10-18 21:09:56 -07003131if test -n "${UNIVERSALSDK}"
3132then
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3134$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3135else
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3137$as_echo "no" >&6; }
3138fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003139
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003140
3141# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003142if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003143 withval=$with_framework_name;
3144 PYTHONFRAMEWORK=${withval}
3145 PYTHONFRAMEWORKDIR=${withval}.framework
3146 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3147
3148else
3149
3150 PYTHONFRAMEWORK=Python
3151 PYTHONFRAMEWORKDIR=Python.framework
3152 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3153
3154fi
3155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003156# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003157if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003159 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003160 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003161 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003162 esac
3163 case $enableval in
3164 no)
3165 PYTHONFRAMEWORK=
3166 PYTHONFRAMEWORKDIR=no-framework
3167 PYTHONFRAMEWORKPREFIX=
3168 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003169 FRAMEWORKINSTALLFIRST=
3170 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003171 FRAMEWORKALTINSTALLFIRST=
3172 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003173 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003174 if test "x${prefix}" = "xNONE"; then
3175 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3176 else
3177 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3178 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003179 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003180 ;;
3181 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003182 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003183 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003185 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003186 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3187 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003188 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003189 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003190
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003191 if test "x${prefix}" = "xNONE" ; then
3192 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003193
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003194 else
3195 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3196 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003197
3198 case "${enableval}" in
3199 /System*)
3200 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3201 if test "${prefix}" = "NONE" ; then
3202 # See below
3203 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3204 fi
3205 ;;
3206
3207 /Library*)
3208 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3209 ;;
3210
3211 */Library/Frameworks)
3212 MDIR="`dirname "${enableval}"`"
3213 MDIR="`dirname "${MDIR}"`"
3214 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3215
3216 if test "${prefix}" = "NONE"; then
3217 # User hasn't specified the
3218 # --prefix option, but wants to install
3219 # the framework in a non-default location,
3220 # ensure that the compatibility links get
3221 # installed relative to that prefix as well
3222 # instead of in /usr/local.
3223 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3224 fi
3225 ;;
3226
3227 *)
3228 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3229 ;;
3230 esac
3231
Jack Jansen127e56e2001-09-11 14:41:54 +00003232 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003234 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003235 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003236 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003239
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003240 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3241
3242 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3243
Jack Jansene578a632001-08-15 01:27:14 +00003244 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003245
Guido van Rossum563e7081996-09-10 18:20:48 +00003246else
Martin v. Löwis11437992002-04-12 09:54:03 +00003247
Jack Jansene578a632001-08-15 01:27:14 +00003248 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003249 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003250 PYTHONFRAMEWORKPREFIX=
3251 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003252 FRAMEWORKINSTALLFIRST=
3253 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003254 FRAMEWORKALTINSTALLFIRST=
3255 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003256 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003257 if test "x${prefix}" = "xNONE" ; then
3258 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3259 else
3260 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3261 fi
Jack Jansene578a632001-08-15 01:27:14 +00003262 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003263
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265fi
3266
Thomas Wouters477c8d52006-05-27 19:21:47 +00003267
3268
Michael W. Hudson54241132001-12-07 15:38:26 +00003269
3270
3271
3272
Jack Jansene578a632001-08-15 01:27:14 +00003273
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003274
3275
3276
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003277
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003278
Ned Deilyb8f944f2013-11-21 22:42:25 -08003279
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003280
3281cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003282#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003283_ACEOF
3284
3285
Jack Jansene578a632001-08-15 01:27:14 +00003286##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003287## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003288## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003289##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290# Set name for machine-dependent library files
3291
Matthias Kloseb9621712010-04-24 17:59:49 +00003292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3293$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003294if test -z "$MACHDEP"
3295then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 # avoid using uname for cross builds
3297 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003298 # ac_sys_system and ac_sys_release are used for setting
3299 # a lot of different things including 'define_xopen_source'
3300 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003301 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003302 *-*-linux-android*)
3303 ac_sys_system=Linux-android
3304 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003305 *-*-linux*)
3306 ac_sys_system=Linux
3307 ;;
3308 *-*-cygwin*)
3309 ac_sys_system=Cygwin
3310 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003311 *-*-vxworks*)
3312 ac_sys_system=VxWorks
3313 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003314 *)
3315 # for now, limit cross builds to known configurations
3316 MACHDEP="unknown"
3317 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3318 esac
3319 ac_sys_release=
3320 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003321 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003322 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003323 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003324 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003325 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003326 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003327 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003328 fi
3329 ac_md_system=`echo $ac_sys_system |
3330 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3331 ac_md_release=`echo $ac_sys_release |
3332 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3333 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003334
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003335 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003336 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003337 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003338 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003339 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003340 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003341 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003342fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3344$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003345
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003346
3347if test "$cross_compiling" = yes; then
3348 case "$host" in
3349 *-*-linux*)
3350 case "$host_cpu" in
3351 arm*)
3352 _host_cpu=arm
3353 ;;
3354 *)
3355 _host_cpu=$host_cpu
3356 esac
3357 ;;
3358 *-*-cygwin*)
3359 _host_cpu=
3360 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003361 *-*-vxworks*)
3362 _host_cpu=$host_cpu
3363 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003364 *)
3365 # for now, limit cross builds to known configurations
3366 MACHDEP="unknown"
3367 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3368 esac
3369 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3370fi
3371
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003372# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3373# disable features if it is defined, without any means to access these
3374# features as extensions. For these systems, we skip the definition of
3375# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3376# some feature, make sure there is no alternative way to access this
3377# feature. Also, when using wildcards, make sure you have verified the
3378# need for not defining _XOPEN_SOURCE on all systems matching the
3379# wildcard, and that the wildcard does not include future systems
3380# (which may remove their limitations).
3381case $ac_sys_system/$ac_sys_release in
3382 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3383 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003384 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003385 # In addition, Stefan Krah confirms that issue #1244610 exists through
3386 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003387 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003388 define_xopen_source=no
3389 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3390 # also defined. This can be overridden by defining _BSD_SOURCE
3391 # As this has a different meaning on Linux, only define it on OpenBSD
3392
Matthias Kloseb9621712010-04-24 17:59:49 +00003393$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003394
3395 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003396 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003397 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3398 # also defined. This can be overridden by defining _BSD_SOURCE
3399 # As this has a different meaning on Linux, only define it on OpenBSD
3400
Matthias Kloseb9621712010-04-24 17:59:49 +00003401$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003402
3403 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003404 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3405 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3406 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003407 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 +00003408 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003409 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3410 # request to enable features supported by the standard as a request
3411 # to disable features not supported by the standard. The best way
3412 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3413 # entirely and define __EXTENSIONS__ instead.
3414 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003415 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003416 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3417 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003418 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003419 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003420 define_xopen_source=no;;
3421 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003422 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003423 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003424 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003425 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3426 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3427 # identifies itself as Darwin/7.*
3428 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3429 # disables platform specific features beyond repair.
3430 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3431 # has no effect, don't bother defining them
3432 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003433 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003434 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003435 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003436 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3437 # defining NI_NUMERICHOST.
3438 QNX/6.3.2)
3439 define_xopen_source=no
3440 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003441 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3442 # in network headers still using system V types.
3443 VxWorks/*)
3444 define_xopen_source=no
3445 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003446
Ian Nortona9edf442020-02-14 03:09:11 +00003447 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3448 # chroot() and other functions
3449 hp*|HP*)
3450 define_xopen_source=no
3451 ;;
3452
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003453esac
3454
3455if test $define_xopen_source = yes
3456then
Victor Stinner14d098d2011-09-07 22:29:43 +02003457 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003458
Victor Stinner14d098d2011-09-07 22:29:43 +02003459$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003460
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
3462 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3463 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3464 # several APIs are not declared. Since this is also needed in some
3465 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003466
Matthias Kloseb9621712010-04-24 17:59:49 +00003467$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003468
3469
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003470
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003471$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003472
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003473fi
3474
Christian Heimes647cd872013-12-07 23:39:33 +01003475# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3476case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003477 hp*|HP*)
3478 define_stdc_a1=yes;;
3479 *)
3480 define_stdc_a1=no;;
3481esac
3482
3483if test $define_stdc_a1 = yes
3484then
Christian Heimes647cd872013-12-07 23:39:33 +01003485
3486$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3487
Christian Heimesb02bcae2013-12-08 15:21:08 +01003488fi
Christian Heimes647cd872013-12-07 23:39:33 +01003489
Jack Jansen6b08a402004-06-03 12:41:45 +00003490# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3491# it may influence the way we can build extensions, so distutils
3492# needs to check it
3493
Thomas Wouters477c8d52006-05-27 19:21:47 +00003494
Jack Jansen6b08a402004-06-03 12:41:45 +00003495CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003496EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003497
Guido van Rossum627b2d71993-12-24 10:39:16 +00003498# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003499
3500# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3501# for debug/optimization stuff. BASECFLAGS is for flags that are required
3502# just to get things to compile and link. Users are free to override OPT
3503# when running configure or make. The build should not break if they do.
3504# BASECFLAGS should generally not be messed with, however.
3505
Guido van Rossum8b131c51995-03-09 14:10:13 +00003506# If the user switches compilers, we can't believe the cache
3507if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3508then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003509 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003510(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003511fi
3512
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003513# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3514# when the compiler supports them, but we don't always want -O2, and
3515# we set -g later.
3516if test -z "$CFLAGS"; then
3517 CFLAGS=
3518fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003519
3520if test "$ac_sys_system" = "Darwin"
3521then
3522 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003523 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003524 # information
3525 if test -z "${CC}"
3526 then
3527 found_gcc=
3528 found_clang=
3529 as_save_IFS=$IFS; IFS=:
3530 for as_dir in $PATH
3531 do
3532 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003533 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003534 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003535 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003536 fi
3537 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003538 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003539 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003540 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003541 fi
3542 fi
3543 done
3544 IFS=$as_save_IFS
3545
3546 if test -n "$found_gcc" -a -n "$found_clang"
3547 then
3548 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3549 then
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3551$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3552 CC="$found_clang"
3553 CXX="$found_clang++"
3554 fi
3555
3556
3557 elif test -z "$found_gcc" -a -n "$found_clang"
3558 then
3559 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3560$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3561 CC="$found_clang"
3562 CXX="$found_clang++"
3563
3564 elif test -z "$found_gcc" -a -z "$found_clang"
3565 then
3566 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3567 if test -n "${found_clang}"
3568 then
3569 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3570$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3571 CC="${found_clang}"
3572 CXX="`/usr/bin/xcrun -find clang++`"
3573
3574 # else: use default behaviour
3575 fi
3576 fi
3577 fi
3578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003579ac_ext=c
3580ac_cpp='$CPP $CPPFLAGS'
3581ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3582ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3583ac_compiler_gnu=$ac_cv_c_compiler_gnu
3584if test -n "$ac_tool_prefix"; then
3585 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3586set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3588$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003589if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003591else
3592 if test -n "$CC"; then
3593 ac_cv_prog_CC="$CC" # Let the user override the test.
3594else
Martin v. Löwis11437992002-04-12 09:54:03 +00003595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3596for as_dir in $PATH
3597do
3598 IFS=$as_save_IFS
3599 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 $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 +00003604 break 2
3605 fi
3606done
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003609
Jack Jansendd19cf82001-12-06 22:36:17 +00003610fi
3611fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003612CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003613if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3615$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003616else
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3618$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003619fi
3620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622fi
3623if test -z "$ac_cv_prog_CC"; then
3624 ac_ct_CC=$CC
3625 # Extract the first word of "gcc", so it can be a program name with args.
3626set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3628$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003629if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003631else
3632 if test -n "$ac_ct_CC"; then
3633 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3634else
3635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636for as_dir in $PATH
3637do
3638 IFS=$as_save_IFS
3639 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $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 +00003644 break 2
3645 fi
3646done
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003649
3650fi
3651fi
3652ac_ct_CC=$ac_cv_prog_ac_ct_CC
3653if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3655$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003656else
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3658$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659fi
3660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 if test "x$ac_ct_CC" = x; then
3662 CC=""
3663 else
3664 case $cross_compiling:$ac_tool_warned in
3665yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003666{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668ac_tool_warned=yes ;;
3669esac
3670 CC=$ac_ct_CC
3671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003672else
3673 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003674fi
3675
Jack Jansendd19cf82001-12-06 22:36:17 +00003676if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677 if test -n "$ac_tool_prefix"; then
3678 # 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 +00003679set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3681$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003682if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003684else
3685 if test -n "$CC"; then
3686 ac_cv_prog_CC="$CC" # Let the user override the test.
3687else
Martin v. Löwis11437992002-04-12 09:54:03 +00003688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3689for as_dir in $PATH
3690do
3691 IFS=$as_save_IFS
3692 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 $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 +00003697 break 2
3698 fi
3699done
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003702
3703fi
3704fi
3705CC=$ac_cv_prog_CC
3706if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3708$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003709else
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3711$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003712fi
3713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003716fi
3717if test -z "$CC"; then
3718 # Extract the first word of "cc", so it can be a program name with args.
3719set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3721$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003722if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003724else
3725 if test -n "$CC"; then
3726 ac_cv_prog_CC="$CC" # Let the user override the test.
3727else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003728 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3730for as_dir in $PATH
3731do
3732 IFS=$as_save_IFS
3733 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003735 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3737 ac_prog_rejected=yes
3738 continue
3739 fi
3740 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 $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 +00003742 break 2
3743 fi
3744done
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003746IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003747
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748if test $ac_prog_rejected = yes; then
3749 # We found a bogon in the path, so make sure we never use it.
3750 set dummy $ac_cv_prog_CC
3751 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753 # We chose a different compiler from the bogus one.
3754 # However, it has the same basename, so the bogon will be chosen
3755 # first if we set CC to just the basename; use the full file name.
3756 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003757 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758 fi
3759fi
3760fi
3761fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003762CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3765$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766else
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3768$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769fi
3770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771
Martin v. Löwis11437992002-04-12 09:54:03 +00003772fi
3773if test -z "$CC"; then
3774 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 do
3777 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3778set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3780$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003781if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003783else
3784 if test -n "$CC"; then
3785 ac_cv_prog_CC="$CC" # Let the user override the test.
3786else
Martin v. Löwis11437992002-04-12 09:54:03 +00003787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3788for as_dir in $PATH
3789do
3790 IFS=$as_save_IFS
3791 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 $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 +00003796 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003797 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003798done
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003801
3802fi
3803fi
3804CC=$ac_cv_prog_CC
3805if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3807$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003808else
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3810$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003811fi
3812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813
Martin v. Löwis11437992002-04-12 09:54:03 +00003814 test -n "$CC" && break
3815 done
3816fi
3817if test -z "$CC"; then
3818 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003820do
3821 # Extract the first word of "$ac_prog", so it can be a program name with args.
3822set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3824$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003825if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003827else
3828 if test -n "$ac_ct_CC"; then
3829 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3830else
3831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832for as_dir in $PATH
3833do
3834 IFS=$as_save_IFS
3835 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 $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 +00003840 break 2
3841 fi
3842done
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003845
Martin v. Löwis11437992002-04-12 09:54:03 +00003846fi
3847fi
3848ac_ct_CC=$ac_cv_prog_ac_ct_CC
3849if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3851$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003852else
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3854$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003855fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857
Martin v. Löwis11437992002-04-12 09:54:03 +00003858 test -n "$ac_ct_CC" && break
3859done
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861 if test "x$ac_ct_CC" = x; then
3862 CC=""
3863 else
3864 case $cross_compiling:$ac_tool_warned in
3865yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868ac_tool_warned=yes ;;
3869esac
3870 CC=$ac_ct_CC
3871 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003872fi
3873
3874fi
3875
3876
Matthias Kloseb9621712010-04-24 17:59:49 +00003877test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003879as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003880See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003881
3882# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003883$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3884set X $ac_compile
3885ac_compiler=$2
3886for ac_option in --version -v -V -qversion; do
3887 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003888case "(($ac_try" in
3889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3890 *) ac_try_echo=$ac_try;;
3891esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3893$as_echo "$ac_try_echo"; } >&5
3894 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003895 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 if test -s conftest.err; then
3897 sed '10a\
3898... rest of stderr output deleted ...
3899 10q' conftest.err >conftest.er1
3900 cat conftest.er1 >&5
3901 fi
3902 rm -f conftest.er1 conftest.err
3903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3904 test $ac_status = 0; }
3905done
Martin v. Löwis11437992002-04-12 09:54:03 +00003906
Matthias Kloseb9621712010-04-24 17:59:49 +00003907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003908/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003909
Martin v. Löwis11437992002-04-12 09:54:03 +00003910int
3911main ()
3912{
3913
3914 ;
3915 return 0;
3916}
3917_ACEOF
3918ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003919ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003920# Try to create an executable without -o first, disregard a.out.
3921# It will help us diagnose broken compilers, and finding out an intuition
3922# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3924$as_echo_n "checking whether the C compiler works... " >&6; }
3925ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3926
3927# The possible output files:
3928ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930ac_rmfiles=
3931for ac_file in $ac_files
3932do
3933 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3936 esac
3937done
3938rm -f $ac_rmfiles
3939
Matthias Kloseb9621712010-04-24 17:59:49 +00003940if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941case "(($ac_try" in
3942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3943 *) ac_try_echo=$ac_try;;
3944esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3946$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003948 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3950 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3952# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3953# in a Makefile. We should not override ac_cv_exeext if it was cached,
3954# so that the user can short-circuit this test for compilers unknown to
3955# Autoconf.
3956for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003957do
3958 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003959 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003961 ;;
3962 [ab].out )
3963 # We found the default executable, but exeext='' is most
3964 # certainly right.
3965 break;;
3966 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 then :; else
3969 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3970 fi
3971 # We set ac_cv_exeext here because the later test for it is not
3972 # safe: cross compilers may not add the suffix if given an `-o'
3973 # argument, so we may need to know it at that point already.
3974 # Even if this section looks crufty: it has the advantage of
3975 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003976 break;;
3977 * )
3978 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 esac
3980done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981test "$ac_cv_exeext" = no && ac_cv_exeext=
3982
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003983else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984 ac_file=''
3985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003986if test -z "$ac_file"; then :
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3988$as_echo "no" >&6; }
3989$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003990sed 's/^/| /' conftest.$ac_ext >&5
3991
Matthias Kloseb9621712010-04-24 17:59:49 +00003992{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003994as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003995See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003996else
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3998$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4001$as_echo_n "checking for C compiler default output file name... " >&6; }
4002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4003$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004005
Matthias Kloseb9621712010-04-24 17:59:49 +00004006rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4009$as_echo_n "checking for suffix of executables... " >&6; }
4010if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4016$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004018 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4020 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4022# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4023# work properly (i.e., refer to `conftest.exe'), while it won't with
4024# `rm'.
4025for ac_file in conftest.exe conftest conftest.*; do
4026 test -f "$ac_file" || continue
4027 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4030 break;;
4031 * ) break;;
4032 esac
4033done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004034else
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004037as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004038See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004040rm -f conftest conftest$ac_cv_exeext
4041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4042$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043
4044rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004045EXEEXT=$ac_cv_exeext
4046ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4048/* end confdefs.h. */
4049#include <stdio.h>
4050int
4051main ()
4052{
4053FILE *f = fopen ("conftest.out", "w");
4054 return ferror (f) || fclose (f) != 0;
4055
4056 ;
4057 return 0;
4058}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004060ac_clean_files="$ac_clean_files conftest.out"
4061# Check that the compiler produces executables we can run. If not, either
4062# the compiler is broken, or we cross compile.
4063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4064$as_echo_n "checking whether we are cross compiling... " >&6; }
4065if test "$cross_compiling" != yes; then
4066 { { ac_try="$ac_link"
4067case "(($ac_try" in
4068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069 *) ac_try_echo=$ac_try;;
4070esac
4071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4072$as_echo "$ac_try_echo"; } >&5
4073 (eval "$ac_link") 2>&5
4074 ac_status=$?
4075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4076 test $ac_status = 0; }
4077 if { ac_try='./conftest$ac_cv_exeext'
4078 { { case "(($ac_try" in
4079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4080 *) ac_try_echo=$ac_try;;
4081esac
4082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4083$as_echo "$ac_try_echo"; } >&5
4084 (eval "$ac_try") 2>&5
4085 ac_status=$?
4086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4087 test $ac_status = 0; }; }; then
4088 cross_compiling=no
4089 else
4090 if test "$cross_compiling" = maybe; then
4091 cross_compiling=yes
4092 else
4093 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004095as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004096If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004097See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004098 fi
4099 fi
4100fi
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4102$as_echo "$cross_compiling" >&6; }
4103
4104rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4105ac_clean_files=$ac_clean_files_save
4106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4107$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004108if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo_n "(cached) " >&6
4110else
4111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004112/* end confdefs.h. */
4113
4114int
4115main ()
4116{
4117
4118 ;
4119 return 0;
4120}
4121_ACEOF
4122rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004123if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124case "(($ac_try" in
4125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4126 *) ac_try_echo=$ac_try;;
4127esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004128eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4129$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4133 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134 for ac_file in conftest.o conftest.obj conftest.*; do
4135 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004136 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004138 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4139 break;;
4140 esac
4141done
4142else
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004144sed 's/^/| /' conftest.$ac_ext >&5
4145
Matthias Kloseb9621712010-04-24 17:59:49 +00004146{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004148as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004149See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004150fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004151rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4154$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004155OBJEXT=$ac_cv_objext
4156ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4158$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004159if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004161else
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004164
Martin v. Löwis11437992002-04-12 09:54:03 +00004165int
4166main ()
4167{
4168#ifndef __GNUC__
4169 choke me
4170#endif
4171
4172 ;
4173 return 0;
4174}
4175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004177 ac_compiler_gnu=yes
4178else
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004182ac_cv_c_compiler_gnu=$ac_compiler_gnu
4183
4184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4186$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4187if test $ac_compiler_gnu = yes; then
4188 GCC=yes
4189else
4190 GCC=
4191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004192ac_test_CFLAGS=${CFLAGS+set}
4193ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4195$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004196if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004198else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004199 ac_save_c_werror_flag=$ac_c_werror_flag
4200 ac_c_werror_flag=yes
4201 ac_cv_prog_cc_g=no
4202 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004205
Martin v. Löwis11437992002-04-12 09:54:03 +00004206int
4207main ()
4208{
4209
4210 ;
4211 return 0;
4212}
4213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004215 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216else
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 CFLAGS=""
4218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219/* end confdefs.h. */
4220
4221int
4222main ()
4223{
4224
4225 ;
4226 return 0;
4227}
4228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004229if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230
Matthias Kloseb9621712010-04-24 17:59:49 +00004231else
4232 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235/* end confdefs.h. */
4236
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4253 ac_c_werror_flag=$ac_save_c_werror_flag
4254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4256$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004258 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004259elif test $ac_cv_prog_cc_g = yes; then
4260 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004261 CFLAGS="-g -O2"
4262 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004263 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264 fi
4265else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004266 if test "$GCC" = yes; then
4267 CFLAGS="-O2"
4268 else
4269 CFLAGS=
4270 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4273$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004274if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004276else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004278ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004280/* end confdefs.h. */
4281#include <stdarg.h>
4282#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004283struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004284/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4285struct buf { int x; };
4286FILE * (*rcsopen) (struct buf *, struct stat *, int);
4287static char *e (p, i)
4288 char **p;
4289 int i;
4290{
4291 return p[i];
4292}
4293static char *f (char * (*g) (char **, int), char **p, ...)
4294{
4295 char *s;
4296 va_list v;
4297 va_start (v,p);
4298 s = g (p, va_arg (v,int));
4299 va_end (v);
4300 return s;
4301}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302
4303/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4304 function prototypes and stuff, but not '\xHH' hex character constants.
4305 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004307 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4308 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004310int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4313 inside strings and character constants. */
4314#define FOO(x) 'x'
4315int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4316
Skip Montanaro6dead952003-09-25 14:50:04 +00004317int test (int i, double x);
4318struct s1 {int (*f) (int a);};
4319struct s2 {int (*f) (double a);};
4320int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4321int argc;
4322char **argv;
4323int
4324main ()
4325{
4326return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4327 ;
4328 return 0;
4329}
4330_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4332 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004333do
4334 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338rm -f core conftest.err conftest.$ac_objext
4339 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004340done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004342CC=$ac_save_CC
4343
4344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345# AC_CACHE_VAL
4346case "x$ac_cv_prog_cc_c89" in
4347 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4349$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4352$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004353 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4356$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004357esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004358if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004359
Matthias Kloseb9621712010-04-24 17:59:49 +00004360fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004361
Martin v. Löwis11437992002-04-12 09:54:03 +00004362ac_ext=c
4363ac_cpp='$CPP $CPPFLAGS'
4364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4366ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004368ac_ext=c
4369ac_cpp='$CPP $CPPFLAGS'
4370ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4371ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4372ac_compiler_gnu=$ac_cv_c_compiler_gnu
4373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4374$as_echo_n "checking how to run the C preprocessor... " >&6; }
4375# On Suns, sometimes $CPP names a directory.
4376if test -n "$CPP" && test -d "$CPP"; then
4377 CPP=
4378fi
4379if test -z "$CPP"; then
4380 if ${ac_cv_prog_CPP+:} false; then :
4381 $as_echo_n "(cached) " >&6
4382else
4383 # Double quotes because CPP needs to be expanded
4384 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4385 do
4386 ac_preproc_ok=false
4387for ac_c_preproc_warn_flag in '' yes
4388do
4389 # Use a header file that comes with gcc, so configuring glibc
4390 # with a fresh cross-compiler works.
4391 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4392 # <limits.h> exists even on freestanding compilers.
4393 # On the NeXT, cc -E runs the code through the compiler's parser,
4394 # not just through cpp. "Syntax error" is here to catch this case.
4395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4396/* end confdefs.h. */
4397#ifdef __STDC__
4398# include <limits.h>
4399#else
4400# include <assert.h>
4401#endif
4402 Syntax error
4403_ACEOF
4404if ac_fn_c_try_cpp "$LINENO"; then :
4405
4406else
4407 # Broken: fails on valid input.
4408continue
4409fi
4410rm -f conftest.err conftest.i conftest.$ac_ext
4411
4412 # OK, works on sane cases. Now check whether nonexistent headers
4413 # can be detected and how.
4414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4415/* end confdefs.h. */
4416#include <ac_nonexistent.h>
4417_ACEOF
4418if ac_fn_c_try_cpp "$LINENO"; then :
4419 # Broken: success on invalid input.
4420continue
4421else
4422 # Passes both tests.
4423ac_preproc_ok=:
4424break
4425fi
4426rm -f conftest.err conftest.i conftest.$ac_ext
4427
4428done
4429# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4430rm -f conftest.i conftest.err conftest.$ac_ext
4431if $ac_preproc_ok; then :
4432 break
4433fi
4434
4435 done
4436 ac_cv_prog_CPP=$CPP
4437
4438fi
4439 CPP=$ac_cv_prog_CPP
4440else
4441 ac_cv_prog_CPP=$CPP
4442fi
4443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4444$as_echo "$CPP" >&6; }
4445ac_preproc_ok=false
4446for ac_c_preproc_warn_flag in '' yes
4447do
4448 # Use a header file that comes with gcc, so configuring glibc
4449 # with a fresh cross-compiler works.
4450 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4451 # <limits.h> exists even on freestanding compilers.
4452 # On the NeXT, cc -E runs the code through the compiler's parser,
4453 # not just through cpp. "Syntax error" is here to catch this case.
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455/* end confdefs.h. */
4456#ifdef __STDC__
4457# include <limits.h>
4458#else
4459# include <assert.h>
4460#endif
4461 Syntax error
4462_ACEOF
4463if ac_fn_c_try_cpp "$LINENO"; then :
4464
4465else
4466 # Broken: fails on valid input.
4467continue
4468fi
4469rm -f conftest.err conftest.i conftest.$ac_ext
4470
4471 # OK, works on sane cases. Now check whether nonexistent headers
4472 # can be detected and how.
4473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4474/* end confdefs.h. */
4475#include <ac_nonexistent.h>
4476_ACEOF
4477if ac_fn_c_try_cpp "$LINENO"; then :
4478 # Broken: success on invalid input.
4479continue
4480else
4481 # Passes both tests.
4482ac_preproc_ok=:
4483break
4484fi
4485rm -f conftest.err conftest.i conftest.$ac_ext
4486
4487done
4488# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4489rm -f conftest.i conftest.err conftest.$ac_ext
4490if $ac_preproc_ok; then :
4491
4492else
4493 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4495as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4496See \`config.log' for more details" "$LINENO" 5; }
4497fi
4498
4499ac_ext=c
4500ac_cpp='$CPP $CPPFLAGS'
4501ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4502ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4503ac_compiler_gnu=$ac_cv_c_compiler_gnu
4504
4505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4506$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4507if ${ac_cv_path_GREP+:} false; then :
4508 $as_echo_n "(cached) " >&6
4509else
4510 if test -z "$GREP"; then
4511 ac_path_GREP_found=false
4512 # Loop through the user's path and test for each of PROGNAME-LIST
4513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4514for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4515do
4516 IFS=$as_save_IFS
4517 test -z "$as_dir" && as_dir=.
4518 for ac_prog in grep ggrep; do
4519 for ac_exec_ext in '' $ac_executable_extensions; do
4520 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4521 as_fn_executable_p "$ac_path_GREP" || continue
4522# Check for GNU ac_path_GREP and select it if it is found.
4523 # Check for GNU $ac_path_GREP
4524case `"$ac_path_GREP" --version 2>&1` in
4525*GNU*)
4526 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4527*)
4528 ac_count=0
4529 $as_echo_n 0123456789 >"conftest.in"
4530 while :
4531 do
4532 cat "conftest.in" "conftest.in" >"conftest.tmp"
4533 mv "conftest.tmp" "conftest.in"
4534 cp "conftest.in" "conftest.nl"
4535 $as_echo 'GREP' >> "conftest.nl"
4536 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4537 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4538 as_fn_arith $ac_count + 1 && ac_count=$as_val
4539 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4540 # Best one so far, save it but keep looking for a better one
4541 ac_cv_path_GREP="$ac_path_GREP"
4542 ac_path_GREP_max=$ac_count
4543 fi
4544 # 10*(2^10) chars as input seems more than enough
4545 test $ac_count -gt 10 && break
4546 done
4547 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4548esac
4549
4550 $ac_path_GREP_found && break 3
4551 done
4552 done
4553 done
4554IFS=$as_save_IFS
4555 if test -z "$ac_cv_path_GREP"; then
4556 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4557 fi
4558else
4559 ac_cv_path_GREP=$GREP
4560fi
4561
4562fi
4563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4564$as_echo "$ac_cv_path_GREP" >&6; }
4565 GREP="$ac_cv_path_GREP"
4566
4567
Łukasz Langaa785c872016-09-09 17:37:37 -07004568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4569$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4570if ${ac_cv_path_SED+:} false; then :
4571 $as_echo_n "(cached) " >&6
4572else
4573 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4574 for ac_i in 1 2 3 4 5 6 7; do
4575 ac_script="$ac_script$as_nl$ac_script"
4576 done
4577 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4578 { ac_script=; unset ac_script;}
4579 if test -z "$SED"; then
4580 ac_path_SED_found=false
4581 # Loop through the user's path and test for each of PROGNAME-LIST
4582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4583for as_dir in $PATH
4584do
4585 IFS=$as_save_IFS
4586 test -z "$as_dir" && as_dir=.
4587 for ac_prog in sed gsed; do
4588 for ac_exec_ext in '' $ac_executable_extensions; do
4589 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4590 as_fn_executable_p "$ac_path_SED" || continue
4591# Check for GNU ac_path_SED and select it if it is found.
4592 # Check for GNU $ac_path_SED
4593case `"$ac_path_SED" --version 2>&1` in
4594*GNU*)
4595 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4596*)
4597 ac_count=0
4598 $as_echo_n 0123456789 >"conftest.in"
4599 while :
4600 do
4601 cat "conftest.in" "conftest.in" >"conftest.tmp"
4602 mv "conftest.tmp" "conftest.in"
4603 cp "conftest.in" "conftest.nl"
4604 $as_echo '' >> "conftest.nl"
4605 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4606 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4607 as_fn_arith $ac_count + 1 && ac_count=$as_val
4608 if test $ac_count -gt ${ac_path_SED_max-0}; then
4609 # Best one so far, save it but keep looking for a better one
4610 ac_cv_path_SED="$ac_path_SED"
4611 ac_path_SED_max=$ac_count
4612 fi
4613 # 10*(2^10) chars as input seems more than enough
4614 test $ac_count -gt 10 && break
4615 done
4616 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4617esac
4618
4619 $ac_path_SED_found && break 3
4620 done
4621 done
4622 done
4623IFS=$as_save_IFS
4624 if test -z "$ac_cv_path_SED"; then
4625 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4626 fi
4627else
4628 ac_cv_path_SED=$SED
4629fi
4630
4631fi
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4633$as_echo "$ac_cv_path_SED" >&6; }
4634 SED="$ac_cv_path_SED"
4635 rm -f conftest.sed
4636
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004637
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004638
4639
Matthias Kloseb9621712010-04-24 17:59:49 +00004640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4641$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004643# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004644if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004645 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004646
4647 case $withval in
4648 no) with_cxx_main=no
4649 MAINCC='$(CC)';;
4650 yes) with_cxx_main=yes
4651 MAINCC='$(CXX)';;
4652 *) with_cxx_main=yes
4653 MAINCC=$withval
4654 if test -z "$CXX"
4655 then
4656 CXX=$withval
4657 fi;;
4658 esac
4659else
4660
4661 with_cxx_main=no
4662 MAINCC='$(CC)'
4663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004664fi
4665
Matthias Kloseb9621712010-04-24 17:59:49 +00004666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4667$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004668
4669preset_cxx="$CXX"
4670if test -z "$CXX"
4671then
4672 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004673 gcc) if test -n "$ac_tool_prefix"; then
4674 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4675set dummy ${ac_tool_prefix}g++; ac_word=$2
4676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4677$as_echo_n "checking for $ac_word... " >&6; }
4678if ${ac_cv_path_CXX+:} false; then :
4679 $as_echo_n "(cached) " >&6
4680else
4681 case $CXX in
4682 [\\/]* | ?:[\\/]*)
4683 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4684 ;;
4685 *)
4686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4687for as_dir in notfound
4688do
4689 IFS=$as_save_IFS
4690 test -z "$as_dir" && as_dir=.
4691 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004693 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4695 break 2
4696 fi
4697done
4698 done
4699IFS=$as_save_IFS
4700
4701 ;;
4702esac
4703fi
4704CXX=$ac_cv_path_CXX
4705if test -n "$CXX"; then
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4707$as_echo "$CXX" >&6; }
4708else
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4710$as_echo "no" >&6; }
4711fi
4712
4713
4714fi
4715if test -z "$ac_cv_path_CXX"; then
4716 ac_pt_CXX=$CXX
4717 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4720$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004721if ${ac_cv_path_ac_pt_CXX+:} false; then :
4722 $as_echo_n "(cached) " >&6
4723else
4724 case $ac_pt_CXX in
4725 [\\/]* | ?:[\\/]*)
4726 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4727 ;;
4728 *)
4729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4730for as_dir in notfound
4731do
4732 IFS=$as_save_IFS
4733 test -z "$as_dir" && as_dir=.
4734 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004735 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004736 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4738 break 2
4739 fi
4740done
4741 done
4742IFS=$as_save_IFS
4743
4744 ;;
4745esac
4746fi
4747ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4748if test -n "$ac_pt_CXX"; then
4749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4750$as_echo "$ac_pt_CXX" >&6; }
4751else
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4753$as_echo "no" >&6; }
4754fi
4755
4756 if test "x$ac_pt_CXX" = x; then
4757 CXX="g++"
4758 else
4759 case $cross_compiling:$ac_tool_warned in
4760yes:)
4761{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4762$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4763ac_tool_warned=yes ;;
4764esac
4765 CXX=$ac_pt_CXX
4766 fi
4767else
4768 CXX="$ac_cv_path_CXX"
4769fi
4770 ;;
4771 cc) if test -n "$ac_tool_prefix"; then
4772 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4773set dummy ${ac_tool_prefix}c++; ac_word=$2
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4775$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004776if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004777 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778else
4779 case $CXX in
4780 [\\/]* | ?:[\\/]*)
4781 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4782 ;;
4783 *)
4784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in notfound
4786do
4787 IFS=$as_save_IFS
4788 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793 break 2
4794 fi
4795done
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004797IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799 ;;
4800esac
4801fi
4802CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004803if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4805$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004806else
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4808$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004810
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811
4812fi
4813if test -z "$ac_cv_path_CXX"; then
4814 ac_pt_CXX=$CXX
4815 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4818$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004821else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824 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 +00004825 ;;
4826 *)
4827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4828for as_dir in notfound
4829do
4830 IFS=$as_save_IFS
4831 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004832 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004833 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004834 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004835 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836 break 2
4837 fi
4838done
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004840IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842 ;;
4843esac
4844fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4846if test -n "$ac_pt_CXX"; then
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4848$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004849else
Matthias Kloseb9621712010-04-24 17:59:49 +00004850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4851$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004853
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004854 if test "x$ac_pt_CXX" = x; then
4855 CXX="c++"
4856 else
4857 case $cross_compiling:$ac_tool_warned in
4858yes:)
4859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4861ac_tool_warned=yes ;;
4862esac
4863 CXX=$ac_pt_CXX
4864 fi
4865else
4866 CXX="$ac_cv_path_CXX"
4867fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004868 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869 clang|*/clang) if test -n "$ac_tool_prefix"; then
4870 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4871set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4873$as_echo_n "checking for $ac_word... " >&6; }
4874if ${ac_cv_path_CXX+:} false; then :
4875 $as_echo_n "(cached) " >&6
4876else
4877 case $CXX in
4878 [\\/]* | ?:[\\/]*)
4879 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4880 ;;
4881 *)
4882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4883for as_dir in notfound
4884do
4885 IFS=$as_save_IFS
4886 test -z "$as_dir" && as_dir=.
4887 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004888 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004889 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4891 break 2
4892 fi
4893done
4894 done
4895IFS=$as_save_IFS
4896
Ned Deilycbfb9a52012-06-23 16:02:19 -07004897 ;;
4898esac
4899fi
4900CXX=$ac_cv_path_CXX
4901if test -n "$CXX"; then
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4903$as_echo "$CXX" >&6; }
4904else
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4906$as_echo "no" >&6; }
4907fi
4908
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004909
4910fi
4911if test -z "$ac_cv_path_CXX"; then
4912 ac_pt_CXX=$CXX
4913 # Extract the first word of "clang++", so it can be a program name with args.
4914set dummy clang++; ac_word=$2
4915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4916$as_echo_n "checking for $ac_word... " >&6; }
4917if ${ac_cv_path_ac_pt_CXX+:} false; then :
4918 $as_echo_n "(cached) " >&6
4919else
4920 case $ac_pt_CXX in
4921 [\\/]* | ?:[\\/]*)
4922 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4923 ;;
4924 *)
4925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4926for as_dir in notfound
4927do
4928 IFS=$as_save_IFS
4929 test -z "$as_dir" && as_dir=.
4930 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004931 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004932 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4933 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4934 break 2
4935 fi
4936done
4937 done
4938IFS=$as_save_IFS
4939
4940 ;;
4941esac
4942fi
4943ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4944if test -n "$ac_pt_CXX"; then
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4946$as_echo "$ac_pt_CXX" >&6; }
4947else
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4949$as_echo "no" >&6; }
4950fi
4951
4952 if test "x$ac_pt_CXX" = x; then
4953 CXX="clang++"
4954 else
4955 case $cross_compiling:$ac_tool_warned in
4956yes:)
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4959ac_tool_warned=yes ;;
4960esac
4961 CXX=$ac_pt_CXX
4962 fi
4963else
4964 CXX="$ac_cv_path_CXX"
4965fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004966 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004967 icc|*/icc) if test -n "$ac_tool_prefix"; then
4968 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4969set dummy ${ac_tool_prefix}icpc; ac_word=$2
4970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4971$as_echo_n "checking for $ac_word... " >&6; }
4972if ${ac_cv_path_CXX+:} false; then :
4973 $as_echo_n "(cached) " >&6
4974else
4975 case $CXX in
4976 [\\/]* | ?:[\\/]*)
4977 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4978 ;;
4979 *)
4980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4981for as_dir in notfound
4982do
4983 IFS=$as_save_IFS
4984 test -z "$as_dir" && as_dir=.
4985 for ac_exec_ext in '' $ac_executable_extensions; do
4986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4987 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4989 break 2
4990 fi
4991done
4992 done
4993IFS=$as_save_IFS
4994
4995 ;;
4996esac
4997fi
4998CXX=$ac_cv_path_CXX
4999if test -n "$CXX"; then
5000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5001$as_echo "$CXX" >&6; }
5002else
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5004$as_echo "no" >&6; }
5005fi
5006
5007
5008fi
5009if test -z "$ac_cv_path_CXX"; then
5010 ac_pt_CXX=$CXX
5011 # Extract the first word of "icpc", so it can be a program name with args.
5012set dummy icpc; ac_word=$2
5013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
5015if ${ac_cv_path_ac_pt_CXX+:} false; then :
5016 $as_echo_n "(cached) " >&6
5017else
5018 case $ac_pt_CXX in
5019 [\\/]* | ?:[\\/]*)
5020 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5021 ;;
5022 *)
5023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in notfound
5025do
5026 IFS=$as_save_IFS
5027 test -z "$as_dir" && as_dir=.
5028 for ac_exec_ext in '' $ac_executable_extensions; do
5029 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5030 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5032 break 2
5033 fi
5034done
5035 done
5036IFS=$as_save_IFS
5037
5038 ;;
5039esac
5040fi
5041ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5042if test -n "$ac_pt_CXX"; then
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5044$as_echo "$ac_pt_CXX" >&6; }
5045else
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5047$as_echo "no" >&6; }
5048fi
5049
5050 if test "x$ac_pt_CXX" = x; then
5051 CXX="icpc"
5052 else
5053 case $cross_compiling:$ac_tool_warned in
5054yes:)
5055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5057ac_tool_warned=yes ;;
5058esac
5059 CXX=$ac_pt_CXX
5060 fi
5061else
5062 CXX="$ac_cv_path_CXX"
5063fi
5064 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005065 esac
5066 if test "$CXX" = "notfound"
5067 then
5068 CXX=""
5069 fi
5070fi
5071if test -z "$CXX"
5072then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005073 if test -n "$ac_tool_prefix"; then
5074 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5075 do
5076 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5077set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5079$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005080if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005082else
5083 if test -n "$CXX"; then
5084 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5085else
5086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5087for as_dir in $PATH
5088do
5089 IFS=$as_save_IFS
5090 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005093 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095 break 2
5096 fi
5097done
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005099IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005100
5101fi
5102fi
5103CXX=$ac_cv_prog_CXX
5104if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5106$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107else
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5109$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005110fi
5111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005112
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005113 test -n "$CXX" && break
5114 done
5115fi
5116if test -z "$CXX"; then
5117 ac_ct_CXX=$CXX
5118 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5119do
5120 # Extract the first word of "$ac_prog", so it can be a program name with args.
5121set dummy $ac_prog; ac_word=$2
5122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5123$as_echo_n "checking for $ac_word... " >&6; }
5124if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5125 $as_echo_n "(cached) " >&6
5126else
5127 if test -n "$ac_ct_CXX"; then
5128 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5129else
5130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133 IFS=$as_save_IFS
5134 test -z "$as_dir" && as_dir=.
5135 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005136 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 ac_cv_prog_ac_ct_CXX="$ac_prog"
5138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139 break 2
5140 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005141done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005142 done
5143IFS=$as_save_IFS
5144
5145fi
5146fi
5147ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5148if test -n "$ac_ct_CXX"; then
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5150$as_echo "$ac_ct_CXX" >&6; }
5151else
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5153$as_echo "no" >&6; }
5154fi
5155
5156
5157 test -n "$ac_ct_CXX" && break
5158done
5159
5160 if test "x$ac_ct_CXX" = x; then
5161 CXX="notfound"
5162 else
5163 case $cross_compiling:$ac_tool_warned in
5164yes:)
5165{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5166$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5167ac_tool_warned=yes ;;
5168esac
5169 CXX=$ac_ct_CXX
5170 fi
5171fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172
5173 if test "$CXX" = "notfound"
5174 then
5175 CXX=""
5176 fi
5177fi
5178if test "$preset_cxx" != "$CXX"
5179then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005180 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005181
5182 By default, distutils will build C++ extension modules with \"$CXX\".
5183 If this is not intended, then set CXX on the configure command line.
5184 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005185$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005186
5187 By default, distutils will build C++ extension modules with \"$CXX\".
5188 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005189 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005190fi
5191
5192
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005193MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5194
5195
5196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5197$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5198cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005199#undef bfin
5200#undef cris
5201#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005202#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005203#undef hppa
5204#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005205#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005206#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005207#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005208#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005209#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005210#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005211 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005212#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005213# if defined(__x86_64__) && defined(__LP64__)
5214 x86_64-linux-gnu
5215# elif defined(__x86_64__) && defined(__ILP32__)
5216 x86_64-linux-gnux32
5217# elif defined(__i386__)
5218 i386-linux-gnu
5219# elif defined(__aarch64__) && defined(__AARCH64EL__)
5220# if defined(__ILP32__)
5221 aarch64_ilp32-linux-gnu
5222# else
5223 aarch64-linux-gnu
5224# endif
5225# elif defined(__aarch64__) && defined(__AARCH64EB__)
5226# if defined(__ILP32__)
5227 aarch64_be_ilp32-linux-gnu
5228# else
5229 aarch64_be-linux-gnu
5230# endif
5231# elif defined(__alpha__)
5232 alpha-linux-gnu
5233# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5234# if defined(__ARMEL__)
5235 arm-linux-gnueabihf
5236# else
5237 armeb-linux-gnueabihf
5238# endif
5239# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5240# if defined(__ARMEL__)
5241 arm-linux-gnueabi
5242# else
5243 armeb-linux-gnueabi
5244# endif
5245# elif defined(__hppa__)
5246 hppa-linux-gnu
5247# elif defined(__ia64__)
5248 ia64-linux-gnu
5249# elif defined(__m68k__) && !defined(__mcoldfire__)
5250 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005251# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5252# if _MIPS_SIM == _ABIO32
5253 mipsisa32r6el-linux-gnu
5254# elif _MIPS_SIM == _ABIN32
5255 mipsisa64r6el-linux-gnuabin32
5256# elif _MIPS_SIM == _ABI64
5257 mipsisa64r6el-linux-gnuabi64
5258# else
5259# error unknown platform triplet
5260# endif
5261# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5262# if _MIPS_SIM == _ABIO32
5263 mipsisa32r6-linux-gnu
5264# elif _MIPS_SIM == _ABIN32
5265 mipsisa64r6-linux-gnuabin32
5266# elif _MIPS_SIM == _ABI64
5267 mipsisa64r6-linux-gnuabi64
5268# else
5269# error unknown platform triplet
5270# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005271# elif defined(__mips_hard_float) && defined(_MIPSEL)
5272# if _MIPS_SIM == _ABIO32
5273 mipsel-linux-gnu
5274# elif _MIPS_SIM == _ABIN32
5275 mips64el-linux-gnuabin32
5276# elif _MIPS_SIM == _ABI64
5277 mips64el-linux-gnuabi64
5278# else
5279# error unknown platform triplet
5280# endif
5281# elif defined(__mips_hard_float)
5282# if _MIPS_SIM == _ABIO32
5283 mips-linux-gnu
5284# elif _MIPS_SIM == _ABIN32
5285 mips64-linux-gnuabin32
5286# elif _MIPS_SIM == _ABI64
5287 mips64-linux-gnuabi64
5288# else
5289# error unknown platform triplet
5290# endif
5291# elif defined(__or1k__)
5292 or1k-linux-gnu
5293# elif defined(__powerpc__) && defined(__SPE__)
5294 powerpc-linux-gnuspe
5295# elif defined(__powerpc64__)
5296# if defined(__LITTLE_ENDIAN__)
5297 powerpc64le-linux-gnu
5298# else
5299 powerpc64-linux-gnu
5300# endif
5301# elif defined(__powerpc__)
5302 powerpc-linux-gnu
5303# elif defined(__s390x__)
5304 s390x-linux-gnu
5305# elif defined(__s390__)
5306 s390-linux-gnu
5307# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5308 sh4-linux-gnu
5309# elif defined(__sparc__) && defined(__arch64__)
5310 sparc64-linux-gnu
5311# elif defined(__sparc__)
5312 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005313# elif defined(__riscv)
5314# if __riscv_xlen == 32
5315 riscv32-linux-gnu
5316# elif __riscv_xlen == 64
5317 riscv64-linux-gnu
5318# else
5319# error unknown platform triplet
5320# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321# else
5322# error unknown platform triplet
5323# endif
5324#elif defined(__FreeBSD_kernel__)
5325# if defined(__LP64__)
5326 x86_64-kfreebsd-gnu
5327# elif defined(__i386__)
5328 i386-kfreebsd-gnu
5329# else
5330# error unknown platform triplet
5331# endif
5332#elif defined(__gnu_hurd__)
5333 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005334#elif defined(__APPLE__)
5335 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005336#elif defined(__VXWORKS__)
5337 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005338#else
5339# error unknown platform triplet
5340#endif
5341
5342EOF
5343
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005344if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005345 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5347$as_echo "$PLATFORM_TRIPLET" >&6; }
5348else
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5350$as_echo "none" >&6; }
5351fi
5352rm -f conftest.c conftest.out
5353
5354if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5355 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5356 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5357 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005358elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5359 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005360fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005361
doko@ubuntu.com55532312016-06-14 08:55:19 +02005362if test x$MULTIARCH != x; then
5363 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5364fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005365
5366
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5368$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5369save_LDFLAGS="$LDFLAGS"
5370LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5373/* end confdefs.h. */
5374
5375int
5376main ()
5377{
5378
5379 ;
5380 return 0;
5381}
5382_ACEOF
5383if ac_fn_c_try_link "$LINENO"; then :
5384 NO_AS_NEEDED="-Wl,--no-as-needed"
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5386$as_echo "yes" >&6; }
5387else
5388 NO_AS_NEEDED=""
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
5391fi
5392rm -f core conftest.err conftest.$ac_objext \
5393 conftest$ac_exeext conftest.$ac_ext
5394LDFLAGS="$save_LDFLAGS"
5395
5396
5397
5398# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399
Matthias Kloseb9621712010-04-24 17:59:49 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5401$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005402if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404else
5405 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5406 then ac_cv_path_EGREP="$GREP -E"
5407 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 # Loop through the user's path and test for each of PROGNAME-LIST
5411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5413do
5414 IFS=$as_save_IFS
5415 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 for ac_prog in egrep; do
5417 for ac_exec_ext in '' $ac_executable_extensions; do
5418 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005419 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005420# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 # Check for GNU $ac_path_EGREP
5422case `"$ac_path_EGREP" --version 2>&1` in
5423*GNU*)
5424 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5425*)
5426 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 while :
5429 do
5430 cat "conftest.in" "conftest.in" >"conftest.tmp"
5431 mv "conftest.tmp" "conftest.in"
5432 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005434 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5435 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5438 # Best one so far, save it but keep looking for a better one
5439 ac_cv_path_EGREP="$ac_path_EGREP"
5440 ac_path_EGREP_max=$ac_count
5441 fi
5442 # 10*(2^10) chars as input seems more than enough
5443 test $ac_count -gt 10 && break
5444 done
5445 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5446esac
5447
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 $ac_path_EGREP_found && break 3
5449 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005450 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005452IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005454 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 +00005455 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005456else
5457 ac_cv_path_EGREP=$EGREP
5458fi
5459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005460 fi
5461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5463$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005464 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005465
5466
Matthias Kloseb9621712010-04-24 17:59:49 +00005467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5468$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005469if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005470 $as_echo_n "(cached) " >&6
5471else
5472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005473/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005474#include <stdlib.h>
5475#include <stdarg.h>
5476#include <string.h>
5477#include <float.h>
5478
5479int
5480main ()
5481{
5482
5483 ;
5484 return 0;
5485}
5486_ACEOF
5487if ac_fn_c_try_compile "$LINENO"; then :
5488 ac_cv_header_stdc=yes
5489else
5490 ac_cv_header_stdc=no
5491fi
5492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5493
5494if test $ac_cv_header_stdc = yes; then
5495 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497/* end confdefs.h. */
5498#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005499
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005500_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005502 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005504else
Matthias Kloseb9621712010-04-24 17:59:49 +00005505 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005506fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005507rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508
Matthias Kloseb9621712010-04-24 17:59:49 +00005509fi
5510
5511if test $ac_cv_header_stdc = yes; then
5512 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5514/* end confdefs.h. */
5515#include <stdlib.h>
5516
5517_ACEOF
5518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5519 $EGREP "free" >/dev/null 2>&1; then :
5520
5521else
5522 ac_cv_header_stdc=no
5523fi
5524rm -f conftest*
5525
5526fi
5527
5528if test $ac_cv_header_stdc = yes; then
5529 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5530 if test "$cross_compiling" = yes; then :
5531 :
5532else
5533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5534/* end confdefs.h. */
5535#include <ctype.h>
5536#include <stdlib.h>
5537#if ((' ' & 0x0FF) == 0x020)
5538# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5539# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5540#else
5541# define ISLOWER(c) \
5542 (('a' <= (c) && (c) <= 'i') \
5543 || ('j' <= (c) && (c) <= 'r') \
5544 || ('s' <= (c) && (c) <= 'z'))
5545# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5546#endif
5547
5548#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5549int
5550main ()
5551{
5552 int i;
5553 for (i = 0; i < 256; i++)
5554 if (XOR (islower (i), ISLOWER (i))
5555 || toupper (i) != TOUPPER (i))
5556 return 2;
5557 return 0;
5558}
5559_ACEOF
5560if ac_fn_c_try_run "$LINENO"; then :
5561
5562else
5563 ac_cv_header_stdc=no
5564fi
5565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5566 conftest.$ac_objext conftest.beam conftest.$ac_ext
5567fi
5568
5569fi
5570fi
5571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5572$as_echo "$ac_cv_header_stdc" >&6; }
5573if test $ac_cv_header_stdc = yes; then
5574
5575$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5576
5577fi
5578
5579# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5580for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5581 inttypes.h stdint.h unistd.h
5582do :
5583 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5584ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5585"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005586if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 cat >>confdefs.h <<_ACEOF
5588#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5589_ACEOF
5590
5591fi
5592
5593done
5594
5595
5596
5597 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 +02005598if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005599 MINIX=yes
5600else
5601 MINIX=
5602fi
5603
5604
5605 if test "$MINIX" = yes; then
5606
5607$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5608
5609
5610$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5611
5612
5613$as_echo "#define _MINIX 1" >>confdefs.h
5614
5615 fi
5616
5617
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5619$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005620if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005621 $as_echo_n "(cached) " >&6
5622else
5623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5624/* end confdefs.h. */
5625
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005626# define __EXTENSIONS__ 1
5627 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005628int
5629main ()
5630{
5631
5632 ;
5633 return 0;
5634}
5635_ACEOF
5636if ac_fn_c_try_compile "$LINENO"; then :
5637 ac_cv_safe_to_define___extensions__=yes
5638else
5639 ac_cv_safe_to_define___extensions__=no
5640fi
5641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5642fi
5643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5644$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5645 test $ac_cv_safe_to_define___extensions__ = yes &&
5646 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5647
5648 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5649
5650 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5651
5652 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5653
5654 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5655
5656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657
Xavier de Gaye95750b12016-07-09 11:05:42 +02005658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5659$as_echo_n "checking for the Android API level... " >&6; }
5660cat >> conftest.c <<EOF
5661#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005662android_api = __ANDROID_API__
5663arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005664#else
5665#error not Android
5666#endif
5667EOF
5668
5669if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005670 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5671 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5673$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005674 if test -z "$ANDROID_API_LEVEL"; then
5675 echo 'Fatal: you must define __ANDROID_API__'
5676 exit 1
5677 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005678
5679cat >>confdefs.h <<_ACEOF
5680#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5681_ACEOF
5682
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005683
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5685$as_echo_n "checking for the Android arm ABI... " >&6; }
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5687$as_echo "$_arm_arch" >&6; }
5688 if test "$_arm_arch" = 7; then
5689 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5690 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5691 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005692else
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5694$as_echo "not Android" >&6; }
5695fi
5696rm -f conftest.c conftest.out
5697
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698# Check for unsupported systems
5699case $ac_sys_system/$ac_sys_release in
5700atheos*|Linux*/1*)
5701 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5702 echo See README for details.
5703 exit 1;;
5704esac
5705
5706
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5708$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709
5710# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005711if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 withval=$with_suffix;
5713 case $withval in
5714 no) EXEEXT=;;
5715 yes) EXEEXT=.exe;;
5716 *) EXEEXT=$withval;;
5717 esac
5718fi
5719
Matthias Kloseb9621712010-04-24 17:59:49 +00005720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5721$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722
5723# Test whether we're running on a non-case-sensitive system, in which
5724# case we give a warning if no ext is given
5725
Matthias Kloseb9621712010-04-24 17:59:49 +00005726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5727$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728if test ! -d CaseSensitiveTestDir; then
5729mkdir CaseSensitiveTestDir
5730fi
5731
5732if test -d casesensitivetestdir
5733then
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5735$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 BUILDEXEEXT=.exe
5737else
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740 BUILDEXEEXT=$EXEEXT
5741fi
5742rmdir CaseSensitiveTestDir
5743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744case $ac_sys_system in
5745hp*|HP*)
5746 case $CC in
5747 cc|*/cc) CC="$CC -Ae";;
5748 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749esac
5750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5753$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754if test -z "$LIBRARY"
5755then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005756 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5759$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760
5761# LDLIBRARY is the name of the library to link against (as opposed to the
5762# name of the library into which to insert object files). BLDLIBRARY is also
5763# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5764# is blank as the main program is not linked directly against LDLIBRARY.
5765# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5766# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5767# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5768# DLLLIBRARY is the shared (i.e., DLL) library.
5769#
5770# RUNSHARED is used to run shared python without installed libraries
5771#
5772# INSTSONAME is the name of the shared library that will be use to install
5773# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005774#
5775# LDVERSION is the shared library version number, normally the Python version
5776# with the ABI build flags appended.
5777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779
5780
5781
5782
5783
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785LDLIBRARY="$LIBRARY"
5786BLDLIBRARY='$(LDLIBRARY)'
5787INSTSONAME='$(LDLIBRARY)'
5788DLLLIBRARY=''
5789LDLIBRARYDIR=''
5790RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005791LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792
5793# LINKCC is the command that links the python executable -- default is $(CC).
5794# If CXX is set, and if it is needed to link a main function that was
5795# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5796# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5799$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800if test -z "$LINKCC"
5801then
5802 LINKCC='$(PURIFY) $(MAINCC)'
5803 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 QNX*)
5805 # qcc must be used because the other compilers do not
5806 # support -N.
5807 LINKCC=qcc;;
5808 esac
5809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5811$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812
Stefan Krahe6dcd372020-08-29 17:00:08 +02005813# EXPORTSYMS holds the list of exported symbols for AIX.
5814# EXPORTSFROM holds the module name exporting symbols on AIX.
5815EXPORTSYMS=
5816EXPORTSFROM=
5817
5818
5819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5820$as_echo_n "checking EXPORTSYMS... " >&6; }
5821case $ac_sys_system in
5822AIX*)
5823 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005824 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005825 ;;
5826esac
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5828$as_echo "$EXPORTSYMS" >&6; }
5829
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5831# make sure we default having it set to "no": this is used by
5832# distutils.unixccompiler to know if it should add --enable-new-dtags
5833# to linker command lines, and failing to detect GNU ld simply results
5834# in the same bahaviour as before.
5835
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5837$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838ac_prog=ld
5839if test "$GCC" = yes; then
5840 ac_prog=`$CC -print-prog-name=ld`
5841fi
5842case `"$ac_prog" -V 2>&1 < /dev/null` in
5843 *GNU*)
5844 GNULD=yes;;
5845 *)
5846 GNULD=no;;
5847esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5849$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5852$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855 enableval=$enable_shared;
5856fi
5857
5858
5859if test -z "$enable_shared"
5860then
5861 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005862 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863 enable_shared="yes";;
5864 *)
5865 enable_shared="no";;
5866 esac
5867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5869$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870
Matthias Kloseb9621712010-04-24 17:59:49 +00005871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5872$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005874if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005875 enableval=$enable_profiling;
5876fi
5877
5878if test "x$enable_profiling" = xyes; then
5879 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005880 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882/* end confdefs.h. */
5883int main() { return 0; }
5884_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005885if ac_fn_c_try_link "$LINENO"; then :
5886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005888 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890rm -f core conftest.err conftest.$ac_objext \
5891 conftest$ac_exeext conftest.$ac_ext
5892 CC="$ac_save_cc"
5893else
5894 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5897$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898
doko@ubuntu.comba015832012-06-30 16:52:05 +02005899if test "x$enable_profiling" = xyes; then
5900 BASECFLAGS="-pg $BASECFLAGS"
5901 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902fi
5903
Matthias Kloseb9621712010-04-24 17:59:49 +00005904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5905$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906
5907# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5908# library that we build, but we do not want to link against it (we
5909# will find it with a -framework option). For this reason there is an
5910# extra variable BLDLIBRARY against which Python and the extension
5911# modules are linked, BLDLIBRARY. This is normally the same as
5912# LDLIBRARY, but empty for MacOSX framework builds.
5913if test "$enable_framework"
5914then
5915 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 BLDLIBRARY=''
5918else
5919 BLDLIBRARY='$(LDLIBRARY)'
5920fi
5921
5922# Other platforms follow
5923if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005924 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925
Matthias Kloseb9621712010-04-24 17:59:49 +00005926$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
5928 case $ac_sys_system in
5929 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).dll.a'
5931 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
5933 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).so'
5935 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005936 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005938 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005939 then
5940 PY3LIBRARY=libpython3.so
5941 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 ;;
pxinwrc1174262020-12-15 06:14:43 +08005943 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005944 LDLIBRARY='libpython$(LDVERSION).so'
5945 BLDLIBRARY='-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 ;;
5953 hp*|HP*)
5954 case `uname -m` in
5955 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
5958 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
5961 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005963 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005966 LDLIBRARY='libpython$(LDVERSION).dylib'
5967 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005968 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005970 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005971 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005972 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005973 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974
5975 esac
5976else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005977 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978 case $ac_sys_system in
5979 CYGWIN*)
5980 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005981 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 ;;
5983 esac
5984fi
5985
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005986if test "$cross_compiling" = yes; then
5987 RUNSHARED=
5988fi
5989
Matthias Kloseb9621712010-04-24 17:59:49 +00005990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5991$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005994if test -n "$ac_tool_prefix"; then
5995 for ac_prog in ar aal
5996 do
5997 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5998set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006001if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003else
6004 if test -n "$AR"; then
6005 ac_cv_prog_AR="$AR" # Let the user override the test.
6006else
6007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH
6009do
6010 IFS=$as_save_IFS
6011 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006014 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016 break 2
6017 fi
6018done
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020IFS=$as_save_IFS
6021
6022fi
6023fi
6024AR=$ac_cv_prog_AR
6025if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6027$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028else
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031fi
6032
6033
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006034 test -n "$AR" && break
6035 done
6036fi
6037if test -z "$AR"; then
6038 ac_ct_AR=$AR
6039 for ac_prog in ar aal
6040do
6041 # Extract the first word of "$ac_prog", so it can be a program name with args.
6042set dummy $ac_prog; ac_word=$2
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6044$as_echo_n "checking for $ac_word... " >&6; }
6045if ${ac_cv_prog_ac_ct_AR+:} false; then :
6046 $as_echo_n "(cached) " >&6
6047else
6048 if test -n "$ac_ct_AR"; then
6049 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6050else
6051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6052for as_dir in $PATH
6053do
6054 IFS=$as_save_IFS
6055 test -z "$as_dir" && as_dir=.
6056 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006057 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006058 ac_cv_prog_ac_ct_AR="$ac_prog"
6059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6060 break 2
6061 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006063 done
6064IFS=$as_save_IFS
6065
6066fi
6067fi
6068ac_ct_AR=$ac_cv_prog_ac_ct_AR
6069if test -n "$ac_ct_AR"; then
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6071$as_echo "$ac_ct_AR" >&6; }
6072else
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076
6077
6078 test -n "$ac_ct_AR" && break
6079done
6080
6081 if test "x$ac_ct_AR" = x; then
6082 AR="ar"
6083 else
6084 case $cross_compiling:$ac_tool_warned in
6085yes:)
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6087$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6088ac_tool_warned=yes ;;
6089esac
6090 AR=$ac_ct_AR
6091 fi
6092fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093
6094
6095# tweak ARFLAGS only if the user didn't set it on the command line
6096
6097if test -z "$ARFLAGS"
6098then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006099 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006100fi
6101
doko@ubuntu.com58844492012-06-30 18:25:32 +02006102if test -n "$ac_tool_prefix"; then
6103 for ac_prog in readelf
6104 do
6105 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6106set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6108$as_echo_n "checking for $ac_word... " >&6; }
6109if ${ac_cv_prog_READELF+:} false; then :
6110 $as_echo_n "(cached) " >&6
6111else
6112 if test -n "$READELF"; then
6113 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6114else
6115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6116for as_dir in $PATH
6117do
6118 IFS=$as_save_IFS
6119 test -z "$as_dir" && as_dir=.
6120 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006121 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006122 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6124 break 2
6125 fi
6126done
6127 done
6128IFS=$as_save_IFS
6129
6130fi
6131fi
6132READELF=$ac_cv_prog_READELF
6133if test -n "$READELF"; then
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6135$as_echo "$READELF" >&6; }
6136else
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138$as_echo "no" >&6; }
6139fi
6140
6141
6142 test -n "$READELF" && break
6143 done
6144fi
6145if test -z "$READELF"; then
6146 ac_ct_READELF=$READELF
6147 for ac_prog in readelf
6148do
6149 # Extract the first word of "$ac_prog", so it can be a program name with args.
6150set dummy $ac_prog; ac_word=$2
6151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6152$as_echo_n "checking for $ac_word... " >&6; }
6153if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6154 $as_echo_n "(cached) " >&6
6155else
6156 if test -n "$ac_ct_READELF"; then
6157 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6158else
6159as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH
6161do
6162 IFS=$as_save_IFS
6163 test -z "$as_dir" && as_dir=.
6164 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006165 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006166 ac_cv_prog_ac_ct_READELF="$ac_prog"
6167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6168 break 2
6169 fi
6170done
6171 done
6172IFS=$as_save_IFS
6173
6174fi
6175fi
6176ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6177if test -n "$ac_ct_READELF"; then
6178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6179$as_echo "$ac_ct_READELF" >&6; }
6180else
6181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6182$as_echo "no" >&6; }
6183fi
6184
6185
6186 test -n "$ac_ct_READELF" && break
6187done
6188
6189 if test "x$ac_ct_READELF" = x; then
6190 READELF=":"
6191 else
6192 case $cross_compiling:$ac_tool_warned in
6193yes:)
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6195$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6196ac_tool_warned=yes ;;
6197esac
6198 READELF=$ac_ct_READELF
6199 fi
6200fi
6201
6202if test "$cross_compiling" = yes; then
6203 case "$READELF" in
6204 readelf|:)
6205 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6206 ;;
6207 esac
6208fi
6209
6210
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006213hp*|HP*)
6214 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215 if test -z "$INSTALL"
6216 then
6217 INSTALL="${srcdir}/install-sh -c"
6218 fi
6219esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220# Find a good install program. We prefer a C program (faster),
6221# so one script is as good as another. But avoid the broken or
6222# incompatible versions:
6223# SysV /etc/install, /usr/sbin/install
6224# SunOS /usr/etc/install
6225# IRIX /sbin/install
6226# AIX /bin/install
6227# AmigaOS /C/install, which installs bootblocks on floppy discs
6228# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6229# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6230# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6231# OS/2's system install, which has a completely different semantic
6232# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006233# Reject install programs that cannot install multiple files.
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6235$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006237if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006238 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239else
6240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6241for as_dir in $PATH
6242do
6243 IFS=$as_save_IFS
6244 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006245 # Account for people who put trailing slashes in PATH elements.
6246case $as_dir/ in #((
6247 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006248 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006249 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006250 /usr/ucb/* ) ;;
6251 *)
6252 # OSF1 and SCO ODT 3.0 have their own names for install.
6253 # Don't use installbsd from OSF since it installs stuff as root
6254 # by default.
6255 for ac_prog in ginstall scoinst install; do
6256 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006257 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258 if test $ac_prog = install &&
6259 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6260 # AIX install. It has an incompatible calling convention.
6261 :
6262 elif test $ac_prog = install &&
6263 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6264 # program-specific install script used by HP pwplus--don't use.
6265 :
6266 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006267 rm -rf conftest.one conftest.two conftest.dir
6268 echo one > conftest.one
6269 echo two > conftest.two
6270 mkdir conftest.dir
6271 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6272 test -s conftest.one && test -s conftest.two &&
6273 test -s conftest.dir/conftest.one &&
6274 test -s conftest.dir/conftest.two
6275 then
6276 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6277 break 3
6278 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279 fi
6280 fi
6281 done
6282 done
6283 ;;
6284esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006285
6286 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287IFS=$as_save_IFS
6288
Matthias Kloseb9621712010-04-24 17:59:49 +00006289rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290
6291fi
6292 if test "${ac_cv_path_install+set}" = set; then
6293 INSTALL=$ac_cv_path_install
6294 else
6295 # As a last resort, use the slow shell script. Don't cache a
6296 # value for INSTALL within a source directory, because that will
6297 # break other packages using the cache if that directory is
6298 # removed, or if the value is a relative name.
6299 INSTALL=$ac_install_sh
6300 fi
6301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6303$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006304
6305# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6306# It thinks the first close brace ends the variable substitution.
6307test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6308
6309test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6310
6311test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6312
Matthias Klose93a0ef12012-03-15 18:08:34 +01006313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6314$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6315if test -z "$MKDIR_P"; then
6316 if ${ac_cv_path_mkdir+:} false; then :
6317 $as_echo_n "(cached) " >&6
6318else
6319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6320for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6321do
6322 IFS=$as_save_IFS
6323 test -z "$as_dir" && as_dir=.
6324 for ac_prog in mkdir gmkdir; do
6325 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006326 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006327 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6328 'mkdir (GNU coreutils) '* | \
6329 'mkdir (coreutils) '* | \
6330 'mkdir (fileutils) '4.1*)
6331 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6332 break 3;;
6333 esac
6334 done
6335 done
6336 done
6337IFS=$as_save_IFS
6338
6339fi
6340
6341 test -d ./--version && rmdir ./--version
6342 if test "${ac_cv_path_mkdir+set}" = set; then
6343 MKDIR_P="$ac_cv_path_mkdir -p"
6344 else
6345 # As a last resort, use the slow shell script. Don't cache a
6346 # value for MKDIR_P within a source directory, because that will
6347 # break other packages using the cache if that directory is
6348 # removed, or if the value is a relative name.
6349 MKDIR_P="$ac_install_sh -d"
6350 fi
6351fi
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6353$as_echo "$MKDIR_P" >&6; }
6354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355
6356# Not every filesystem supports hard links
6357
6358if test -z "$LN" ; then
6359 case $ac_sys_system in
6360 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361 *) LN=ln;;
6362 esac
6363fi
6364
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006365# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006366
6367ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6371$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372
6373# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006374if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375 withval=$with_pydebug;
6376if test "$withval" != no
6377then
6378
Matthias Kloseb9621712010-04-24 17:59:49 +00006379$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380
Matthias Kloseb9621712010-04-24 17:59:49 +00006381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6382$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006384 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006385else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387fi
6388else
Matthias Kloseb9621712010-04-24 17:59:49 +00006389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006391fi
6392
6393
Victor Stinnerf4e47032019-04-25 00:56:28 +02006394# Check for --with-trace-refs
6395# --with-trace-refs
6396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6397$as_echo_n "checking for --with-trace-refs... " >&6; }
6398
6399# Check whether --with-trace-refs was given.
6400if test "${with_trace_refs+set}" = set; then :
6401 withval=$with_trace_refs;
6402else
6403 with_trace_refs=no
6404fi
6405
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6407$as_echo "$with_trace_refs" >&6; }
6408
6409if test "$with_trace_refs" = "yes"
6410then
6411
6412$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6413
6414fi
6415
6416# Check for --with-assertions.
6417# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006418assertions='false'
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6420$as_echo_n "checking for --with-assertions... " >&6; }
6421
6422# Check whether --with-assertions was given.
6423if test "${with_assertions+set}" = set; then :
6424 withval=$with_assertions;
6425if test "$withval" != no
6426then
6427 assertions='true'
6428fi
6429fi
6430
6431if test "$assertions" = 'true'; then
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6433$as_echo "yes" >&6; }
6434elif test "$Py_DEBUG" = 'true'; then
6435 assertions='true'
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6437$as_echo "implied by --with-pydebug" >&6; }
6438else
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6440$as_echo "no" >&6; }
6441fi
6442
Brett Cannon63d98bc2016-09-06 17:12:40 -07006443# Enable optimization flags
6444
6445
6446Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6448$as_echo_n "checking for --enable-optimizations... " >&6; }
6449# Check whether --enable-optimizations was given.
6450if test "${enable_optimizations+set}" = set; then :
6451 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006452if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006453then
6454 Py_OPT='true'
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6456$as_echo "yes" >&6; };
6457else
6458 Py_OPT='false'
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6460$as_echo "no" >&6; };
6461fi
6462else
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
6467if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006468 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6469 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006470 # 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 +00006471 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006472 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006473 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006474 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006475 case $CC in
6476 *gcc*)
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6478$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6479if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6480 $as_echo_n "(cached) " >&6
6481else
6482
6483 ax_check_save_flags=$CFLAGS
6484 CFLAGS="$CFLAGS -fno-semantic-interposition"
6485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6486/* end confdefs.h. */
6487
6488int
6489main ()
6490{
6491
6492 ;
6493 return 0;
6494}
6495_ACEOF
6496if ac_fn_c_try_compile "$LINENO"; then :
6497 ax_cv_check_cflags___fno_semantic_interposition=yes
6498else
6499 ax_cv_check_cflags___fno_semantic_interposition=no
6500fi
6501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6502 CFLAGS=$ax_check_save_flags
6503fi
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6505$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6506if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
6507
Pablo Galindob451b0e2020-10-21 22:46:52 +01006508 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6509 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006510
6511else
6512 :
6513fi
6514
Pablo Galindob451b0e2020-10-21 22:46:52 +01006515 ;;
6516 esac
6517
6518
Brett Cannon63d98bc2016-09-06 17:12:40 -07006519else
6520 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006521 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006522 DEF_MAKE_RULE="all"
6523fi
6524
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006525
6526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6527$as_echo_n "checking PROFILE_TASK... " >&6; }
6528if test -z "$PROFILE_TASK"
6529then
6530 PROFILE_TASK='-m test --pgo'
6531fi
6532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6533$as_echo "$PROFILE_TASK" >&6; }
6534
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006535# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6536# normal names in the default $PATH (ie: Ubuntu). They exist under the
6537# non-suffixed name in their versioned llvm directory.
6538
6539llvm_bin_dir=''
6540llvm_path="${PATH}"
6541if test "${CC}" = "clang"
6542then
6543 clang_bin=`which clang`
6544 # Some systems install clang elsewhere as a symlink to the real path
6545 # which is where the related llvm tools are located.
6546 if test -L "${clang_bin}"
6547 then
6548 clang_dir=`dirname "${clang_bin}"`
6549 clang_bin=`readlink "${clang_bin}"`
6550 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6551 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6552 fi
6553fi
6554
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006555# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6557$as_echo_n "checking for --with-lto... " >&6; }
6558
6559# Check whether --with-lto was given.
6560if test "${with_lto+set}" = set; then :
6561 withval=$with_lto;
6562if test "$withval" != no
6563then
6564 Py_LTO='true'
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6566$as_echo "yes" >&6; };
6567else
6568 Py_LTO='false'
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6570$as_echo "no" >&6; };
6571fi
6572else
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6574$as_echo "no" >&6; }
6575fi
6576
6577if test "$Py_LTO" = 'true' ; then
6578 case $CC in
6579 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006580
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006581 if test -n "$ac_tool_prefix"; then
6582 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6583set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6585$as_echo_n "checking for $ac_word... " >&6; }
6586if ${ac_cv_path_LLVM_AR+:} false; then :
6587 $as_echo_n "(cached) " >&6
6588else
6589 case $LLVM_AR in
6590 [\\/]* | ?:[\\/]*)
6591 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6592 ;;
6593 *)
6594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6595for as_dir in ${llvm_path}
6596do
6597 IFS=$as_save_IFS
6598 test -z "$as_dir" && as_dir=.
6599 for ac_exec_ext in '' $ac_executable_extensions; do
6600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6601 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6603 break 2
6604 fi
6605done
6606 done
6607IFS=$as_save_IFS
6608
6609 ;;
6610esac
6611fi
6612LLVM_AR=$ac_cv_path_LLVM_AR
6613if test -n "$LLVM_AR"; then
6614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6615$as_echo "$LLVM_AR" >&6; }
6616else
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6618$as_echo "no" >&6; }
6619fi
6620
6621
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006622fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006623if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006624 ac_pt_LLVM_AR=$LLVM_AR
6625 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006626set dummy llvm-ar; ac_word=$2
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6628$as_echo_n "checking for $ac_word... " >&6; }
6629if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6630 $as_echo_n "(cached) " >&6
6631else
6632 case $ac_pt_LLVM_AR in
6633 [\\/]* | ?:[\\/]*)
6634 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6635 ;;
6636 *)
6637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6638for as_dir in ${llvm_path}
6639do
6640 IFS=$as_save_IFS
6641 test -z "$as_dir" && as_dir=.
6642 for ac_exec_ext in '' $ac_executable_extensions; do
6643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6644 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6646 break 2
6647 fi
6648done
6649 done
6650IFS=$as_save_IFS
6651
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006652 ;;
6653esac
6654fi
6655ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6656if test -n "$ac_pt_LLVM_AR"; then
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6658$as_echo "$ac_pt_LLVM_AR" >&6; }
6659else
6660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6661$as_echo "no" >&6; }
6662fi
6663
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006664 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006665 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006666 else
6667 case $cross_compiling:$ac_tool_warned in
6668yes:)
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6671ac_tool_warned=yes ;;
6672esac
6673 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006674 fi
6675else
6676 LLVM_AR="$ac_cv_path_LLVM_AR"
6677fi
6678
6679
6680 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6681 then
6682 LLVM_AR_FOUND="found"
6683 else
6684 LLVM_AR_FOUND="not-found"
6685 fi
6686 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6687 then
6688 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6689 if test -n "${found_llvm_ar}"
6690 then
6691 LLVM_AR='/usr/bin/xcrun llvm-ar'
6692 LLVM_AR_FOUND=found
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6694$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6695 fi
6696 fi
6697 if test $LLVM_AR_FOUND = not-found
6698 then
6699 LLVM_PROFR_ERR=yes
6700 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6701 else
6702 LLVM_AR_ERR=no
6703 fi
6704 AR="${LLVM_AR}"
6705 case $ac_sys_system in
6706 Darwin*)
6707 # Any changes made here should be reflected in the GCC+Darwin case below
6708 LTOFLAGS="-flto -Wl,-export_dynamic"
6709 ;;
6710 *)
6711 LTOFLAGS="-flto"
6712 ;;
6713 esac
6714 ;;
6715 *gcc*)
6716 case $ac_sys_system in
6717 Darwin*)
6718 LTOFLAGS="-flto -Wl,-export_dynamic"
6719 ;;
6720 *)
6721 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6722 ;;
6723 esac
6724 ;;
6725 esac
6726
6727 if test "$ac_cv_prog_cc_g" = "yes"
6728 then
6729 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6730 # to get debug symbols.
6731 LTOFLAGS="$LTOFLAGS -g"
6732 fi
6733
stratakisf92c7aa2018-12-04 15:54:01 +01006734 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006735 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006736fi
6737
6738# Enable PGO flags.
6739
6740
6741
6742
6743
6744
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006745if test -n "$ac_tool_prefix"; then
6746 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6747set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6749$as_echo_n "checking for $ac_word... " >&6; }
6750if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6751 $as_echo_n "(cached) " >&6
6752else
6753 case $LLVM_PROFDATA in
6754 [\\/]* | ?:[\\/]*)
6755 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6756 ;;
6757 *)
6758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6759for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006760do
6761 IFS=$as_save_IFS
6762 test -z "$as_dir" && as_dir=.
6763 for ac_exec_ext in '' $ac_executable_extensions; do
6764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006765 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6767 break 2
6768 fi
6769done
6770 done
6771IFS=$as_save_IFS
6772
Gregory P. Smith799520c2016-09-07 16:10:00 -07006773 ;;
6774esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006775fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6777if test -n "$LLVM_PROFDATA"; then
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6779$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006780else
6781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6782$as_echo "no" >&6; }
6783fi
6784
6785
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006786fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006787if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006788 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6789 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006790set dummy llvm-profdata; ac_word=$2
6791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6792$as_echo_n "checking for $ac_word... " >&6; }
6793if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6794 $as_echo_n "(cached) " >&6
6795else
6796 case $ac_pt_LLVM_PROFDATA in
6797 [\\/]* | ?:[\\/]*)
6798 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6799 ;;
6800 *)
6801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6802for as_dir in ${llvm_path}
6803do
6804 IFS=$as_save_IFS
6805 test -z "$as_dir" && as_dir=.
6806 for ac_exec_ext in '' $ac_executable_extensions; do
6807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6808 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6810 break 2
6811 fi
6812done
6813 done
6814IFS=$as_save_IFS
6815
Gregory P. Smith799520c2016-09-07 16:10:00 -07006816 ;;
6817esac
6818fi
6819ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6820if test -n "$ac_pt_LLVM_PROFDATA"; then
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6822$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6823else
6824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6825$as_echo "no" >&6; }
6826fi
6827
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006828 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006829 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006830 else
6831 case $cross_compiling:$ac_tool_warned in
6832yes:)
6833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6835ac_tool_warned=yes ;;
6836esac
6837 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006838 fi
6839else
6840 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6841fi
6842
6843
6844if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6845then
6846 LLVM_PROF_FOUND="found"
6847else
6848 LLVM_PROF_FOUND="not-found"
6849fi
6850if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6851then
6852 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6853 if test -n "${found_llvm_profdata}"
6854 then
6855 # llvm-profdata isn't directly in $PATH in some cases.
6856 # https://apple.stackexchange.com/questions/197053/
6857 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6858 LLVM_PROF_FOUND=found
6859 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6860$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6861 fi
6862fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006863LLVM_PROF_ERR=no
6864case $CC in
6865 *clang*)
6866 # Any changes made here should be reflected in the GCC+Darwin case below
6867 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6868 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006869 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006870 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6871 if test $LLVM_PROF_FOUND = not-found
6872 then
6873 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006874 if test "${REQUIRE_PGO}" = "yes"
6875 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006876 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 -07006877 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006878 fi
6879 ;;
6880 *gcc*)
6881 case $ac_sys_system in
6882 Darwin*)
6883 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6884 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006885 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006886 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006887 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006888 then
6889 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006890 if test "${REQUIRE_PGO}" = "yes"
6891 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006892 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 -07006893 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006894 fi
6895 ;;
6896 *)
6897 PGO_PROF_GEN_FLAG="-fprofile-generate"
6898 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6899 LLVM_PROF_MERGER="true"
6900 LLVM_PROF_FILE=""
6901 ;;
6902 esac
6903 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006904 *icc*)
6905 PGO_PROF_GEN_FLAG="-prof-gen"
6906 PGO_PROF_USE_FLAG="-prof-use"
6907 LLVM_PROF_MERGER="true"
6908 LLVM_PROF_FILE=""
6909 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006910esac
6911
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6913# merged with this chunk of code?
6914
6915# Optimizer/debugger flags
6916# ------------------------
6917# (The following bit of code is complicated enough - please keep things
6918# indented properly. Just pretend you're editing Python code. ;-)
6919
6920# There are two parallel sets of case statements below, one that checks to
6921# see if OPT was set and one that does BASECFLAGS setting based upon
6922# compiler and platform. BASECFLAGS tweaks need to be made even if the
6923# user set OPT.
6924
Victor Stinner23a683a2019-04-12 21:27:37 +02006925case $CC in
6926 *clang*)
6927 cc_is_clang=1
6928 ;;
6929 *)
6930 if $CC --version 2>&1 | grep -q clang
6931 then
6932 cc_is_clang=1
6933 else
6934 cc_is_clang=
6935 fi
6936esac
6937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938# tweak OPT based on compiler and platform, only if the user didn't set
6939# it on the command line
6940
Victor Stinner9ed34a82017-05-02 22:35:58 +02006941
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006942if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006943then
6944 case $GCC in
6945 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6947 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6948 WRAP="-fwrapv"
6949 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006950
Victor Stinner35f3d242017-04-21 12:35:24 +02006951 if test -n "${cc_is_clang}"
6952 then
6953 # Clang also needs -fwrapv
6954 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006955 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6956 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006957 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006958 fi
6959
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006960 case $ac_cv_prog_cc_g in
6961 yes)
6962 if test "$Py_DEBUG" = 'true' ; then
6963 # Optimization messes up debuggers, so turn it off for
6964 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006965 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006966 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006967 else
Victor Stinner28205b22017-04-21 11:24:34 +02006968 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006969 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970 else
Victor Stinner28205b22017-04-21 11:24:34 +02006971 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972 fi
6973 ;;
6974 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006975 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976 ;;
6977 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006978
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979 case $ac_sys_system in
6980 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6981 ;;
6982 esac
6983 ;;
6984
6985 *)
6986 OPT="-O"
6987 ;;
6988 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989fi
6990
6991
6992
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006993
stratakiscf10a752018-12-19 18:19:01 +01006994
Ronald Oussoren41761932020-11-08 10:05:27 +01006995# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006996UNIVERSAL_ARCH_FLAGS=
6997
6998
6999# tweak BASECFLAGS based on compiler and platform
7000case $GCC in
7001yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007002 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007003
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7005$as_echo_n "checking for -Wextra... " >&6; }
7006 ac_save_cc="$CC"
7007 CC="$CC -Wextra -Werror"
7008 if ${ac_cv_extra_warnings+:} false; then :
7009 $as_echo_n "(cached) " >&6
7010else
7011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7012/* end confdefs.h. */
7013
7014
7015int
7016main ()
7017{
7018
7019 ;
7020 return 0;
7021}
7022
7023_ACEOF
7024if ac_fn_c_try_compile "$LINENO"; then :
7025
7026 ac_cv_extra_warnings=yes
7027
7028else
7029
7030 ac_cv_extra_warnings=no
7031
7032fi
7033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7034fi
7035
7036 CC="$ac_save_cc"
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7038$as_echo "$ac_cv_extra_warnings" >&6; }
7039
7040 if test $ac_cv_extra_warnings = yes
7041 then
7042 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7043 fi
7044
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007045 # Python doesn't violate C99 aliasing rules, but older versions of
7046 # GCC produce warnings for legal Python code. Enable
7047 # -fno-strict-aliasing on versions of GCC that support but produce
7048 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7050$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007051 ac_save_cc="$CC"
7052 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007053 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007054 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007056else
Matthias Kloseb9621712010-04-24 17:59:49 +00007057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007059
Matthias Kloseb159a552010-04-25 21:00:44 +00007060
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007061int
7062main ()
7063{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007064
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007065 ;
7066 return 0;
7067}
Matthias Kloseb159a552010-04-25 21:00:44 +00007068
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007070if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007071
7072 CC="$ac_save_cc -fstrict-aliasing"
7073 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007075/* end confdefs.h. */
7076
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007077 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007078int
7079main ()
7080{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007081double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007082 ;
7083 return 0;
7084}
Matthias Kloseb159a552010-04-25 21:00:44 +00007085
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007087if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007088
7089 ac_cv_no_strict_aliasing=no
7090
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007091else
Matthias Kloseb159a552010-04-25 21:00:44 +00007092
7093 ac_cv_no_strict_aliasing=yes
7094
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007095fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007097
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007098else
Matthias Kloseb159a552010-04-25 21:00:44 +00007099
7100 ac_cv_no_strict_aliasing=no
7101
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007102fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007104fi
7105
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007106 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007107 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7109$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007110 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007111 then
7112 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7113 fi
7114
Zachary Ware5af85642015-12-21 12:09:17 -06007115 # ICC doesn't recognize the option, but only emits a warning
7116 ## XXX does it emit an unused result warning and can it be disabled?
7117 case "$CC" in
7118 *icc*)
7119 ac_cv_disable_unused_result_warning=no
7120 ;;
7121 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7123$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7124 ac_save_cc="$CC"
7125 CC="$CC -Wunused-result -Werror"
7126 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007127 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007128 $as_echo_n "(cached) " >&6
7129else
7130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7131/* end confdefs.h. */
7132
7133
7134int
7135main ()
7136{
7137
7138 ;
7139 return 0;
7140}
7141
7142_ACEOF
7143if ac_fn_c_try_compile "$LINENO"; then :
7144
7145 ac_cv_disable_unused_result_warning=yes
7146
7147else
7148
7149 ac_cv_disable_unused_result_warning=no
7150
7151fi
7152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7153fi
7154
7155 CFLAGS="$save_CFLAGS"
7156 CC="$ac_save_cc"
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7158$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007159 ;;
7160 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007161
7162 if test $ac_cv_disable_unused_result_warning = yes
7163 then
7164 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007165 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7166 fi
7167
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7169$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7170 ac_save_cc="$CC"
7171 CC="$CC -Wunused-parameter -Werror"
7172 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7173 $as_echo_n "(cached) " >&6
7174else
7175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7176/* end confdefs.h. */
7177
7178
7179int
7180main ()
7181{
7182
7183 ;
7184 return 0;
7185}
7186
7187_ACEOF
7188if ac_fn_c_try_compile "$LINENO"; then :
7189
7190 ac_cv_disable_unused_parameter_warning=yes
7191
7192else
7193
7194 ac_cv_disable_unused_parameter_warning=no
7195
7196fi
7197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7198fi
7199
7200 CC="$ac_save_cc"
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7202$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7203
7204 if test $ac_cv_disable_unused_parameter_warning = yes
7205 then
7206 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7207 fi
7208
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7210$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7211 ac_save_cc="$CC"
7212 CC="$CC -Wmissing-field-initializers -Werror"
7213 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7214 $as_echo_n "(cached) " >&6
7215else
7216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7217/* end confdefs.h. */
7218
7219
7220int
7221main ()
7222{
7223
7224 ;
7225 return 0;
7226}
7227
7228_ACEOF
7229if ac_fn_c_try_compile "$LINENO"; then :
7230
7231 ac_cv_disable_missing_field_initializers=yes
7232
7233else
7234
7235 ac_cv_disable_missing_field_initializers=no
7236
7237fi
7238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7239fi
7240
7241 CC="$ac_save_cc"
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7243$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7244
7245 if test $ac_cv_disable_missing_field_initializers = yes
7246 then
7247 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007248 fi
7249
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7251$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7252 ac_save_cc="$CC"
7253 CC="$CC -Wsign-compare"
7254 save_CFLAGS="$CFLAGS"
7255 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7256 $as_echo_n "(cached) " >&6
7257else
7258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7259/* end confdefs.h. */
7260
7261
7262int
7263main ()
7264{
7265
7266 ;
7267 return 0;
7268}
7269
7270_ACEOF
7271if ac_fn_c_try_compile "$LINENO"; then :
7272
7273 ac_cv_enable_sign_compare_warning=yes
7274
7275else
7276
7277 ac_cv_enable_sign_compare_warning=no
7278
7279fi
7280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7281fi
7282
7283 CFLAGS="$save_CFLAGS"
7284 CC="$ac_save_cc"
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7286$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7287
7288 if test $ac_cv_enable_sign_compare_warning = yes
7289 then
7290 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7291 fi
7292
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7294$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7295 ac_save_cc="$CC"
7296 CC="$CC -Wunreachable-code"
7297 save_CFLAGS="$CFLAGS"
7298 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7299 $as_echo_n "(cached) " >&6
7300else
7301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7302/* end confdefs.h. */
7303
7304
7305int
7306main ()
7307{
7308
7309 ;
7310 return 0;
7311}
7312
7313_ACEOF
7314if ac_fn_c_try_compile "$LINENO"; then :
7315
7316 ac_cv_enable_unreachable_code_warning=yes
7317
7318else
7319
7320 ac_cv_enable_unreachable_code_warning=no
7321
7322fi
7323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7324fi
7325
7326 CFLAGS="$save_CFLAGS"
7327 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007328
7329 # Don't enable unreachable code warning in debug mode, since it usually
7330 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007331 # Issue #24324: Unfortunately, the unreachable code warning does not work
7332 # correctly on gcc and has been silently removed from the compiler.
7333 # It is supported on clang but on OS X systems gcc may be an alias
7334 # for clang. Try to determine if the compiler is not really gcc and,
7335 # if so, only then enable the warning.
7336 if test $ac_cv_enable_unreachable_code_warning = yes && \
7337 test "$Py_DEBUG" != "true" && \
7338 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007339 then
7340 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007341 else
7342 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007343 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7345$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007346
INADA Naokie3364842018-06-05 20:40:53 +09007347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7348$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7349 ac_save_cc="$CC"
7350 CC="$CC -Werror -Wstrict-prototypes"
7351 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7352 $as_echo_n "(cached) " >&6
7353else
7354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7355/* end confdefs.h. */
7356
7357
7358int
7359main ()
7360{
7361
7362 ;
7363 return 0;
7364}
7365
7366_ACEOF
7367if ac_fn_c_try_compile "$LINENO"; then :
7368
7369 ac_cv_enable_strict_prototypes_warning=yes
7370
7371else
7372
7373 ac_cv_enable_strict_prototypes_warning=no
7374
7375fi
7376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7377fi
7378
7379 CC="$ac_save_cc"
7380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7381$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7382
7383 if test $ac_cv_enable_strict_prototypes_warning = yes
7384 then
7385 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7386 fi
7387
Victor Stinner193ee0a2017-02-06 14:24:00 +01007388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7389$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7390 ac_save_cc="$CC"
7391 CC="$CC -Werror=implicit-function-declaration"
7392 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7393 $as_echo_n "(cached) " >&6
7394else
7395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7396/* end confdefs.h. */
7397
7398
7399int
7400main ()
7401{
7402
7403 ;
7404 return 0;
7405}
7406
7407_ACEOF
7408if ac_fn_c_try_compile "$LINENO"; then :
7409
7410 ac_cv_enable_implicit_function_declaration_error=yes
7411
7412else
7413
7414 ac_cv_enable_implicit_function_declaration_error=no
7415
7416fi
7417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7418fi
7419
7420 CC="$ac_save_cc"
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7422$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7423
7424 if test $ac_cv_enable_implicit_function_declaration_error = yes
7425 then
7426 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7427 fi
7428
Vinay Sajip0b60f642019-10-15 08:26:12 +01007429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7430$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7431 ac_save_cc="$CC"
7432 CC="$CC -fvisibility=hidden"
7433 if ${ac_cv_enable_visibility+:} false; then :
7434 $as_echo_n "(cached) " >&6
7435else
7436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7437/* end confdefs.h. */
7438
7439
7440int
7441main ()
7442{
7443
7444 ;
7445 return 0;
7446}
7447
7448_ACEOF
7449if ac_fn_c_try_compile "$LINENO"; then :
7450
7451 ac_cv_enable_visibility=yes
7452
7453else
7454
7455 ac_cv_enable_visibility=no
7456
7457fi
7458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7459fi
7460
7461 CC="$ac_save_cc"
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7463$as_echo "$ac_cv_enable_visibility" >&6; }
7464
7465 if test $ac_cv_enable_visibility = yes
7466 then
7467 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7468 fi
7469
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7471 # support. Without this, treatment of subnormals doesn't follow
7472 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007473 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474 alpha*)
7475 BASECFLAGS="$BASECFLAGS -mieee"
7476 ;;
7477 esac
7478
7479 case $ac_sys_system in
7480 SCO_SV*)
7481 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7482 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007483
Ned Deily87adb6e2013-10-18 21:09:56 -07007484 Darwin*)
7485 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7486 # used to be here, but non-Apple gcc doesn't accept them.
7487 if test "${CC}" = gcc
7488 then
7489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007490$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007491 case "${UNIVERSALSDK}" in
7492 */MacOSX10.4u.sdk)
7493 # Build using 10.4 SDK, force usage of gcc when the
7494 # compiler is gcc, otherwise the user will get very
7495 # confusing error messages when building on OSX 10.6
7496 CC=gcc-4.0
7497 CPP=cpp-4.0
7498 ;;
7499 esac
7500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007501$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007502 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503
Ned Deily87adb6e2013-10-18 21:09:56 -07007504 if test "${enable_universalsdk}"
7505 then
7506 case "$UNIVERSAL_ARCHS" in
7507 32-bit)
7508 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7509 LIPO_32BIT_FLAGS=""
7510 ARCH_RUN_32BIT=""
7511 ;;
7512 64-bit)
7513 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7514 LIPO_32BIT_FLAGS=""
7515 ARCH_RUN_32BIT="true"
7516 ;;
7517 all)
7518 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7519 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7520 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7521 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007522 universal2)
7523 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7524 LIPO_32BIT_FLAGS=""
7525 ARCH_RUN_32BIT="true"
7526 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007527 intel)
7528 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7529 LIPO_32BIT_FLAGS="-extract i386"
7530 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7531 ;;
7532 intel-32)
7533 UNIVERSAL_ARCH_FLAGS="-arch i386"
7534 LIPO_32BIT_FLAGS=""
7535 ARCH_RUN_32BIT=""
7536 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007537 intel-64)
7538 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7539 LIPO_32BIT_FLAGS=""
7540 ARCH_RUN_32BIT="true"
7541 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007542 3-way)
7543 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7544 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7545 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7546 ;;
7547 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007548 as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007549 ;;
7550 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551
Ned Deily87adb6e2013-10-18 21:09:56 -07007552 if test "${UNIVERSALSDK}" != "/"
7553 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007554 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7555 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007556 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007557 else
7558 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7559 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007560 fi
7561 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562
Ned Deily87adb6e2013-10-18 21:09:56 -07007563 # Calculate an appropriate deployment target for this build:
7564 # The deployment target value is used explicitly to enable certain
7565 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007566 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007567 # component of the string returned by distutils.get_platform().
7568 #
7569 # Use the value from:
7570 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7571 # 2. the operating system version of the build machine if >= 10.6
7572 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7573 # below to pick either 10.3, 10.4, or 10.5 as the target.
7574 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575
Ned Deily87adb6e2013-10-18 21:09:56 -07007576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7577$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007578 cur_target_major=`sw_vers -productVersion | \
7579 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7580 cur_target_minor=`sw_vers -productVersion | \
7581 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7582 cur_target="${cur_target_major}.${cur_target_minor}"
7583 if test ${cur_target_major} -eq 10 && \
7584 test ${cur_target_minor} -ge 3 && \
7585 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007586 then
Ned Deily36820b62014-06-25 13:44:22 -07007587 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007588 cur_target=10.3
7589 if test ${enable_universalsdk}
7590 then
7591 case "$UNIVERSAL_ARCHS" in
7592 all|3-way|intel|64-bit)
7593 # These configurations were first supported in 10.5
7594 cur_target='10.5'
7595 ;;
7596 esac
7597 else
7598 if test `/usr/bin/arch` = "i386"
7599 then
7600 # 10.4 was the first release to support Intel archs
7601 cur_target="10.4"
7602 fi
7603 fi
7604 fi
7605 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007606
Ned Deily87adb6e2013-10-18 21:09:56 -07007607 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7608 # environment with a value that is the same as what we'll use
7609 # in the Makefile to ensure that we'll get the same compiler
7610 # environment during configure and build time.
7611 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7612 export MACOSX_DEPLOYMENT_TARGET
7613 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7615$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007616
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7618$as_echo_n "checking if specified universal architectures work... " >&6; }
7619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7620/* end confdefs.h. */
7621#include <stdio.h>
7622int
7623main ()
7624{
7625printf("%d", 42);
7626 ;
7627 return 0;
7628}
7629_ACEOF
7630if ac_fn_c_try_link "$LINENO"; then :
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7632$as_echo "yes" >&6; }
7633else
7634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7635$as_echo "no" >&6; }
7636 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7637
7638fi
7639rm -f core conftest.err conftest.$ac_objext \
7640 conftest$ac_exeext conftest.$ac_ext
7641
Ned Deily87adb6e2013-10-18 21:09:56 -07007642 # end of Darwin* tests
7643 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644 esac
7645 ;;
7646
7647*)
7648 case $ac_sys_system in
7649 OpenUNIX*|UnixWare*)
7650 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7651 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652 SCO_SV*)
7653 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7654 ;;
7655 esac
7656 ;;
7657esac
7658
Zachary Ware5af85642015-12-21 12:09:17 -06007659case "$CC" in
7660*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007661 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007662 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7663 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007664*xlc*)
7665 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7666 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007667esac
7668
T. Woutersddbfa2c2017-05-23 01:30:49 +02007669if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670 :
7671else
7672 OPT="-DNDEBUG $OPT"
7673fi
7674
7675if test "$ac_arch_flags"
7676then
7677 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7678fi
7679
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680# On some compilers, pthreads are available without further options
7681# (e.g. MacOS X). On some of these systems, the compiler will not
7682# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7683# So we have to see first whether pthreads are available without
7684# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7686$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007687if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691 ac_cv_pthread_is_default=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
7712 ac_cv_pthread_is_default=yes
7713 ac_cv_kthread=no
7714 ac_cv_pthread=no
7715
7716else
Matthias Kloseb9621712010-04-24 17:59:49 +00007717 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721fi
7722
7723
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724fi
7725
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7727$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728
7729
7730if test $ac_cv_pthread_is_default = yes
7731then
7732 ac_cv_kpthread=no
7733else
7734# -Kpthread, if available, provides the right #defines
7735# and linker options to make pthread_create available
7736# Some compilers won't report that they do not support -Kpthread,
7737# so we need to run a program to see whether it really made the
7738# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7740$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007741if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743else
7744 ac_save_cc="$CC"
7745CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007746if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747 ac_cv_kpthread=no
7748else
Matthias Kloseb9621712010-04-24 17:59:49 +00007749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750/* end confdefs.h. */
7751
Stefan Krah7dba5942012-11-22 22:49:11 +01007752#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753#include <pthread.h>
7754
7755void* routine(void* p){return NULL;}
7756
7757int main(){
7758 pthread_t p;
7759 if(pthread_create(&p,NULL,routine,NULL)!=0)
7760 return 1;
7761 (void)pthread_detach(p);
7762 return 0;
7763}
7764
7765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007766if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767 ac_cv_kpthread=yes
7768else
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007773fi
7774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775CC="$ac_save_cc"
7776fi
7777
Matthias Kloseb9621712010-04-24 17:59:49 +00007778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7779$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780fi
7781
7782if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7783then
7784# -Kthread, if available, provides the right #defines
7785# and linker options to make pthread_create available
7786# Some compilers won't report that they do not support -Kthread,
7787# so we need to run a program to see whether it really made the
7788# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7790$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007791if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793else
7794 ac_save_cc="$CC"
7795CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007796if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007797 ac_cv_kthread=no
7798else
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007800/* end confdefs.h. */
7801
Stefan Krah7dba5942012-11-22 22:49:11 +01007802#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803#include <pthread.h>
7804
7805void* routine(void* p){return NULL;}
7806
7807int main(){
7808 pthread_t p;
7809 if(pthread_create(&p,NULL,routine,NULL)!=0)
7810 return 1;
7811 (void)pthread_detach(p);
7812 return 0;
7813}
7814
7815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007816if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007817 ac_cv_kthread=yes
7818else
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007823fi
7824
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825CC="$ac_save_cc"
7826fi
7827
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7829$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007830fi
7831
7832if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7833then
7834# -pthread, if available, provides the right #defines
7835# and linker options to make pthread_create available
7836# Some compilers won't report that they do not support -pthread,
7837# so we need to run a program to see whether it really made the
7838# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7840$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007841if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007843else
7844 ac_save_cc="$CC"
7845CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007846if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007847 ac_cv_pthread=no
7848else
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007850/* end confdefs.h. */
7851
Stefan Krah7dba5942012-11-22 22:49:11 +01007852#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007853#include <pthread.h>
7854
7855void* routine(void* p){return NULL;}
7856
7857int main(){
7858 pthread_t p;
7859 if(pthread_create(&p,NULL,routine,NULL)!=0)
7860 return 1;
7861 (void)pthread_detach(p);
7862 return 0;
7863}
7864
7865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007866if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007867 ac_cv_pthread=yes
7868else
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007873fi
7874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875CC="$ac_save_cc"
7876fi
7877
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7879$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007880fi
7881
7882# If we have set a CC compiler flag for thread support then
7883# check if it works for CXX, too.
7884ac_cv_cxx_thread=no
7885if test ! -z "$CXX"
7886then
Matthias Kloseb9621712010-04-24 17:59:49 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7888$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007889ac_save_cxx="$CXX"
7890
7891if test "$ac_cv_kpthread" = "yes"
7892then
7893 CXX="$CXX -Kpthread"
7894 ac_cv_cxx_thread=yes
7895elif test "$ac_cv_kthread" = "yes"
7896then
7897 CXX="$CXX -Kthread"
7898 ac_cv_cxx_thread=yes
7899elif test "$ac_cv_pthread" = "yes"
7900then
7901 CXX="$CXX -pthread"
7902 ac_cv_cxx_thread=yes
7903fi
7904
7905if test $ac_cv_cxx_thread = yes
7906then
7907 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7908 $CXX -c conftest.$ac_ext 2>&5
7909 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7910 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7911 then
7912 ac_cv_cxx_thread=yes
7913 else
7914 ac_cv_cxx_thread=no
7915 fi
7916 rm -fr conftest*
7917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7919$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007920fi
7921CXX="$ac_save_cxx"
7922
7923
7924# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7926$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007927if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007929else
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007931/* end confdefs.h. */
7932#include <stdlib.h>
7933#include <stdarg.h>
7934#include <string.h>
7935#include <float.h>
7936
7937int
7938main ()
7939{
7940
7941 ;
7942 return 0;
7943}
7944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007945if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007946 ac_cv_header_stdc=yes
7947else
Matthias Kloseb9621712010-04-24 17:59:49 +00007948 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007949fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7951
7952if test $ac_cv_header_stdc = yes; then
7953 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007955/* end confdefs.h. */
7956#include <string.h>
7957
7958_ACEOF
7959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 $EGREP "memchr" >/dev/null 2>&1; then :
7961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007962else
7963 ac_cv_header_stdc=no
7964fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007965rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007966
7967fi
7968
7969if test $ac_cv_header_stdc = yes; then
7970 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007972/* end confdefs.h. */
7973#include <stdlib.h>
7974
7975_ACEOF
7976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 $EGREP "free" >/dev/null 2>&1; then :
7978
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007979else
7980 ac_cv_header_stdc=no
7981fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007982rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007983
7984fi
7985
7986if test $ac_cv_header_stdc = yes; then
7987 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007989 :
7990else
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007992/* end confdefs.h. */
7993#include <ctype.h>
7994#include <stdlib.h>
7995#if ((' ' & 0x0FF) == 0x020)
7996# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7997# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7998#else
7999# define ISLOWER(c) \
8000 (('a' <= (c) && (c) <= 'i') \
8001 || ('j' <= (c) && (c) <= 'r') \
8002 || ('s' <= (c) && (c) <= 'z'))
8003# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8004#endif
8005
8006#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8007int
8008main ()
8009{
8010 int i;
8011 for (i = 0; i < 256; i++)
8012 if (XOR (islower (i), ISLOWER (i))
8013 || toupper (i) != TOUPPER (i))
8014 return 2;
8015 return 0;
8016}
8017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008018if ac_fn_c_try_run "$LINENO"; then :
8019
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008020else
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8024 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008025fi
8026
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008027fi
8028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8030$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008031if test $ac_cv_header_stdc = yes; then
8032
Matthias Kloseb9621712010-04-24 17:59:49 +00008033$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008034
8035fi
8036
stratakise768c862018-01-23 16:11:24 +01008037for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008038fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02008039ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07008040sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07008041utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01008042poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01008043sys/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 +01008044sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08008045sys/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 +01008046sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00008047sys/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 -07008048libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008049linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimescd9fed62020-11-13 19:48:52 +01008050sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8051sys/mman.h sys/eventfd.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008052do :
8053 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8054ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008055if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008057#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008058_ACEOF
8059
8060fi
8061
Guido van Rossum627b2d71993-12-24 10:39:16 +00008062done
8063
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008064ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008065for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8068$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008069if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008070 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00008071else
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008073/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008074#include <sys/types.h>
8075#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008076
Martin v. Löwis11437992002-04-12 09:54:03 +00008077int
8078main ()
8079{
8080if ((DIR *) 0)
8081return 0;
8082 ;
8083 return 0;
8084}
8085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008086if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093eval ac_res=\$$as_ac_Header
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8095$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008096if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008098#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008099_ACEOF
8100
8101ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008102fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008104done
8105# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8106if test $ac_header_dirent = dirent.h; then
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008111else
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 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 '' dir; 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"
Michael W. Hudson54241132001-12-07 15:38:26 +00008160
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008161fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008162
Michael W. Hudson54241132001-12-07 15:38:26 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8165$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008166if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008168else
8169 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173/* Override any GCC internal prototype to avoid an error.
8174 Use char because int might match the return type of a GCC
8175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008176#ifdef __cplusplus
8177extern "C"
8178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008179char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008180int
8181main ()
8182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008183return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 ;
8185 return 0;
8186}
8187_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188for ac_lib in '' x; do
8189 if test -z "$ac_lib"; then
8190 ac_res="none required"
8191 else
8192 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008193 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008195 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008198rm -f core conftest.err conftest.$ac_objext \
8199 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008200 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203done
Victor Stinnere0be4232011-10-25 13:06:09 +02008204if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206else
8207 ac_cv_search_opendir=no
8208fi
8209rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008210LIBS=$ac_func_search_save_LIBS
8211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8213$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008215if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008216 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008218fi
8219
8220fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8223$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008224if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008228/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008229#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008230int
8231main ()
8232{
8233return makedev(0, 0);
8234 ;
8235 return 0;
8236}
8237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008239 ac_cv_header_sys_types_h_makedev=yes
8240else
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008243rm -f core conftest.err conftest.$ac_objext \
8244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008245
8246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8248$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008249
8250if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008251ac_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 +02008252if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008253
Matthias Kloseb9621712010-04-24 17:59:49 +00008254$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008255
8256fi
8257
8258
8259
8260 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 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 +02008262if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008263
Matthias Kloseb9621712010-04-24 17:59:49 +00008264$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008265
8266fi
8267
8268
8269 fi
8270fi
8271
Michael W. Hudson54241132001-12-07 15:38:26 +00008272
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008273# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8274# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8275SAVE_CFLAGS=$CFLAGS
8276CFLAGS="-std=c99 $CFLAGS"
8277for ac_header in bluetooth/bluetooth.h
8278do :
8279 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8280if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8281 cat >>confdefs.h <<_ACEOF
8282#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8283_ACEOF
8284
8285fi
8286
8287done
8288
8289CFLAGS=$SAVE_CFLAGS
8290
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008291# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8292for ac_header in net/if.h
8293do :
8294 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8295#ifdef STDC_HEADERS
8296# include <stdlib.h>
8297# include <stddef.h>
8298#else
8299# ifdef HAVE_STDLIB_H
8300# include <stdlib.h>
8301# endif
8302#endif
8303#ifdef HAVE_SYS_SOCKET_H
8304# include <sys/socket.h>
8305#endif
8306
8307"
Victor Stinnere0be4232011-10-25 13:06:09 +02008308if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008309 cat >>confdefs.h <<_ACEOF
8310#define HAVE_NET_IF_H 1
8311_ACEOF
8312
8313fi
8314
8315done
8316
8317
Martin v. Löwis11017b12006-01-14 18:12:57 +00008318# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008319for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008320do :
8321 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 +00008322#ifdef HAVE_ASM_TYPES_H
8323#include <asm/types.h>
8324#endif
8325#ifdef HAVE_SYS_SOCKET_H
8326#include <sys/socket.h>
8327#endif
8328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329"
Victor Stinnere0be4232011-10-25 13:06:09 +02008330if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008332#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008333_ACEOF
8334
8335fi
8336
8337done
8338
8339
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008340# On Linux, qrtr.h requires asm/types.h
8341for ac_header in linux/qrtr.h
8342do :
8343 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8344#ifdef HAVE_ASM_TYPES_H
8345#include <asm/types.h>
8346#endif
8347#ifdef HAVE_SYS_SOCKET_H
8348#include <sys/socket.h>
8349#endif
8350
8351"
8352if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8353 cat >>confdefs.h <<_ACEOF
8354#define HAVE_LINUX_QRTR_H 1
8355_ACEOF
8356
8357fi
8358
8359done
8360
8361
caaveryeffc12f2017-09-06 18:18:10 -04008362for ac_header in linux/vm_sockets.h
8363do :
8364 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8365#ifdef HAVE_SYS_SOCKET_H
8366#include <sys/socket.h>
8367#endif
8368
8369"
8370if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8371 cat >>confdefs.h <<_ACEOF
8372#define HAVE_LINUX_VM_SOCKETS_H 1
8373_ACEOF
8374
8375fi
8376
8377done
8378
8379
karl ding360371f2020-04-29 15:31:19 -07008380# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8381for 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 +02008382do :
8383 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8384ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8385#ifdef HAVE_SYS_SOCKET_H
8386#include <sys/socket.h>
8387#endif
8388
8389"
8390if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8391 cat >>confdefs.h <<_ACEOF
8392#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8393_ACEOF
8394
8395fi
8396
8397done
8398
8399
Guido van Rossum627b2d71993-12-24 10:39:16 +00008400# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008401was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8403$as_echo_n "checking for clock_t in time.h... " >&6; }
8404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008405/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008406#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008407
8408_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008411 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008412else
Martin v. Löwis11437992002-04-12 09:54:03 +00008413
8414
Matthias Kloseb9621712010-04-24 17:59:49 +00008415$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008416
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008417
Guido van Rossum627b2d71993-12-24 10:39:16 +00008418fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008419rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008420
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8422$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008423
Matthias Kloseb9621712010-04-24 17:59:49 +00008424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8425$as_echo_n "checking for makedev... " >&6; }
8426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008427/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008428
Jesus Cea740f53a2010-04-28 11:35:30 +00008429#if defined(MAJOR_IN_MKDEV)
8430#include <sys/mkdev.h>
8431#elif defined(MAJOR_IN_SYSMACROS)
8432#include <sys/sysmacros.h>
8433#else
8434#include <sys/types.h>
8435#endif
8436
Neal Norwitz11690112002-07-30 01:08:28 +00008437int
8438main ()
8439{
Jesus Cea740f53a2010-04-28 11:35:30 +00008440
8441 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008442 ;
8443 return 0;
8444}
Matthias Kloseb159a552010-04-25 21:00:44 +00008445
Neal Norwitz11690112002-07-30 01:08:28 +00008446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008447if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008448 ac_cv_has_makedev=yes
8449else
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008452rm -f core conftest.err conftest.$ac_objext \
8453 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8455$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008456if test "$ac_cv_has_makedev" = "yes"; then
8457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008459
8460fi
8461
Christian Heimes985ecdc2013-11-20 11:46:18 +01008462# byte swapping
8463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8464$as_echo_n "checking for le64toh... " >&6; }
8465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8466/* end confdefs.h. */
8467
8468#ifdef HAVE_ENDIAN_H
8469#include <endian.h>
8470#elif defined(HAVE_SYS_ENDIAN_H)
8471#include <sys/endian.h>
8472#endif
8473
8474int
8475main ()
8476{
8477
8478 le64toh(1)
8479 ;
8480 return 0;
8481}
8482
8483_ACEOF
8484if ac_fn_c_try_link "$LINENO"; then :
8485 ac_cv_has_le64toh=yes
8486else
8487 ac_cv_has_le64toh=no
8488fi
8489rm -f core conftest.err conftest.$ac_objext \
8490 conftest$ac_exeext conftest.$ac_ext
8491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8492$as_echo "$ac_cv_has_le64toh" >&6; }
8493if test "$ac_cv_has_le64toh" = "yes"; then
8494
8495$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8496
8497fi
8498
Martin v. Löwis399a6892002-10-04 10:22:02 +00008499use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008500# Don't use largefile support for GNU/Hurd
8501case $ac_sys_system in GNU*)
8502 use_lfs=no
8503esac
8504
Martin v. Löwis399a6892002-10-04 10:22:02 +00008505if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008506# Two defines needed to enable largefile support on various platforms
8507# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008508case $ac_sys_system/$ac_sys_release in
8509AIX*)
8510
8511$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8512
8513 ;;
8514esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008515
Matthias Kloseb9621712010-04-24 17:59:49 +00008516$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008517
8518
Matthias Kloseb9621712010-04-24 17:59:49 +00008519$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008520
Martin v. Löwis399a6892002-10-04 10:22:02 +00008521fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008522
Guido van Rossum84e7b241996-08-19 21:59:00 +00008523# Add some code to confdefs.h so that the test for off_t works on SCO
8524cat >> confdefs.h <<\EOF
8525#if defined(SCO_DS)
8526#undef _OFF_T
8527#endif
8528EOF
8529
Guido van Rossumef2255b2000-03-10 22:30:29 +00008530# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008531ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008532if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008534else
Martin v. Löwis11437992002-04-12 09:54:03 +00008535
8536cat >>confdefs.h <<_ACEOF
8537#define mode_t int
8538_ACEOF
8539
8540fi
8541
Matthias Kloseb9621712010-04-24 17:59:49 +00008542ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008543if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008545else
Martin v. Löwis11437992002-04-12 09:54:03 +00008546
8547cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008549_ACEOF
8550
8551fi
8552
Matthias Kloseb9621712010-04-24 17:59:49 +00008553ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008554if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008555
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008556else
Martin v. Löwis11437992002-04-12 09:54:03 +00008557
8558cat >>confdefs.h <<_ACEOF
8559#define pid_t int
8560_ACEOF
8561
8562fi
8563
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008566#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008567_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008568
Matthias Kloseb9621712010-04-24 17:59:49 +00008569ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008570if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008571
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008572else
Martin v. Löwis11437992002-04-12 09:54:03 +00008573
8574cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008576_ACEOF
8577
8578fi
8579
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8581$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008582if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008584else
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008586/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008587#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008588
8589_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008592 ac_cv_type_uid_t=yes
8593else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008594 ac_cv_type_uid_t=no
8595fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008596rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008597
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8600$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008601if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008602
Matthias Kloseb9621712010-04-24 17:59:49 +00008603$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008604
8605
Matthias Kloseb9621712010-04-24 17:59:49 +00008606$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008607
8608fi
8609
Mark Dickinson983bc162012-12-02 12:11:38 +00008610
Matthias Kloseb9621712010-04-24 17:59:49 +00008611ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008612if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613
Matthias Kloseb9621712010-04-24 17:59:49 +00008614$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008615
8616fi
8617
Stefan Krah1919b7e2012-03-21 18:25:23 +01008618ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8619if test "x$ac_cv_type___uint128_t" = xyes; then :
8620
8621$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8622
8623fi
8624
Jack Jansendd19cf82001-12-06 22:36:17 +00008625
Michael W. Hudson54241132001-12-07 15:38:26 +00008626# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008627# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628# The cast to long int works around a bug in the HP C Compiler
8629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8631# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8633$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008634if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008636else
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 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 +00008638
Martin v. Löwis11437992002-04-12 09:54:03 +00008639else
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 if test "$ac_cv_type_int" = yes; then
8641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008643as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008644See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645 else
8646 ac_cv_sizeof_int=0
8647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008649
Martin v. Löwis11437992002-04-12 09:54:03 +00008650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8652$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653
8654
8655
Martin v. Löwis11437992002-04-12 09:54:03 +00008656cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008657#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008658_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008659
8660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661# The cast to long int works around a bug in the HP C Compiler
8662# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8663# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8664# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8666$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008667if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008669else
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 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 +00008671
Martin v. Löwis11437992002-04-12 09:54:03 +00008672else
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 if test "$ac_cv_type_long" = yes; then
8674 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008676as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008677See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678 else
8679 ac_cv_sizeof_long=0
8680 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682
Martin v. Löwis11437992002-04-12 09:54:03 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8685$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686
8687
8688
Martin v. Löwis11437992002-04-12 09:54:03 +00008689cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008690#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008691_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008692
8693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694# The cast to long int works around a bug in the HP C Compiler
8695# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8696# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8697# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8699$as_echo_n "checking size of long long... " >&6; }
8700if ${ac_cv_sizeof_long_long+:} false; then :
8701 $as_echo_n "(cached) " >&6
8702else
8703 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8704
8705else
8706 if test "$ac_cv_type_long_long" = yes; then
8707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8709as_fn_error 77 "cannot compute sizeof (long long)
8710See \`config.log' for more details" "$LINENO" 5; }
8711 else
8712 ac_cv_sizeof_long_long=0
8713 fi
8714fi
8715
8716fi
8717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8718$as_echo "$ac_cv_sizeof_long_long" >&6; }
8719
8720
8721
8722cat >>confdefs.h <<_ACEOF
8723#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8724_ACEOF
8725
8726
8727# The cast to long int works around a bug in the HP C Compiler
8728# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8729# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8730# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8732$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008733if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008735else
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 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 +00008737
Martin v. Löwis11437992002-04-12 09:54:03 +00008738else
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 if test "$ac_cv_type_void_p" = yes; then
8740 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008742as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008743See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744 else
8745 ac_cv_sizeof_void_p=0
8746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008748
Martin v. Löwis11437992002-04-12 09:54:03 +00008749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8751$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752
8753
8754
Martin v. Löwis11437992002-04-12 09:54:03 +00008755cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008756#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008757_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008758
8759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760# The cast to long int works around a bug in the HP C Compiler
8761# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8762# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8763# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8765$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008766if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008768else
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 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 +00008770
Martin v. Löwis11437992002-04-12 09:54:03 +00008771else
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 if test "$ac_cv_type_short" = yes; then
8773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008775as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008776See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777 else
8778 ac_cv_sizeof_short=0
8779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008781
Martin v. Löwis11437992002-04-12 09:54:03 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8784$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008785
8786
8787
Martin v. Löwis11437992002-04-12 09:54:03 +00008788cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008789#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008790_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008791
8792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793# The cast to long int works around a bug in the HP C Compiler
8794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8796# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8798$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008799if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008801else
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 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 +00008803
Martin v. Löwis11437992002-04-12 09:54:03 +00008804else
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 if test "$ac_cv_type_float" = yes; then
8806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008808as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008809See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810 else
8811 ac_cv_sizeof_float=0
8812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008814
Martin v. Löwis11437992002-04-12 09:54:03 +00008815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8817$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818
8819
8820
Martin v. Löwis11437992002-04-12 09:54:03 +00008821cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008822#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008823_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008824
8825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826# The cast to long int works around a bug in the HP C Compiler
8827# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8828# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8829# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8831$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008832if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008834else
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 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 +00008836
Martin v. Löwis11437992002-04-12 09:54:03 +00008837else
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 if test "$ac_cv_type_double" = yes; then
8839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008841as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008842See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843 else
8844 ac_cv_sizeof_double=0
8845 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008847
Martin v. Löwis11437992002-04-12 09:54:03 +00008848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8850$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851
8852
8853
Martin v. Löwis11437992002-04-12 09:54:03 +00008854cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008855#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008856_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008857
8858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859# The cast to long int works around a bug in the HP C Compiler
8860# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8861# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8862# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8864$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008865if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008867else
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 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 +00008869
Martin v. Löwis11437992002-04-12 09:54:03 +00008870else
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 if test "$ac_cv_type_fpos_t" = yes; then
8872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008874as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008875See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876 else
8877 ac_cv_sizeof_fpos_t=0
8878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008880
Martin v. Löwis11437992002-04-12 09:54:03 +00008881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8883$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884
8885
8886
Martin v. Löwis11437992002-04-12 09:54:03 +00008887cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008888#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008889_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008890
Michael W. Hudson54241132001-12-07 15:38:26 +00008891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892# The cast to long int works around a bug in the HP C Compiler
8893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8897$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008898if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008900else
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 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 +00008902
Martin v. Löwis18e16552006-02-15 17:27:45 +00008903else
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 if test "$ac_cv_type_size_t" = yes; then
8905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008907as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008908See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008909 else
8910 ac_cv_sizeof_size_t=0
8911 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913
Martin v. Löwis18e16552006-02-15 17:27:45 +00008914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8916$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917
8918
8919
Martin v. Löwis18e16552006-02-15 17:27:45 +00008920cat >>confdefs.h <<_ACEOF
8921#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8922_ACEOF
8923
8924
Christian Heimes400adb02008-02-01 08:12:03 +00008925# The cast to long int works around a bug in the HP C Compiler
8926# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8927# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8928# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8930$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008931if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008933else
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 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 +00008935
Christian Heimes400adb02008-02-01 08:12:03 +00008936else
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 if test "$ac_cv_type_pid_t" = yes; then
8938 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008940as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008941See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008942 else
8943 ac_cv_sizeof_pid_t=0
8944 fi
8945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008946
Christian Heimes400adb02008-02-01 08:12:03 +00008947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8949$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008950
8951
8952
8953cat >>confdefs.h <<_ACEOF
8954#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8955_ACEOF
8956
8957
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008958# The cast to long int works around a bug in the HP C Compiler
8959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8961# This bug is HP SR number 8606223364.
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8963$as_echo_n "checking size of uintptr_t... " >&6; }
8964if ${ac_cv_sizeof_uintptr_t+:} false; then :
8965 $as_echo_n "(cached) " >&6
8966else
8967 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8968
8969else
8970 if test "$ac_cv_type_uintptr_t" = yes; then
8971 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8973as_fn_error 77 "cannot compute sizeof (uintptr_t)
8974See \`config.log' for more details" "$LINENO" 5; }
8975 else
8976 ac_cv_sizeof_uintptr_t=0
8977 fi
8978fi
8979
8980fi
8981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8982$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8983
8984
8985
8986cat >>confdefs.h <<_ACEOF
8987#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8988_ACEOF
8989
8990
Michael W. Hudson54241132001-12-07 15:38:26 +00008991
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008992
Eitan Adler3055c942018-05-15 22:58:09 -07008993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8994$as_echo_n "checking for long double... " >&6; }
8995if ${ac_cv_type_long_double+:} false; then :
8996 $as_echo_n "(cached) " >&6
8997else
8998 if test "$GCC" = yes; then
8999 ac_cv_type_long_double=yes
9000 else
9001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9002/* end confdefs.h. */
9003/* The Stardent Vistra knows sizeof (long double), but does
9004 not support it. */
9005 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009006int
9007main ()
9008{
Eitan Adler3055c942018-05-15 22:58:09 -07009009static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
9010 sizeof (double) <= sizeof (long double))];
9011test_array [0] = 0;
9012return test_array [0];
9013
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009014 ;
9015 return 0;
9016}
9017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009018if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07009019 ac_cv_type_long_double=yes
9020else
9021 ac_cv_type_long_double=no
9022fi
9023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9024 fi
9025fi
9026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
9027$as_echo "$ac_cv_type_long_double" >&6; }
9028 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009029
Matthias Kloseb9621712010-04-24 17:59:49 +00009030$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009031
Eitan Adler3055c942018-05-15 22:58:09 -07009032 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009033
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009034# The cast to long int works around a bug in the HP C Compiler
9035# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9036# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9037# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9039$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009040if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009042else
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 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 +00009044
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009045else
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 if test "$ac_cv_type_long_double" = yes; then
9047 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9048$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009049as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009050See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009051 else
9052 ac_cv_sizeof_long_double=0
9053 fi
9054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009055
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9058$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009059
9060
9061
9062cat >>confdefs.h <<_ACEOF
9063#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9064_ACEOF
9065
9066
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009068# The cast to long int works around a bug in the HP C Compiler
9069# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9070# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9071# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9073$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009074if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00009076else
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 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 +00009078
Thomas Woutersb2137042007-02-01 18:02:27 +00009079else
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 if test "$ac_cv_type__Bool" = yes; then
9081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009083as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009084See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009085 else
9086 ac_cv_sizeof__Bool=0
9087 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009089
Thomas Woutersb2137042007-02-01 18:02:27 +00009090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9092$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009093
9094
9095
Thomas Woutersb2137042007-02-01 18:02:27 +00009096cat >>confdefs.h <<_ACEOF
9097#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9098_ACEOF
9099
9100
Thomas Woutersb2137042007-02-01 18:02:27 +00009101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009102# The cast to long int works around a bug in the HP C Compiler
9103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9105# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9107$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009108if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009110else
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009112#ifdef HAVE_SYS_TYPES_H
9113#include <sys/types.h>
9114#endif
9115
Matthias Kloseb9621712010-04-24 17:59:49 +00009116"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009117
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009118else
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 if test "$ac_cv_type_off_t" = yes; then
9120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009122as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009123See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009124 else
9125 ac_cv_sizeof_off_t=0
9126 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009128
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9131$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009132
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009133
9134
Martin v. Löwis11437992002-04-12 09:54:03 +00009135cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009136#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009137_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009138
Michael W. Hudson54241132001-12-07 15:38:26 +00009139
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009140
Matthias Kloseb9621712010-04-24 17:59:49 +00009141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9142$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009143if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009144 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9149$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009150else
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009153fi
9154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009155# The cast to long int works around a bug in the HP C Compiler
9156# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9157# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9158# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9160$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009161if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009162 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009163else
Matthias Kloseb9621712010-04-24 17:59:49 +00009164 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009165#ifdef HAVE_SYS_TYPES_H
9166#include <sys/types.h>
9167#endif
9168#ifdef HAVE_TIME_H
9169#include <time.h>
9170#endif
9171
Matthias Kloseb9621712010-04-24 17:59:49 +00009172"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009174else
Matthias Kloseb9621712010-04-24 17:59:49 +00009175 if test "$ac_cv_type_time_t" = yes; then
9176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009178as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009179See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009180 else
9181 ac_cv_sizeof_time_t=0
9182 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009184
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9187$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009188
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009189
9190
Martin v. Löwis11437992002-04-12 09:54:03 +00009191cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009192#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009193_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009194
Michael W. Hudson54241132001-12-07 15:38:26 +00009195
9196
Trent Mick635f6fb2000-08-23 21:33:05 +00009197# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009198ac_save_cc="$CC"
9199if test "$ac_cv_kpthread" = "yes"
9200then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009201elif test "$ac_cv_kthread" = "yes"
9202then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009203elif test "$ac_cv_pthread" = "yes"
9204then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009205fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009206
Matthias Kloseb9621712010-04-24 17:59:49 +00009207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9208$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009209have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009211/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009212
9213 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009214int
9215main ()
9216{
Guido van Rossum12580492000-09-24 16:47:19 +00009217pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 ;
9219 return 0;
9220}
Matthias Kloseb159a552010-04-25 21:00:44 +00009221
Martin v. Löwis11437992002-04-12 09:54:03 +00009222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009223if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009224 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9228$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009229if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009230 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009231# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9232# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9233# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9235$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009236if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009237 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009238else
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009240#ifdef HAVE_PTHREAD_H
9241#include <pthread.h>
9242#endif
9243
Matthias Kloseb9621712010-04-24 17:59:49 +00009244"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009245
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009246else
Matthias Kloseb9621712010-04-24 17:59:49 +00009247 if test "$ac_cv_type_pthread_t" = yes; then
9248 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009250as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009251See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009252 else
9253 ac_cv_sizeof_pthread_t=0
9254 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009256
Trent Mick635f6fb2000-08-23 21:33:05 +00009257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9259$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009260
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009261
9262
Martin v. Löwis11437992002-04-12 09:54:03 +00009263cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009264#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009265_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009267
Trent Mick635f6fb2000-08-23 21:33:05 +00009268fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009269
9270# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9271# This checking will be unnecessary after removing deprecated TLS API.
9272# The cast to long int works around a bug in the HP C Compiler
9273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9275# This bug is HP SR number 8606223364.
9276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9277$as_echo_n "checking size of pthread_key_t... " >&6; }
9278if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9279 $as_echo_n "(cached) " >&6
9280else
9281 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9282"; then :
9283
9284else
9285 if test "$ac_cv_type_pthread_key_t" = yes; then
9286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9288as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9289See \`config.log' for more details" "$LINENO" 5; }
9290 else
9291 ac_cv_sizeof_pthread_key_t=0
9292 fi
9293fi
9294
9295fi
9296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9297$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9298
9299
9300
9301cat >>confdefs.h <<_ACEOF
9302#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9303_ACEOF
9304
9305
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9307$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9308if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9310/* end confdefs.h. */
9311#include <pthread.h>
9312int
9313main ()
9314{
9315pthread_key_t k; k * 1;
9316 ;
9317 return 0;
9318}
9319_ACEOF
9320if ac_fn_c_try_compile "$LINENO"; then :
9321 ac_pthread_key_t_is_arithmetic_type=yes
9322else
9323 ac_pthread_key_t_is_arithmetic_type=no
9324
9325fi
9326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9328$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9329 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9330
9331$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9332
9333 fi
9334else
9335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9336$as_echo "no" >&6; }
9337fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009338CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009339
Michael W. Hudson54241132001-12-07 15:38:26 +00009340
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009341case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009342 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009343 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9344 ;;
9345 Darwin/*)
9346 OTHER_LIBTOOL_OPT=""
9347 ;;
9348esac
9349
9350
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009351
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009352case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009353 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009354 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9355 if test "${enable_universalsdk}"; then
9356 :
9357 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009358 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009359 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009360 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009361 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009362 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009363 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009364 if test ${gcc_version} '<' 4.0
9365 then
9366 LIBTOOL_CRUFT="-lcc_dynamic"
9367 else
9368 LIBTOOL_CRUFT=""
9369 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009370 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009371 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009372else
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009374/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009375
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009376 #include <unistd.h>
9377 int main(int argc, char*argv[])
9378 {
9379 if (sizeof(long) == 4) {
9380 return 0;
9381 } else {
9382 return 1;
9383 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009384 }
9385
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009387if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009388 ac_osx_32bit=yes
9389else
Matthias Kloseb9621712010-04-24 17:59:49 +00009390 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009394fi
9395
9396
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009397 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009398 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009399 i386)
9400 MACOSX_DEFAULT_ARCH="i386"
9401 ;;
9402 ppc)
9403 MACOSX_DEFAULT_ARCH="ppc"
9404 ;;
9405 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009406 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009407 ;;
9408 esac
9409 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009410 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009411 i386)
9412 MACOSX_DEFAULT_ARCH="x86_64"
9413 ;;
9414 ppc)
9415 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009416 ;;
9417 arm64)
9418 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009419 ;;
9420 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009421 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009422 ;;
9423 esac
9424
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009425 fi
9426
9427 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009428 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009429 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009430esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9432$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009433if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009434then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009435 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009437 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009438
Matthias Kloseb9621712010-04-24 17:59:49 +00009439$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009440
Matthias Kloseb9621712010-04-24 17:59:49 +00009441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9442$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009443 if test $enable_shared = "yes"
9444 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009445 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 +00009446 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009447else
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9449$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009450fi
9451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9453$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009454case $ac_sys_system/$ac_sys_release in
9455 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009456
Matthias Kloseb9621712010-04-24 17:59:49 +00009457$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009458
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9460$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009461 ;;
9462 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9464$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009465 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009466esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009467
Guido van Rossum0a516c91994-09-12 10:58:40 +00009468# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009469
Michael W. Hudson54241132001-12-07 15:38:26 +00009470
9471
9472
9473
Benjamin Peterson99f03762010-04-11 22:15:28 +00009474
Thomas Wouters477c8d52006-05-27 19:21:47 +00009475
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009476# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9477# -- usually .so, .sl on HP-UX, .dll on Cygwin
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9479$as_echo_n "checking the extension of shared libraries... " >&6; }
9480if test -z "$SHLIB_SUFFIX"; then
9481 case $ac_sys_system in
9482 hp*|HP*)
9483 case `uname -m` in
9484 ia64) SHLIB_SUFFIX=.so;;
9485 *) SHLIB_SUFFIX=.sl;;
9486 esac
9487 ;;
9488 CYGWIN*) SHLIB_SUFFIX=.dll;;
9489 *) SHLIB_SUFFIX=.so;;
9490 esac
9491fi
9492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9493$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009494
Guido van Rossum0a516c91994-09-12 10:58:40 +00009495# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009496# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009497# (Shared libraries in this instance are shared modules to be loaded into
9498# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9500$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009501if test -z "$LDSHARED"
9502then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009504 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009505 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009506 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009507 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009509 if test "$GCC" = "yes" ; then
9510 LDSHARED='$(CC) -shared'
9511 LDCXXSHARED='$(CXX) -shared'
9512 else
9513 LDSHARED='$(CC) -G'
9514 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009515 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009516 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009517 if test "$GCC" = "yes" ; then
9518 LDSHARED='$(CC) -shared'
9519 LDCXXSHARED='$(CXX) -shared'
9520 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009521 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009522 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009523 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009524 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009525 LDSHARED='$(CC) -bundle'
9526 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009527 if test "$enable_framework" ; then
9528 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009529 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9530 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009531 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009532 else
9533 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009534 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009535 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009536 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009537 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009538 LDSHARED='$(CC) -bundle'
9539 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009540 if test "$enable_framework" ; then
9541 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009542 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9543 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009544 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009545 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009546 # No framework, use the Python app as bundle-loader
9547 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009548 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009549 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009550 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009551 Darwin/*)
9552 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9553 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009554
Ned Deily36820b62014-06-25 13:44:22 -07009555 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9556 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9557 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9558 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9559 if test ${dep_target_major} -eq 10 && \
9560 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009561 then
Ned Deily36820b62014-06-25 13:44:22 -07009562 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009563 LDSHARED='$(CC) -bundle'
9564 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009565 if test "$enable_framework" ; then
9566 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009567 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9568 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009569 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009570 else
9571 # No framework, use the Python app as bundle-loader
9572 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9573 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009574 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009575 fi
Ned Deily36820b62014-06-25 13:44:22 -07009576 else
9577 # building for OS X 10.3 and later
9578 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9579 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9580 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009581 fi
9582 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009583 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009584 LDSHARED='$(CC) -shared'
9585 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009586 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009587 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009588 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009589 LDSHARED='$(CC) -shared'
9590 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009591 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009592 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009593 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009594 OpenBSD*)
9595 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9596 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009597 LDSHARED='$(CC) -shared $(CCSHARED)'
9598 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009599 else
9600 case `uname -r` in
9601 [01].* | 2.[0-7] | 2.[0-7].*)
9602 LDSHARED="ld -Bshareable ${LDFLAGS}"
9603 ;;
9604 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009605 LDSHARED='$(CC) -shared $(CCSHARED)'
9606 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009607 ;;
9608 esac
9609 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009610 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009611 LDSHARED='$(CC) -shared'
9612 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009613 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009614 if test "$GCC" = "yes" ; then
9615 LDSHARED='$(CC) -shared'
9616 LDCXXSHARED='$(CXX) -shared'
9617 else
9618 LDSHARED='$(CC) -G'
9619 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009620 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009621 SCO_SV*)
9622 LDSHARED='$(CC) -Wl,-G,-Bexport'
9623 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9624 CYGWIN*)
9625 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9626 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009627 *) LDSHARED="ld";;
9628 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9631$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009632LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009633BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009634# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009635# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9637$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009638if test -z "$CCSHARED"
9639then
Guido van Rossum07397971997-04-29 21:49:50 +00009640 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009641 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009642 then CCSHARED="-fPIC";
9643 elif test `uname -p` = sparc;
9644 then CCSHARED="-xcode=pic32";
9645 else CCSHARED="-Kpic";
9646 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009647 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009648 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009649 else CCSHARED="+z";
9650 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009651 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009652 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009653 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009654 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009655 if test "$GCC" = "yes"
9656 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009657 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009658 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009659 SCO_SV*)
9660 if test "$GCC" = "yes"
9661 then CCSHARED="-fPIC"
9662 else CCSHARED="-Kpic -belf"
9663 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009664 VxWorks*)
9665 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009666 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9669$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009670# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009671# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9673$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009674if test -z "$LINKFORSHARED"
9675then
Guido van Rossum07397971997-04-29 21:49:50 +00009676 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009677 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009678 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009679 LINKFORSHARED="-Wl,-E -Wl,+s";;
9680# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009681 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009682 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009683 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009685 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009686
9687 # Issue #18075: the default maximum stack size (8MBytes) is too
9688 # small for the default recursion limit. Increase the stack size
9689 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009690 # Note: This matches the value of THREAD_STACK_SIZE in
9691 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009692 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9693
Jack Jansene578a632001-08-15 01:27:14 +00009694 if test "$enable_framework"
9695 then
Jack Jansenda49e192005-01-07 13:08:22 +00009696 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009697 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009698 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009699 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009700 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009701 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009702 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009703 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9704 then
9705 LINKFORSHARED="-Wl,--export-dynamic"
9706 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009707 SunOS/5*) case $CC in
9708 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009709 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009710 then
9711 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009712 fi;;
9713 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009714 CYGWIN*)
9715 if test $enable_shared = "no"
9716 then
9717 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9718 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009719 QNX*)
9720 # -Wl,-E causes the symbols to be added to the dynamic
9721 # symbol table so that they can be found when a module
9722 # is loaded. -N 2048K causes the stack size to be set
9723 # to 2048 kilobytes so that the stack doesn't overflow
9724 # when running test_compile.py.
9725 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009726 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +08009727 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009728 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9731$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009732
Michael W. Hudson54241132001-12-07 15:38:26 +00009733
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009734
Matthias Kloseb9621712010-04-24 17:59:49 +00009735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9736$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009737if test ! "$LIBRARY" = "$LDLIBRARY"
9738then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009739 case $ac_sys_system in
9740 CYGWIN*)
9741 # Cygwin needs CCSHARED when building extension DLLs
9742 # but not when building the interpreter DLL.
9743 CFLAGSFORSHARED='';;
9744 *)
9745 CFLAGSFORSHARED='$(CCSHARED)'
9746 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9749$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009750
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009751# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9752# library (with --enable-shared).
9753# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009754# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9755# if it is not required, since it creates a dependency of the shared library
9756# to LIBS. This, in turn, means that applications linking the shared libpython
9757# don't need to link LIBS explicitly. The default should be only changed
9758# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009759
Matthias Kloseb9621712010-04-24 17:59:49 +00009760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9761$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009762case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009763 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009764 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009765esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9767$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009768
9769
Guido van Rossum627b2d71993-12-24 10:39:16 +00009770# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9772$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009773if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009774 $as_echo_n "(cached) " >&6
9775else
9776 ac_check_lib_save_LIBS=$LIBS
9777LIBS="-lsendfile $LIBS"
9778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9779/* end confdefs.h. */
9780
9781/* Override any GCC internal prototype to avoid an error.
9782 Use char because int might match the return type of a GCC
9783 builtin and then its argument prototype would still apply. */
9784#ifdef __cplusplus
9785extern "C"
9786#endif
9787char sendfile ();
9788int
9789main ()
9790{
9791return sendfile ();
9792 ;
9793 return 0;
9794}
9795_ACEOF
9796if ac_fn_c_try_link "$LINENO"; then :
9797 ac_cv_lib_sendfile_sendfile=yes
9798else
9799 ac_cv_lib_sendfile_sendfile=no
9800fi
9801rm -f core conftest.err conftest.$ac_objext \
9802 conftest$ac_exeext conftest.$ac_ext
9803LIBS=$ac_check_lib_save_LIBS
9804fi
9805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9806$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009807if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009808 cat >>confdefs.h <<_ACEOF
9809#define HAVE_LIBSENDFILE 1
9810_ACEOF
9811
9812 LIBS="-lsendfile $LIBS"
9813
9814fi
9815
Matthias Kloseb9621712010-04-24 17:59:49 +00009816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9817$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009818if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009820else
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009822LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826/* Override any GCC internal prototype to avoid an error.
9827 Use char because int might match the return type of a GCC
9828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009829#ifdef __cplusplus
9830extern "C"
9831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009832char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009833int
9834main ()
9835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ;
9838 return 0;
9839}
9840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009843else
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009846rm -f core conftest.err conftest.$ac_objext \
9847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009848LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9851$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009852if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 cat >>confdefs.h <<_ACEOF
9854#define HAVE_LIBDL 1
9855_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009856
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009857 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009858
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009859fi
9860 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9862$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009863if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009865else
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009867LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871/* Override any GCC internal prototype to avoid an error.
9872 Use char because int might match the return type of a GCC
9873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009874#ifdef __cplusplus
9875extern "C"
9876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009877char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009878int
9879main ()
9880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ;
9883 return 0;
9884}
9885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009888else
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009891rm -f core conftest.err conftest.$ac_objext \
9892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009893LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9896$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009897if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 cat >>confdefs.h <<_ACEOF
9899#define HAVE_LIBDLD 1
9900_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009901
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009902 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009904fi
9905 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009906
Michael Felt0d3ccb42017-12-30 22:39:20 +01009907# checks for uuid.h location
9908for ac_header in uuid/uuid.h uuid.h
9909do :
9910 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9911ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9912if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9913 cat >>confdefs.h <<_ACEOF
9914#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9915_ACEOF
9916
9917fi
9918
9919done
9920
9921
Berker Peksag9a10ff42017-11-08 23:09:16 +03009922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9923$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9925/* end confdefs.h. */
9926#include <uuid/uuid.h>
9927int
9928main ()
9929{
9930
9931#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009932void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009933#endif
9934
9935 ;
9936 return 0;
9937}
9938_ACEOF
9939if ac_fn_c_try_compile "$LINENO"; then :
9940
9941$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9942
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9944$as_echo "yes" >&6; }
9945else
9946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947$as_echo "no" >&6; }
9948
9949fi
9950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9951
Michael Felt0d3ccb42017-12-30 22:39:20 +01009952# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009953# FreeBSD and OpenBSD provides support as well
9954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9955$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9957/* end confdefs.h. */
9958#include <uuid.h>
9959int
9960main ()
9961{
9962
9963#ifndef uuid_create
9964void *x = uuid_create
9965#endif
9966
9967 ;
9968 return 0;
9969}
9970_ACEOF
9971if ac_fn_c_try_compile "$LINENO"; then :
9972
9973$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9974
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9976$as_echo "yes" >&6; }
9977else
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
9980
9981fi
9982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9983
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009984# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9985# stream in big-endian byte-order
9986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9987$as_echo_n "checking for uuid_enc_be... " >&6; }
9988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9989/* end confdefs.h. */
9990#include <uuid.h>
9991int
9992main ()
9993{
9994
9995#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009996void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009997#endif
9998
9999 ;
10000 return 0;
10001}
10002_ACEOF
10003if ac_fn_c_try_compile "$LINENO"; then :
10004
10005$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
10006
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10008$as_echo "yes" >&6; }
10009else
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
10012
10013fi
10014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10015
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010016# 'Real Time' functions on Solaris
10017# posix4 on Solaris 2.6
10018# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +030010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010020$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010021if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010022 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010023else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010024 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000010025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010028/* Override any GCC internal prototype to avoid an error.
10029 Use char because int might match the return type of a GCC
10030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010031#ifdef __cplusplus
10032extern "C"
10033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010034char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010035int
10036main ()
10037{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010039 ;
10040 return 0;
10041}
10042_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043for ac_lib in '' pthread rt posix4; do
10044 if test -z "$ac_lib"; then
10045 ac_res="none required"
10046 else
10047 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010048 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010051 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010053rm -f core conftest.err conftest.$ac_objext \
10054 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +020010055 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058done
Victor Stinnere0be4232011-10-25 13:06:09 +020010059if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010061else
10062 ac_cv_search_sem_init=no
10063fi
10064rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010065LIBS=$ac_func_search_save_LIBS
10066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10068$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +000010070if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010072
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010073fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010074
Martin v. Löwis519adae2003-09-20 10:47:47 +000010075
Martin v. Löwis19d17342003-06-14 21:03:05 +000010076# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10078$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010079if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000010081else
10082 ac_check_lib_save_LIBS=$LIBS
10083LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010085/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087/* Override any GCC internal prototype to avoid an error.
10088 Use char because int might match the return type of a GCC
10089 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010090#ifdef __cplusplus
10091extern "C"
10092#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010093char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010094int
10095main ()
10096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010098 ;
10099 return 0;
10100}
10101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010102if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010103 ac_cv_lib_intl_textdomain=yes
10104else
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010107rm -f core conftest.err conftest.$ac_objext \
10108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010109LIBS=$ac_check_lib_save_LIBS
10110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10112$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010113if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010114
Matthias Kloseb9621712010-04-24 17:59:49 +000010115$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010116
Brett Cannonc6d936e2009-06-07 20:09:53 +000010117 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010118fi
10119
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010120
10121# checks for system dependent C++ extensions support
10122case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10124$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010126/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010127
Georg Brandl59e87bd2011-02-15 19:48:59 +000010128 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010129int
10130main ()
10131{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010132loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 ;
10134 return 0;
10135}
Matthias Kloseb159a552010-04-25 21:00:44 +000010136
Martin v. Löwis11437992002-04-12 09:54:03 +000010137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010138if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010139
Matthias Kloseb159a552010-04-25 21:00:44 +000010140
Matthias Kloseb9621712010-04-24 17:59:49 +000010141$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010142
Matthias Kloseb159a552010-04-25 21:00:44 +000010143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010144$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010145
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010146else
Matthias Kloseb159a552010-04-25 21:00:44 +000010147
10148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010149$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010150
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010152rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010153 conftest$ac_exeext conftest.$ac_ext
10154# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10155# of the AIX system used to build/package Python executable. This tag serves
10156# as a baseline for bdist module packages
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10158$as_echo_n "checking for the system builddate... " >&6; }
10159 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10160
10161cat >>confdefs.h <<_ACEOF
10162#define AIX_BUILDDATE $AIX_BUILDDATE
10163_ACEOF
10164
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10166$as_echo "$AIX_BUILDDATE" >&6; }
10167 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010168 *) ;;
10169esac
10170
Christian Heimes985ecdc2013-11-20 11:46:18 +010010171# check for systems that require aligned memory access
10172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10173$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010174if ${ac_cv_aligned_required+:} false; then :
10175 $as_echo_n "(cached) " >&6
10176else
10177 if test "$cross_compiling" = yes; then :
10178 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010179else
10180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10181/* end confdefs.h. */
10182
10183int main()
10184{
10185 char s[16];
10186 int i, *p1, *p2;
10187 for (i=0; i < 16; i++)
10188 s[i] = i;
10189 p1 = (int*)(s+1);
10190 p2 = (int*)(s+2);
10191 if (*p1 == *p2)
10192 return 1;
10193 return 0;
10194}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010195_ACEOF
10196if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010197 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010198else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010199 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010200fi
10201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10202 conftest.$ac_objext conftest.beam conftest.$ac_ext
10203fi
10204
10205
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010206fi
10207
10208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10209$as_echo "$ac_cv_aligned_required" >&6; }
10210if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010211
10212$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10213
10214fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010215
10216# str, bytes and memoryview hash algorithm
10217
10218
10219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10220$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10221
10222# Check whether --with-hash_algorithm was given.
10223if test "${with_hash_algorithm+set}" = set; then :
10224 withval=$with_hash_algorithm;
10225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10226$as_echo "$withval" >&6; }
10227case "$withval" in
10228 siphash24)
10229 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10230
10231 ;;
10232 fnv)
10233 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10234
10235 ;;
10236 *)
10237 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10238 ;;
10239esac
10240
10241else
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10243$as_echo "default" >&6; }
10244fi
10245
10246
Paul Ganssle62972d92020-05-16 04:20:06 -040010247validate_tzpath() {
10248 # Checks that each element of hte path is an absolute path
10249 if test -z "$1"; then
10250 # Empty string is allowed: it indicates no system TZPATH
10251 return 0
10252 fi
10253
10254 # Bad paths are those that don't start with /
10255 if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
10256 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10257 return 1;
10258 fi
10259}
10260
10261TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10263$as_echo_n "checking for --with-tzpath... " >&6; }
10264
10265# Check whether --with-tzpath was given.
10266if test "${with_tzpath+set}" = set; then :
10267 withval=$with_tzpath;
10268case "$withval" in
10269 yes)
10270 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10271 ;;
10272 *)
10273 validate_tzpath "$withval"
10274 TZPATH="$withval"
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10276$as_echo "\"$withval\"" >&6; }
10277 ;;
10278esac
10279
10280else
10281 validate_tzpath "$TZPATH"
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10283$as_echo "\"$TZPATH\"" >&6; }
10284fi
10285
10286
10287
Charles-François Natalid30b0222014-05-08 23:08:51 +010010288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10289$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10290
10291# Check whether --with-address_sanitizer was given.
10292if test "${with_address_sanitizer+set}" = set; then :
10293 withval=$with_address_sanitizer;
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10295$as_echo "$withval" >&6; }
10296BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10297LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010298# ASan works by controlling memory allocation, our own malloc interferes.
10299with_pymalloc="no"
10300
10301else
10302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10303$as_echo "no" >&6; }
10304fi
10305
10306
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10308$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10309
10310# Check whether --with-memory_sanitizer was given.
10311if test "${with_memory_sanitizer+set}" = set; then :
10312 withval=$with_memory_sanitizer;
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10314$as_echo "$withval" >&6; }
10315BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10316LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10317# MSan works by controlling memory allocation, our own malloc interferes.
10318with_pymalloc="no"
10319
10320else
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10322$as_echo "no" >&6; }
10323fi
10324
10325
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10327$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10328
10329# Check whether --with-undefined_behavior_sanitizer was given.
10330if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10331 withval=$with_undefined_behavior_sanitizer;
10332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10333$as_echo "$withval" >&6; }
10334BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10335LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010336
10337else
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10339$as_echo "no" >&6; }
10340fi
10341
10342
Guido van Rossum70c7f481998-03-26 18:44:10 +000010343# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10345$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010346if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010348else
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010350LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354/* Override any GCC internal prototype to avoid an error.
10355 Use char because int might match the return type of a GCC
10356 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010357#ifdef __cplusplus
10358extern "C"
10359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010360char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010361int
10362main ()
10363{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 ;
10366 return 0;
10367}
10368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010371else
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010374rm -f core conftest.err conftest.$ac_objext \
10375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010376LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10379$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010380if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010381 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010382fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010383 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10385$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010386if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010388else
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010390LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394/* Override any GCC internal prototype to avoid an error.
10395 Use char because int might match the return type of a GCC
10396 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010397#ifdef __cplusplus
10398extern "C"
10399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010400char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010401int
10402main ()
10403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 ;
10406 return 0;
10407}
10408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010411else
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010414rm -f core conftest.err conftest.$ac_objext \
10415 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010416LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10419$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010420if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010421 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010422fi
10423 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010424
Matthias Kloseb9621712010-04-24 17:59:49 +000010425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10426$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010429if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10432$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010433LIBS="$withval $LIBS"
10434
10435else
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10437$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438fi
10439
Guido van Rossum7f43da71994-08-01 12:15:30 +000010440
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010441
10442
10443
10444
10445
10446
Victor Stinnerb477d192020-01-22 22:48:16 +010010447
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010448if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10449 if test -n "$ac_tool_prefix"; then
10450 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10451set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10453$as_echo_n "checking for $ac_word... " >&6; }
10454if ${ac_cv_path_PKG_CONFIG+:} false; then :
10455 $as_echo_n "(cached) " >&6
10456else
10457 case $PKG_CONFIG in
10458 [\\/]* | ?:[\\/]*)
10459 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10460 ;;
10461 *)
10462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10463for as_dir in $PATH
10464do
10465 IFS=$as_save_IFS
10466 test -z "$as_dir" && as_dir=.
10467 for ac_exec_ext in '' $ac_executable_extensions; do
10468 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10469 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10471 break 2
10472 fi
10473done
10474 done
10475IFS=$as_save_IFS
10476
10477 ;;
10478esac
10479fi
10480PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10481if test -n "$PKG_CONFIG"; then
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10483$as_echo "$PKG_CONFIG" >&6; }
10484else
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10486$as_echo "no" >&6; }
10487fi
10488
10489
10490fi
10491if test -z "$ac_cv_path_PKG_CONFIG"; then
10492 ac_pt_PKG_CONFIG=$PKG_CONFIG
10493 # Extract the first word of "pkg-config", so it can be a program name with args.
10494set dummy pkg-config; ac_word=$2
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10496$as_echo_n "checking for $ac_word... " >&6; }
10497if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10498 $as_echo_n "(cached) " >&6
10499else
10500 case $ac_pt_PKG_CONFIG in
10501 [\\/]* | ?:[\\/]*)
10502 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10503 ;;
10504 *)
10505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10506for as_dir in $PATH
10507do
10508 IFS=$as_save_IFS
10509 test -z "$as_dir" && as_dir=.
10510 for ac_exec_ext in '' $ac_executable_extensions; do
10511 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10512 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10514 break 2
10515 fi
10516done
10517 done
10518IFS=$as_save_IFS
10519
10520 ;;
10521esac
10522fi
10523ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10524if test -n "$ac_pt_PKG_CONFIG"; then
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10526$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10527else
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530fi
10531
10532 if test "x$ac_pt_PKG_CONFIG" = x; then
10533 PKG_CONFIG=""
10534 else
10535 case $cross_compiling:$ac_tool_warned in
10536yes:)
10537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10539ac_tool_warned=yes ;;
10540esac
10541 PKG_CONFIG=$ac_pt_PKG_CONFIG
10542 fi
10543else
10544 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10545fi
10546
10547fi
10548if test -n "$PKG_CONFIG"; then
10549 _pkg_min_version=0.9.0
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10551$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10552 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10554$as_echo "yes" >&6; }
10555 else
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10557$as_echo "no" >&6; }
10558 PKG_CONFIG=""
10559 fi
10560fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010561
10562# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10564$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010565
10566# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010567if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010568 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010569else
10570 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010571fi
10572
10573
Matthias Kloseb9621712010-04-24 17:59:49 +000010574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10575$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010576
10577# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10579$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010580
10581# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010582if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010583 withval=$with_system_ffi;
10584fi
10585
10586
Zachary Waref40d4dd2016-09-17 01:25:24 -050010587if test "$ac_sys_system" = "Darwin"
10588then
10589 case "$with_system_ffi" in
10590 "")
10591 with_system_ffi="no"
10592 ;;
10593 yes|no)
10594 ;;
10595 *)
10596 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10597 ;;
10598 esac
10599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10600$as_echo "$with_system_ffi" >&6; }
10601else
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10603$as_echo "yes" >&6; }
10604 if test "$with_system_ffi" != ""
10605 then
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10607$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10608 fi
10609 with_system_ffi="yes"
10610fi
Zachary Ware935043d2016-09-09 17:01:21 -070010611
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010612if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010613 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10614else
10615 LIBFFI_INCLUDEDIR=""
10616fi
10617
10618
Stefan Krah60187b52012-03-23 19:06:27 +010010619# Check for use of the system libmpdec library
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10621$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10622
10623# Check whether --with-system_libmpdec was given.
10624if test "${with_system_libmpdec+set}" = set; then :
10625 withval=$with_system_libmpdec;
10626else
10627 with_system_libmpdec="no"
10628fi
10629
10630
10631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10632$as_echo "$with_system_libmpdec" >&6; }
10633
Stefan Krah815280e2020-02-29 19:43:42 +010010634# Check whether _decimal should use a coroutine-local or thread-local context
10635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10636$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10637
10638# Check whether --with-decimal_contextvar was given.
10639if test "${with_decimal_contextvar+set}" = set; then :
10640 withval=$with_decimal_contextvar;
10641else
10642 with_decimal_contextvar="yes"
10643fi
10644
10645
10646if test "$with_decimal_contextvar" != "no"
10647then
10648
10649$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10650
10651fi
10652
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10654$as_echo "$with_decimal_contextvar" >&6; }
10655
Benjamin Peterson076ed002010-10-31 17:11:02 +000010656# Check for support for loadable sqlite extensions
10657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10658$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10659# Check whether --enable-loadable-sqlite-extensions was given.
10660if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10661 enableval=$enable_loadable_sqlite_extensions;
10662else
10663 enable_loadable_sqlite_extensions="no"
10664fi
10665
10666
10667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10668$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10669
Ned Deilyd819b932013-09-06 01:07:05 -070010670# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10671
10672
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10674$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10675
10676# Check whether --with-tcltk-includes was given.
10677if test "${with_tcltk_includes+set}" = set; then :
10678 withval=$with_tcltk_includes;
10679else
10680 with_tcltk_includes="default"
10681fi
10682
10683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10684$as_echo "$with_tcltk_includes" >&6; }
10685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10686$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10687
10688# Check whether --with-tcltk-libs was given.
10689if test "${with_tcltk_libs+set}" = set; then :
10690 withval=$with_tcltk_libs;
10691else
10692 with_tcltk_libs="default"
10693fi
10694
10695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10696$as_echo "$with_tcltk_libs" >&6; }
10697if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10698then
10699 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10700 then
10701 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10702 fi
10703 TCLTK_INCLUDES=""
10704 TCLTK_LIBS=""
10705else
10706 TCLTK_INCLUDES="$with_tcltk_includes"
10707 TCLTK_LIBS="$with_tcltk_libs"
10708fi
10709
Matthias Klose55708cc2009-04-30 08:06:49 +000010710# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10712$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010713
10714# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010715if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010716 withval=$with_dbmliborder;
10717if test x$with_dbmliborder = xyes
10718then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010719as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010720else
10721 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10722 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10723 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010724 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010725 fi
10726 done
10727fi
10728fi
10729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10731$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010732
Martin v. Löwis11437992002-04-12 09:54:03 +000010733# Templates for things AC_DEFINEd more than once.
10734# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010735
10736
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010737if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010738then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010739 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010741
10742 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010743 if test "$ac_sys_system" = "SunOS"; then
10744 CFLAGS="$CFLAGS -D_REENTRANT"
10745 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010746elif test "$ac_cv_kpthread" = "yes"
10747then
10748 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010749 if test "$ac_cv_cxx_thread" = "yes"; then
10750 CXX="$CXX -Kpthread"
10751 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010752 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010753elif test "$ac_cv_kthread" = "yes"
10754then
10755 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010756 if test "$ac_cv_cxx_thread" = "yes"; then
10757 CXX="$CXX -Kthread"
10758 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010759 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010760elif test "$ac_cv_pthread" = "yes"
10761then
10762 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010763 if test "$ac_cv_cxx_thread" = "yes"; then
10764 CXX="$CXX -pthread"
10765 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010766 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010767else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010768 if test ! -z "$withval" -a -d "$withval"
10769 then LDFLAGS="$LDFLAGS -L$withval"
10770 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010771
10772 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010773 # define _POSIX_THREADS in unistd.h. Some apparently don't
10774 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10776$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010778/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010779
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010780#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010781#ifdef _POSIX_THREADS
10782yes
10783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
10785_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010788 unistd_defines_pthreads=yes
10789else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010790 unistd_defines_pthreads=no
10791fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010792rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010793
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10795$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010796
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010798
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010799 # Just looking for pthread_create in libpthread is not enough:
10800 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10801 # So we really have to include pthread.h, and then link.
10802 _libs=$LIBS
10803 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10805$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010808
10809#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010810#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010811
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010812void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010813int
10814main ()
10815{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010816
10817pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 ;
10819 return 0;
10820}
10821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010822if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010823
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10825$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010826 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010827
Guido van Rossum02a1c402000-02-25 19:26:31 +000010828else
Martin v. Löwis11437992002-04-12 09:54:03 +000010829
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010830 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010832if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010833
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010834 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010835
Guido van Rossumad678af1998-10-02 14:42:15 +000010836else
Guido van Rossumad678af1998-10-02 14:42:15 +000010837
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10839$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010840if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010842else
Martin v. Löwis11437992002-04-12 09:54:03 +000010843 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010844LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010848/* Override any GCC internal prototype to avoid an error.
10849 Use char because int might match the return type of a GCC
10850 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010851#ifdef __cplusplus
10852extern "C"
10853#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010854char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010855int
10856main ()
10857{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010858return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010859 ;
10860 return 0;
10861}
10862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010863if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010864 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010865else
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010868rm -f core conftest.err conftest.$ac_objext \
10869 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010870LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10873$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010874if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010875
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010876 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010877 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010878
Greg Steinadf63d62000-07-05 10:38:09 +000010879else
Greg Steinadf63d62000-07-05 10:38:09 +000010880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10882$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010883if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010885else
Martin v. Löwis11437992002-04-12 09:54:03 +000010886 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010887LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891/* Override any GCC internal prototype to avoid an error.
10892 Use char because int might match the return type of a GCC
10893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010894#ifdef __cplusplus
10895extern "C"
10896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010897char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010898int
10899main ()
10900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010902 ;
10903 return 0;
10904}
10905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010906if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010908else
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010911rm -f core conftest.err conftest.$ac_objext \
10912 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010913LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10916$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010917if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010918
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010919 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010920 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010921
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010922else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10925$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010926if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010928else
Martin v. Löwis11437992002-04-12 09:54:03 +000010929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010930LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934/* Override any GCC internal prototype to avoid an error.
10935 Use char because int might match the return type of a GCC
10936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010937#ifdef __cplusplus
10938extern "C"
10939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010940char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010941int
10942main ()
10943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010944return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010945 ;
10946 return 0;
10947}
10948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010950 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010951else
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010954rm -f core conftest.err conftest.$ac_objext \
10955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010956LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10959$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010960if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010961
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010962 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010963 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010964
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010965else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10968$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010969if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010971else
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010973LIBS="-lcma $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 pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010984int
10985main ()
10986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010987return pthread_create ();
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_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010994else
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +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 Rossumb93a8621998-05-07 13:27:32 +000011000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
11002$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011003if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000011004
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011005 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011006 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011007
Guido van Rossumb93a8621998-05-07 13:27:32 +000011008else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011009
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011010 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
11011
Guido van Rossum2d38f911996-06-26 19:47:01 +000011012fi
11013
Guido van Rossum627b2d71993-12-24 10:39:16 +000011014
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011015fi
11016
Guido van Rossum0be3e491997-05-22 20:33:33 +000011017fi
11018
Guido van Rossum49545951997-12-02 19:28:29 +000011019fi
11020
Guido van Rossumb93a8621998-05-07 13:27:32 +000011021fi
11022
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011024rm -f core conftest.err conftest.$ac_objext \
11025 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11028$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011029if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011031else
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011033LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037/* Override any GCC internal prototype to avoid an error.
11038 Use char because int might match the return type of a GCC
11039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011040#ifdef __cplusplus
11041extern "C"
11042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011043char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011044int
11045main ()
11046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 ;
11049 return 0;
11050}
11051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011054else
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011057rm -f core conftest.err conftest.$ac_objext \
11058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011059LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11062$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011063if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011064
Martin v. Löwis130fb172001-07-19 11:00:41 +000011065 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011066
Guido van Rossum627b2d71993-12-24 10:39:16 +000011067fi
11068
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011069
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011070fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011071
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011072if test "$posix_threads" = "yes"; then
11073 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011074
Matthias Kloseb9621712010-04-24 17:59:49 +000011075$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011076
11077 fi
11078
11079 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11080 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011081 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011082$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011083
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011084 ;;
11085 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011086$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011087
11088 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011089 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011090$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011091
11092 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011093 esac
11094
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11096$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011097 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011099else
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011101 ac_cv_pthread_system_supported=no
11102else
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011104/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011105
11106 #include <stdio.h>
11107 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011108 void *foo(void *parm) {
11109 return NULL;
11110 }
11111 main() {
11112 pthread_attr_t attr;
11113 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011114 if (pthread_attr_init(&attr)) return (-1);
11115 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11116 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11117 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011118 }
11119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011120if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011121 ac_cv_pthread_system_supported=yes
11122else
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11126 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011127fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129
Guido van Rossum627b2d71993-12-24 10:39:16 +000011130fi
11131
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11133$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011134 if test "$ac_cv_pthread_system_supported" = "yes"; then
11135
Matthias Kloseb9621712010-04-24 17:59:49 +000011136$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011137
11138 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 for ac_func in pthread_sigmask
11140do :
11141 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011142if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011143 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011144#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011145_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011146 case $ac_sys_system in
11147 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011148
Matthias Kloseb9621712010-04-24 17:59:49 +000011149$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011150
11151 ;;
11152 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011153fi
11154done
11155
pdoxe14679c2017-10-05 00:01:56 -070011156 for ac_func in pthread_getcpuclockid
11157do :
11158 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11159if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11160 cat >>confdefs.h <<_ACEOF
11161#define HAVE_PTHREAD_GETCPUCLOCKID 1
11162_ACEOF
11163
11164fi
11165done
11166
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011167fi
11168
11169
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011170# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11173$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011175if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011176 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011177 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11179$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011180 ipv6=no
11181 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011182 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11183$as_echo "yes" >&6; }
11184 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011185
11186 ipv6=yes
11187 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011189else
Martin v. Löwis11437992002-04-12 09:54:03 +000011190
Matthias Kloseb9621712010-04-24 17:59:49 +000011191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011192/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011193 /* AF_INET6 available check */
11194#include <sys/types.h>
11195#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011196int
11197main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011198{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011199int domain = AF_INET6;
11200 ;
11201 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011202}
Martin v. Löwis11437992002-04-12 09:54:03 +000011203_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011204if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011205
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11207$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011208 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011209
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011210else
Matthias Kloseb159a552010-04-25 21:00:44 +000011211
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011214 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011215
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011216fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011218
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011219if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11221$as_echo_n "checking if RFC2553 API is available... " >&6; }
11222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011223/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011224
11225 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011226#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011227int
11228main ()
11229{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011230struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011231 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 ;
11233 return 0;
11234}
Matthias Kloseb159a552010-04-25 21:00:44 +000011235
Martin v. Löwis11437992002-04-12 09:54:03 +000011236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011238
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011241 ipv6=yes
11242
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011243else
Matthias Kloseb159a552010-04-25 21:00:44 +000011244
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011246$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011247 ipv6=no
11248
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011251fi
11252
11253if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011254 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011255
11256fi
11257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258fi
11259
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011260
11261ipv6type=unknown
11262ipv6lib=none
11263ipv6trylibc=no
11264
11265if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11267$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011268 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11269 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011270 case $i in
11271 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011274
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011275#include <netinet/in.h>
11276#ifdef IPV6_INRIA_VERSION
11277yes
11278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011279_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011282 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011283fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011284rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011285
11286 ;;
11287 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011290
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011291#include <netinet/in.h>
11292#ifdef __KAME__
11293yes
11294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011295_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011296if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011297 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011298 ipv6type=$i;
11299 ipv6lib=inet6
11300 ipv6libdir=/usr/local/v6/lib
11301 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011302fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011303rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304
11305 ;;
11306 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011309
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011310#include <features.h>
11311#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11312yes
11313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011314_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011317 ipv6type=$i;
11318 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011319fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011320rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011321
11322 ;;
11323 linux-inet6)
11324 if test -d /usr/inet6; then
11325 ipv6type=$i
11326 ipv6lib=inet6
11327 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011328 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011329 fi
11330 ;;
11331 solaris)
11332 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011333 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011334 ipv6type=$i
11335 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011336 fi
11337 fi
11338 ;;
11339 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011341/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011342
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011343#include <sys/param.h>
11344#ifdef _TOSHIBA_INET6
11345yes
11346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011347_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011350 ipv6type=$i;
11351 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011352 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011353fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011354rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011355
11356 ;;
11357 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011359/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011360
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011361#include </usr/local/v6/include/sys/v6config.h>
11362#ifdef __V6D__
11363yes
11364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011365_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011366if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011368 ipv6type=$i;
11369 ipv6lib=v6;
11370 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011371 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011372fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011373rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011374
11375 ;;
11376 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011379
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011380#include <sys/param.h>
11381#ifdef _ZETA_MINAMI_INET6
11382yes
11383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011384_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011387 ipv6type=$i;
11388 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011389 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011390fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011391rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011392
11393 ;;
11394 esac
11395 if test "$ipv6type" != "unknown"; then
11396 break
11397 fi
11398 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11400$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011401fi
11402
11403if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11404 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11405 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11406 echo "using lib$ipv6lib"
11407 else
11408 if test $ipv6trylibc = "yes"; then
11409 echo "using libc"
11410 else
11411 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11412 echo "You need to fetch lib$ipv6lib.a from appropriate"
11413 echo 'ipv6 kit and compile beforehand.'
11414 exit 1
11415 fi
11416 fi
11417fi
11418
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11420$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11422/* end confdefs.h. */
11423 /* CAN_RAW_FD_FRAMES available check */
11424#include <linux/can/raw.h>
11425int
11426main ()
11427{
11428int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433if ac_fn_c_try_compile "$LINENO"; then :
11434
11435
11436$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11437
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11439$as_echo "yes" >&6; }
11440
11441else
11442
11443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11444$as_echo "no" >&6; }
11445
11446fi
11447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11448
Zackery Spytz97e0de02020-04-09 06:03:49 -060011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11450$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11452/* end confdefs.h. */
11453
11454#include <linux/can/raw.h>
11455int
11456main ()
11457{
11458int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11459 ;
11460 return 0;
11461}
11462_ACEOF
11463if ac_fn_c_try_compile "$LINENO"; then :
11464
11465
11466$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11467
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11469$as_echo "yes" >&6; }
11470
11471else
11472
11473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11474$as_echo "no" >&6; }
11475
11476fi
11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11478
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011479# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11481$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011483# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011484if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485 withval=$with_doc_strings;
11486fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011487
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011488
11489if test -z "$with_doc_strings"
11490then with_doc_strings="yes"
11491fi
11492if test "$with_doc_strings" != "no"
11493then
11494
Matthias Kloseb9621712010-04-24 17:59:49 +000011495$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011496
11497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11499$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011500
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011501# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11503$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011506if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 withval=$with_pymalloc;
11508fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011509
Neil Schemenauera35c6882001-02-27 04:45:05 +000011510
Neil Schemenauer16c22972002-03-22 15:34:49 +000011511if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011512then
11513 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011514fi
11515if test "$with_pymalloc" != "no"
11516then
Martin v. Löwis11437992002-04-12 09:54:03 +000011517
Matthias Kloseb9621712010-04-24 17:59:49 +000011518$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011519
11520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11522$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011523
Nick Coghlan6ea41862017-06-11 13:16:15 +100011524# Check for --with-c-locale-coercion
11525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11526$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11527
11528# Check whether --with-c-locale-coercion was given.
11529if test "${with_c_locale_coercion+set}" = set; then :
11530 withval=$with_c_locale_coercion;
11531fi
11532
11533
11534if test -z "$with_c_locale_coercion"
11535then
11536 with_c_locale_coercion="yes"
11537fi
11538if test "$with_c_locale_coercion" != "no"
11539then
11540
11541$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11542
11543fi
11544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11545$as_echo "$with_c_locale_coercion" >&6; }
11546
Benjamin Peterson05159c42009-12-03 03:01:27 +000011547# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11549$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011550
11551# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011552if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011553 withval=$with_valgrind;
11554else
11555 with_valgrind=no
11556fi
11557
Matthias Kloseb9621712010-04-24 17:59:49 +000011558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11559$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011560if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 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 +020011562if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011565
11566else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011567 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011568
11569fi
11570
11571
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011572 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011573fi
11574
Łukasz Langaa785c872016-09-09 17:37:37 -070011575# Check for DTrace support
11576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11577$as_echo_n "checking for --with-dtrace... " >&6; }
11578
11579# Check whether --with-dtrace was given.
11580if test "${with_dtrace+set}" = set; then :
11581 withval=$with_dtrace;
11582else
11583 with_dtrace=no
11584fi
11585
11586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11587$as_echo "$with_dtrace" >&6; }
11588
11589
11590
11591
11592
11593DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011594DTRACE_HEADERS=
11595DTRACE_OBJS=
11596
11597if test "$with_dtrace" = "yes"
11598then
11599 # Extract the first word of "dtrace", so it can be a program name with args.
11600set dummy dtrace; ac_word=$2
11601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11602$as_echo_n "checking for $ac_word... " >&6; }
11603if ${ac_cv_path_DTRACE+:} false; then :
11604 $as_echo_n "(cached) " >&6
11605else
11606 case $DTRACE in
11607 [\\/]* | ?:[\\/]*)
11608 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11609 ;;
11610 *)
11611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11612for as_dir in $PATH
11613do
11614 IFS=$as_save_IFS
11615 test -z "$as_dir" && as_dir=.
11616 for ac_exec_ext in '' $ac_executable_extensions; do
11617 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11618 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11619 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11620 break 2
11621 fi
11622done
11623 done
11624IFS=$as_save_IFS
11625
11626 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11627 ;;
11628esac
11629fi
11630DTRACE=$ac_cv_path_DTRACE
11631if test -n "$DTRACE"; then
11632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11633$as_echo "$DTRACE" >&6; }
11634else
11635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11636$as_echo "no" >&6; }
11637fi
11638
11639
11640 if test "$DTRACE" = "not found"; then
11641 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11642 fi
11643
11644$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11645
11646 DTRACE_HEADERS="Include/pydtrace_probes.h"
11647
11648 # On OS X, DTrace providers do not need to be explicitly compiled and
11649 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11650 # generation flag '-G'. We check for presence of this flag, rather than
11651 # hardcoding support by OS, in the interest of robustness.
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11653$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11654if ${ac_cv_dtrace_link+:} false; then :
11655 $as_echo_n "(cached) " >&6
11656else
11657 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011658 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011659 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011660 ac_cv_dtrace_link=yes
11661
11662fi
11663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11664$as_echo "$ac_cv_dtrace_link" >&6; }
11665 if test "$ac_cv_dtrace_link" = "yes"; then
11666 DTRACE_OBJS="Python/pydtrace.o"
11667 fi
11668fi
11669
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011670# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011671
Guido van Rossum98935bf2001-09-05 19:13:16 +000011672DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011673
Guido van Rossume97ee181999-12-20 21:27:22 +000011674# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011675# platforms have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011676for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011677do :
11678 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011679if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011681#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011682_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011683
Guido van Rossume97ee181999-12-20 21:27:22 +000011684fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011685done
Guido van Rossume97ee181999-12-20 21:27:22 +000011686
Michael W. Hudson54241132001-12-07 15:38:26 +000011687
Guido van Rossume97ee181999-12-20 21:27:22 +000011688# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11689# loading of modules.
11690
Matthias Kloseb9621712010-04-24 17:59:49 +000011691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11692$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011693if test -z "$DYNLOADFILE"
11694then
11695 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011696 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011697 *)
11698 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11699 # out any dynamic loading
11700 if test "$ac_cv_func_dlopen" = yes
11701 then DYNLOADFILE="dynload_shlib.o"
11702 else DYNLOADFILE="dynload_stub.o"
11703 fi
11704 ;;
11705 esac
11706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11708$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011709if test "$DYNLOADFILE" != "dynload_stub.o"
11710then
Martin v. Löwis11437992002-04-12 09:54:03 +000011711
Matthias Kloseb9621712010-04-24 17:59:49 +000011712$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011713
11714fi
11715
Neil Schemenauer4e425612001-06-19 15:44:15 +000011716# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11717
Michael W. Hudson54241132001-12-07 15:38:26 +000011718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11720$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011721if test -z "$MACHDEP_OBJS"
11722then
Jack Jansene578a632001-08-15 01:27:14 +000011723 MACHDEP_OBJS=$extra_machdep_objs
11724else
11725 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011726fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011727if test -z "$MACHDEP_OBJS"; then
11728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11729$as_echo "none" >&6; }
11730else
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11732$as_echo "$MACHDEP_OBJS" >&6; }
11733fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011734
Guido van Rossum627b2d71993-12-24 10:39:16 +000011735# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011736for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Kyle Evans1800c602020-10-11 15:18:53 -050011737 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11738 explicit_memset faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011739 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011740 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011741 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011742 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011743 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011744 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011745 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011746 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011747 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011748 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011749 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011750 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011751 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011752 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011753 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011754 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11755 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011756 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Pablo Galindoa57b3d32020-11-17 00:00:38 +000011757 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011758 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Alexey Izbyshev976da902020-10-24 03:47:01 +030011759 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011760 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011761do :
11762 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11763ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011764if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011765 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011766#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011767_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011768
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011769fi
11770done
11771
Michael W. Hudson54241132001-12-07 15:38:26 +000011772
Benjamin Peterson40caa052018-09-12 15:52:40 -070011773# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11774# links. Some libc implementations have a stub lchmod implementation that always
11775# returns an error.
11776if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011777 for ac_func in lchmod
11778do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011779 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11780if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011781 cat >>confdefs.h <<_ACEOF
11782#define HAVE_LCHMOD 1
11783_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011784
11785fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011786done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011787
11788fi
11789
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011790ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11791 #include <dirent.h>
11792"
11793if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11794
11795$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11796
11797fi
11798
11799
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011800# For some functions, having a definition is not sufficient, since
11801# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11803$as_echo_n "checking for chroot... " >&6; }
11804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011805/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011806#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011807int
11808main ()
11809{
11810void *x=chroot
11811 ;
11812 return 0;
11813}
11814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011818
Matthias Kloseb159a552010-04-25 21:00:44 +000011819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011820$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011821else
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11823$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011824
11825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11828$as_echo_n "checking for link... " >&6; }
11829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011830/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011831#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011832int
11833main ()
11834{
11835void *x=link
11836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011841
Matthias Kloseb9621712010-04-24 17:59:49 +000011842$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011843
Matthias Kloseb159a552010-04-25 21:00:44 +000011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011845$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011846else
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11848$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011849
11850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11853$as_echo_n "checking for symlink... " >&6; }
11854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011855/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011856#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011857int
11858main ()
11859{
11860void *x=symlink
11861 ;
11862 return 0;
11863}
11864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011866
Matthias Kloseb9621712010-04-24 17:59:49 +000011867$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011868
Matthias Kloseb159a552010-04-25 21:00:44 +000011869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011870$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011874
11875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11878$as_echo_n "checking for fchdir... " >&6; }
11879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011880/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011881#include <unistd.h>
11882int
11883main ()
11884{
11885void *x=fchdir
11886 ;
11887 return 0;
11888}
11889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011893
Matthias Kloseb159a552010-04-25 21:00:44 +000011894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011895$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011896else
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11898$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011899
11900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11903$as_echo_n "checking for fsync... " >&6; }
11904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011905/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011906#include <unistd.h>
11907int
11908main ()
11909{
11910void *x=fsync
11911 ;
11912 return 0;
11913}
11914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011915if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011918
Matthias Kloseb159a552010-04-25 21:00:44 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011920$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11923$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011924
11925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11928$as_echo_n "checking for fdatasync... " >&6; }
11929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011930/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011931#include <unistd.h>
11932int
11933main ()
11934{
11935void *x=fdatasync
11936 ;
11937 return 0;
11938}
11939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011943
Matthias Kloseb159a552010-04-25 21:00:44 +000011944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011945$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011946else
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11948$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011949
11950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11953$as_echo_n "checking for epoll... " >&6; }
11954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011955/* end confdefs.h. */
11956#include <sys/epoll.h>
11957int
11958main ()
11959{
11960void *x=epoll_create
11961 ;
11962 return 0;
11963}
11964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011965if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011968
Matthias Kloseb159a552010-04-25 21:00:44 +000011969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011970$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011971else
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11973$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011974
11975fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11978$as_echo_n "checking for epoll_create1... " >&6; }
11979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11980/* end confdefs.h. */
11981#include <sys/epoll.h>
11982int
11983main ()
11984{
11985void *x=epoll_create1
11986 ;
11987 return 0;
11988}
11989_ACEOF
11990if ac_fn_c_try_compile "$LINENO"; then :
11991
11992$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11993
11994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11995$as_echo "yes" >&6; }
11996else
11997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11998$as_echo "no" >&6; }
11999
12000fi
12001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
12003$as_echo_n "checking for kqueue... " >&6; }
12004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012005/* end confdefs.h. */
12006
12007#include <sys/types.h>
12008#include <sys/event.h>
12009
12010int
12011main ()
12012{
12013int x=kqueue()
12014 ;
12015 return 0;
12016}
12017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012018if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012021
Matthias Kloseb159a552010-04-25 21:00:44 +000012022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012024else
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12026$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012027
12028fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12031$as_echo_n "checking for prlimit... " >&6; }
12032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12033/* end confdefs.h. */
12034
12035#include <sys/time.h>
12036#include <sys/resource.h>
12037
12038int
12039main ()
12040{
12041void *x=prlimit
12042 ;
12043 return 0;
12044}
12045_ACEOF
12046if ac_fn_c_try_compile "$LINENO"; then :
12047
12048$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
12049
12050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12051$as_echo "yes" >&6; }
12052else
12053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
12055
12056fi
12057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren41761932020-11-08 10:05:27 +010012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12059$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
12060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12061/* end confdefs.h. */
12062#include <mach-o/dyld.h>
12063int
12064main ()
12065{
12066void *x=_dyld_shared_cache_contains_path
12067 ;
12068 return 0;
12069}
12070_ACEOF
12071if ac_fn_c_try_compile "$LINENO"; then :
12072
12073$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
12074
12075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12076$as_echo "yes" >&6; }
12077else
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12079$as_echo "no" >&6; }
12080
12081fi
12082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012083
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12085$as_echo_n "checking for memfd_create... " >&6; }
12086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12087/* end confdefs.h. */
12088
12089#ifdef HAVE_SYS_MMAN_H
12090#include <sys/mman.h>
12091#endif
12092#ifdef HAVE_SYS_MEMFD_H
12093#include <sys/memfd.h>
12094#endif
12095
12096int
12097main ()
12098{
12099void *x=memfd_create
12100 ;
12101 return 0;
12102}
12103_ACEOF
12104if ac_fn_c_try_compile "$LINENO"; then :
12105
12106$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12107
12108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12109$as_echo "yes" >&6; }
12110else
12111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12112$as_echo "no" >&6; }
12113
12114fi
12115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12116
Christian Heimescd9fed62020-11-13 19:48:52 +010012117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12118$as_echo_n "checking for eventfd... " >&6; }
12119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12120/* end confdefs.h. */
12121
12122#ifdef HAVE_SYS_EVENTFD_H
12123#include <sys/eventfd.h>
12124#endif
12125
12126int
12127main ()
12128{
12129int x = eventfd(0, EFD_CLOEXEC)
12130 ;
12131 return 0;
12132}
12133_ACEOF
12134if ac_fn_c_try_compile "$LINENO"; then :
12135
12136$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
12137
12138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12139$as_echo "yes" >&6; }
12140else
12141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12142$as_echo "no" >&6; }
12143
12144fi
12145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12146
Martin v. Löwisd5843682002-11-21 20:41:28 +000012147# On some systems (eg. FreeBSD 5), we would find a definition of the
12148# functions ctermid_r, setgroups in the library, but no prototype
12149# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12150# address to avoid compiler warnings and potential miscompilations
12151# because of the missing prototypes.
12152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12154$as_echo_n "checking for ctermid_r... " >&6; }
12155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012156/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012157
Martin v. Löwisd5843682002-11-21 20:41:28 +000012158#include <stdio.h>
12159
Martin v. Löwisd5843682002-11-21 20:41:28 +000012160int
12161main ()
12162{
12163void* p = ctermid_r
12164 ;
12165 return 0;
12166}
12167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012168if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012169
Matthias Kloseb9621712010-04-24 17:59:49 +000012170$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012171
Matthias Kloseb159a552010-04-25 21:00:44 +000012172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012173$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012174else
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12176$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012177
12178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12180
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12182$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012183if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012184 $as_echo_n "(cached) " >&6
12185else
12186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012187/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012188#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012189int
12190main ()
12191{
12192void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012193
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012194 ;
12195 return 0;
12196}
12197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012198if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012199 ac_cv_flock_decl=yes
12200else
12201 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012202
12203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012205
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012206fi
12207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12208$as_echo "$ac_cv_flock_decl" >&6; }
12209if test "x${ac_cv_flock_decl}" = xyes; then
12210 for ac_func in flock
12211do :
12212 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012213if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012214 cat >>confdefs.h <<_ACEOF
12215#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012216_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012217
Antoine Pitroua3000072010-09-07 14:52:42 +000012218else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012220$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012222 $as_echo_n "(cached) " >&6
12223else
12224 ac_check_lib_save_LIBS=$LIBS
12225LIBS="-lbsd $LIBS"
12226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12227/* end confdefs.h. */
12228
12229/* Override any GCC internal prototype to avoid an error.
12230 Use char because int might match the return type of a GCC
12231 builtin and then its argument prototype would still apply. */
12232#ifdef __cplusplus
12233extern "C"
12234#endif
12235char flock ();
12236int
12237main ()
12238{
12239return flock ();
12240 ;
12241 return 0;
12242}
12243_ACEOF
12244if ac_fn_c_try_link "$LINENO"; then :
12245 ac_cv_lib_bsd_flock=yes
12246else
12247 ac_cv_lib_bsd_flock=no
12248fi
12249rm -f core conftest.err conftest.$ac_objext \
12250 conftest$ac_exeext conftest.$ac_ext
12251LIBS=$ac_check_lib_save_LIBS
12252fi
12253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12254$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012255if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012256 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012257
12258
12259$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12260
12261
12262fi
12263
12264
12265fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012266done
12267
Antoine Pitroua3000072010-09-07 14:52:42 +000012268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12271$as_echo_n "checking for getpagesize... " >&6; }
12272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012273/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012274
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012275#include <unistd.h>
12276
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012277int
12278main ()
12279{
12280void* p = getpagesize
12281 ;
12282 return 0;
12283}
12284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012285if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012288
Matthias Kloseb159a552010-04-25 21:00:44 +000012289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012290$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012291else
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12293$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012294
12295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012297
Victor Stinner984890f2011-11-24 13:53:38 +010012298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12299$as_echo_n "checking for broken unsetenv... " >&6; }
12300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12301/* end confdefs.h. */
12302
12303#include <stdlib.h>
12304
12305int
12306main ()
12307{
12308int res = unsetenv("DUMMY")
12309 ;
12310 return 0;
12311}
12312_ACEOF
12313if ac_fn_c_try_compile "$LINENO"; then :
12314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12315$as_echo "no" >&6; }
12316else
12317
12318$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12319
12320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12321$as_echo "yes" >&6; }
12322
12323fi
12324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12325
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012326for ac_prog in true
12327do
12328 # Extract the first word of "$ac_prog", so it can be a program name with args.
12329set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12331$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012332if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012334else
12335 if test -n "$TRUE"; then
12336 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12337else
12338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12339for as_dir in $PATH
12340do
12341 IFS=$as_save_IFS
12342 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012344 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012345 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 $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 +000012347 break 2
12348 fi
12349done
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012352
12353fi
12354fi
12355TRUE=$ac_cv_prog_TRUE
12356if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12358$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012359else
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12361$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012362fi
12363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012365 test -n "$TRUE" && break
12366done
12367test -n "$TRUE" || TRUE="/bin/true"
12368
12369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12371$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012372if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012374else
12375 ac_check_lib_save_LIBS=$LIBS
12376LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380/* Override any GCC internal prototype to avoid an error.
12381 Use char because int might match the return type of a GCC
12382 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012383#ifdef __cplusplus
12384extern "C"
12385#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012386char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012387int
12388main ()
12389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012391 ;
12392 return 0;
12393}
12394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012396 ac_cv_lib_c_inet_aton=yes
12397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012400rm -f core conftest.err conftest.$ac_objext \
12401 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012402LIBS=$ac_check_lib_save_LIBS
12403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12405$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012406if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012407 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012408else
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12410$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012411if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012413else
12414 ac_check_lib_save_LIBS=$LIBS
12415LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012417/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419/* Override any GCC internal prototype to avoid an error.
12420 Use char because int might match the return type of a GCC
12421 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012422#ifdef __cplusplus
12423extern "C"
12424#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012425char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012426int
12427main ()
12428{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012430 ;
12431 return 0;
12432}
12433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012434if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012435 ac_cv_lib_resolv_inet_aton=yes
12436else
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012439rm -f core conftest.err conftest.$ac_objext \
12440 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012441LIBS=$ac_check_lib_save_LIBS
12442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12444$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012445if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012446 cat >>confdefs.h <<_ACEOF
12447#define HAVE_LIBRESOLV 1
12448_ACEOF
12449
12450 LIBS="-lresolv $LIBS"
12451
12452fi
12453
12454
12455fi
12456
12457
Christian Heimesd0764e22007-12-04 15:00:33 +000012458# On Tru64, chflags seems to be present, but calling it will
12459# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12461$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012462if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012464else
Matthias Kloseb9621712010-04-24 17:59:49 +000012465 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012466 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012467else
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012469/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012470
Christian Heimesd0764e22007-12-04 15:00:33 +000012471#include <sys/stat.h>
12472#include <unistd.h>
12473int main(int argc, char*argv[])
12474{
12475 if(chflags(argv[0], 0) != 0)
12476 return 1;
12477 return 0;
12478}
Ned Deily3eb67d52011-06-28 00:00:28 -070012479
Christian Heimesd0764e22007-12-04 15:00:33 +000012480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012482 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012483else
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012486rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12487 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012488fi
12489
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012490
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12493$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012494if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012496if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012497 ac_cv_have_chflags="yes"
12498else
12499 ac_cv_have_chflags="no"
12500fi
12501
12502fi
12503if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012504
Matthias Kloseb9621712010-04-24 17:59:49 +000012505$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012506
12507fi
12508
Matthias Kloseb9621712010-04-24 17:59:49 +000012509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12510$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012511if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012513else
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012515 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012516else
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012518/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012519
Christian Heimesd0764e22007-12-04 15:00:33 +000012520#include <sys/stat.h>
12521#include <unistd.h>
12522int main(int argc, char*argv[])
12523{
12524 if(lchflags(argv[0], 0) != 0)
12525 return 1;
12526 return 0;
12527}
Ned Deily3eb67d52011-06-28 00:00:28 -070012528
Christian Heimesd0764e22007-12-04 15:00:33 +000012529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012531 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012532else
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012537fi
12538
12539
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12542$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012543if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012545if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012546 ac_cv_have_lchflags="yes"
12547else
12548 ac_cv_have_lchflags="no"
12549fi
12550
12551fi
12552if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012555
12556fi
12557
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012558case $ac_sys_system/$ac_sys_release in
12559Darwin/*)
12560 _CUR_CFLAGS="${CFLAGS}"
12561 _CUR_LDFLAGS="${LDFLAGS}"
12562 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12563 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12564 ;;
12565esac
12566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12568$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012569if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012571else
12572 ac_check_lib_save_LIBS=$LIBS
12573LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012575/* end confdefs.h. */
12576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577/* Override any GCC internal prototype to avoid an error.
12578 Use char because int might match the return type of a GCC
12579 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012580#ifdef __cplusplus
12581extern "C"
12582#endif
12583char inflateCopy ();
12584int
12585main ()
12586{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012587return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012588 ;
12589 return 0;
12590}
12591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012592if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012593 ac_cv_lib_z_inflateCopy=yes
12594else
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597rm -f core conftest.err conftest.$ac_objext \
12598 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012599LIBS=$ac_check_lib_save_LIBS
12600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12602$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012603if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012604
Matthias Kloseb9621712010-04-24 17:59:49 +000012605$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012606
12607fi
12608
12609
12610case $ac_sys_system/$ac_sys_release in
12611Darwin/*)
12612 CFLAGS="${_CUR_CFLAGS}"
12613 LDFLAGS="${_CUR_LDFLAGS}"
12614 ;;
12615esac
12616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12618$as_echo_n "checking for hstrerror... " >&6; }
12619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012620/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012621
Martin v. Löwise9416172003-05-03 10:12:45 +000012622#include <netdb.h>
12623
Martin v. Löwise9416172003-05-03 10:12:45 +000012624int
12625main ()
12626{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012627void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012628 ;
12629 return 0;
12630}
12631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012632if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012635
Matthias Kloseb159a552010-04-25 21:00:44 +000012636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012637$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012638else
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12640$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012641
12642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012643rm -f core conftest.err conftest.$ac_objext \
12644 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645
Matthias Kloseb9621712010-04-24 17:59:49 +000012646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12647$as_echo_n "checking for inet_aton... " >&6; }
12648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012649/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012650
Martin v. Löwis86d66262006-02-17 08:40:11 +000012651#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012652#include <sys/socket.h>
12653#include <netinet/in.h>
12654#include <arpa/inet.h>
12655
Martin v. Löwise9416172003-05-03 10:12:45 +000012656int
12657main ()
12658{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012659void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012660 ;
12661 return 0;
12662}
12663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012667
Matthias Kloseb159a552010-04-25 21:00:44 +000012668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012669$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012670else
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12672$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012673
12674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012675rm -f core conftest.err conftest.$ac_objext \
12676 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12679$as_echo_n "checking for inet_pton... " >&6; }
12680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012681/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012682
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012683#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012684#include <sys/socket.h>
12685#include <netinet/in.h>
12686#include <arpa/inet.h>
12687
Martin v. Löwise9416172003-05-03 10:12:45 +000012688int
12689main ()
12690{
12691void* p = inet_pton
12692 ;
12693 return 0;
12694}
12695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012696if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012699
Matthias Kloseb159a552010-04-25 21:00:44 +000012700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012701$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012702else
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12704$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012705
12706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012708
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012709# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12711$as_echo_n "checking for setgroups... " >&6; }
12712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012714
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012715#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012716#ifdef HAVE_GRP_H
12717#include <grp.h>
12718#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012719
Martin v. Löwisd5843682002-11-21 20:41:28 +000012720int
12721main ()
12722{
12723void* p = setgroups
12724 ;
12725 return 0;
12726}
12727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012731
Matthias Kloseb159a552010-04-25 21:00:44 +000012732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012733$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12736$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012737
12738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012741# check for openpty and forkpty
12742
12743for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012744do :
12745 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012746if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012749_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012750
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012751else
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12753$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012754if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012756else
Martin v. Löwis11437992002-04-12 09:54:03 +000012757 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012758LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762/* Override any GCC internal prototype to avoid an error.
12763 Use char because int might match the return type of a GCC
12764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012765#ifdef __cplusplus
12766extern "C"
12767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012768char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012769int
12770main ()
12771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ;
12774 return 0;
12775}
12776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012778 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012779else
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012782rm -f core conftest.err conftest.$ac_objext \
12783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012784LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12787$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012788if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012790 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012791else
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12793$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012794if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012796else
12797 ac_check_lib_save_LIBS=$LIBS
12798LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012800/* end confdefs.h. */
12801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802/* Override any GCC internal prototype to avoid an error.
12803 Use char because int might match the return type of a GCC
12804 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012805#ifdef __cplusplus
12806extern "C"
12807#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012808char openpty ();
12809int
12810main ()
12811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012813 ;
12814 return 0;
12815}
12816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012817if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012818 ac_cv_lib_bsd_openpty=yes
12819else
Matthias Kloseb9621712010-04-24 17:59:49 +000012820 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012822rm -f core conftest.err conftest.$ac_objext \
12823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012824LIBS=$ac_check_lib_save_LIBS
12825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12827$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012828if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012830 LIBS="$LIBS -lbsd"
12831fi
12832
12833
12834fi
12835
Fred Drake8cef4cf2000-06-28 16:40:38 +000012836
12837fi
12838done
12839
12840for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012841do :
12842 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012843if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012844 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012845#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012846_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012847
Fred Drake8cef4cf2000-06-28 16:40:38 +000012848else
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12850$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012851if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012853else
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012855LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859/* Override any GCC internal prototype to avoid an error.
12860 Use char because int might match the return type of a GCC
12861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012862#ifdef __cplusplus
12863extern "C"
12864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012865char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012866int
12867main ()
12868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012870 ;
12871 return 0;
12872}
12873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012876else
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012879rm -f core conftest.err conftest.$ac_objext \
12880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012881LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12884$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012885if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012887 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012888else
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12890$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012891if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012893else
12894 ac_check_lib_save_LIBS=$LIBS
12895LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012897/* end confdefs.h. */
12898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899/* Override any GCC internal prototype to avoid an error.
12900 Use char because int might match the return type of a GCC
12901 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012902#ifdef __cplusplus
12903extern "C"
12904#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012905char forkpty ();
12906int
12907main ()
12908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012910 ;
12911 return 0;
12912}
12913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012915 ac_cv_lib_bsd_forkpty=yes
12916else
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012919rm -f core conftest.err conftest.$ac_objext \
12920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012921LIBS=$ac_check_lib_save_LIBS
12922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12924$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012925if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012927 LIBS="$LIBS -lbsd"
12928fi
12929
12930
12931fi
12932
Fred Drake8cef4cf2000-06-28 16:40:38 +000012933
12934fi
12935done
12936
Jack Jansendd19cf82001-12-06 22:36:17 +000012937
Michael W. Hudson54241132001-12-07 15:38:26 +000012938# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012939for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012940do :
12941 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12942ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012943if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012945#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012946_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012947
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012949done
12950
Michael W. Hudson54241132001-12-07 15:38:26 +000012951
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012952ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012953if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012954 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012955
Martin v. Löwis1142de32002-03-29 16:28:31 +000012956else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012958 *" dup2.$ac_objext "* ) ;;
12959 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012961esac
12962
Martin v. Löwis1142de32002-03-29 16:28:31 +000012963fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012964
Martin v. Löwis1142de32002-03-29 16:28:31 +000012965
12966for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012967do :
12968 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012969if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012970 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012971#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012974/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012975#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012976int
12977main ()
12978{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012979getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 ;
12981 return 0;
12982}
12983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012987
Guido van Rossum627b2d71993-12-24 10:39:16 +000012988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012990
Guido van Rossum627b2d71993-12-24 10:39:16 +000012991fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012992done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012993
Jack Jansen150753c2003-03-29 22:07:47 +000012994for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012995do :
12996 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012997if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012998 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012999#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000013000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013002/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013003#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013004int
13005main ()
13006{
13007setpgrp(0,0);
13008 ;
13009 return 0;
13010}
13011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013013
Matthias Kloseb9621712010-04-24 17:59:49 +000013014$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013015
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013018
13019fi
13020done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013021
Michael W. Hudson54241132001-12-07 15:38:26 +000013022
Gregory P. Smith387512c2018-12-30 15:42:32 -080013023# We search for both crypt and crypt_r as one or the other may be defined
13024# This gets us our -lcrypt in LIBS when required on the target platform.
13025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13026$as_echo_n "checking for library containing crypt... " >&6; }
13027if ${ac_cv_search_crypt+:} false; then :
13028 $as_echo_n "(cached) " >&6
13029else
13030 ac_func_search_save_LIBS=$LIBS
13031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13032/* end confdefs.h. */
13033
13034/* Override any GCC internal prototype to avoid an error.
13035 Use char because int might match the return type of a GCC
13036 builtin and then its argument prototype would still apply. */
13037#ifdef __cplusplus
13038extern "C"
13039#endif
13040char crypt ();
13041int
13042main ()
13043{
13044return crypt ();
13045 ;
13046 return 0;
13047}
13048_ACEOF
13049for ac_lib in '' crypt; do
13050 if test -z "$ac_lib"; then
13051 ac_res="none required"
13052 else
13053 ac_res=-l$ac_lib
13054 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13055 fi
13056 if ac_fn_c_try_link "$LINENO"; then :
13057 ac_cv_search_crypt=$ac_res
13058fi
13059rm -f core conftest.err conftest.$ac_objext \
13060 conftest$ac_exeext
13061 if ${ac_cv_search_crypt+:} false; then :
13062 break
13063fi
13064done
13065if ${ac_cv_search_crypt+:} false; then :
13066
13067else
13068 ac_cv_search_crypt=no
13069fi
13070rm conftest.$ac_ext
13071LIBS=$ac_func_search_save_LIBS
13072fi
13073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13074$as_echo "$ac_cv_search_crypt" >&6; }
13075ac_res=$ac_cv_search_crypt
13076if test "$ac_res" != no; then :
13077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13078
13079fi
13080
13081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13082$as_echo_n "checking for library containing crypt_r... " >&6; }
13083if ${ac_cv_search_crypt_r+:} false; then :
13084 $as_echo_n "(cached) " >&6
13085else
13086 ac_func_search_save_LIBS=$LIBS
13087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13088/* end confdefs.h. */
13089
13090/* Override any GCC internal prototype to avoid an error.
13091 Use char because int might match the return type of a GCC
13092 builtin and then its argument prototype would still apply. */
13093#ifdef __cplusplus
13094extern "C"
13095#endif
13096char crypt_r ();
13097int
13098main ()
13099{
13100return crypt_r ();
13101 ;
13102 return 0;
13103}
13104_ACEOF
13105for ac_lib in '' crypt; do
13106 if test -z "$ac_lib"; then
13107 ac_res="none required"
13108 else
13109 ac_res=-l$ac_lib
13110 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13111 fi
13112 if ac_fn_c_try_link "$LINENO"; then :
13113 ac_cv_search_crypt_r=$ac_res
13114fi
13115rm -f core conftest.err conftest.$ac_objext \
13116 conftest$ac_exeext
13117 if ${ac_cv_search_crypt_r+:} false; then :
13118 break
13119fi
13120done
13121if ${ac_cv_search_crypt_r+:} false; then :
13122
13123else
13124 ac_cv_search_crypt_r=no
13125fi
13126rm conftest.$ac_ext
13127LIBS=$ac_func_search_save_LIBS
13128fi
13129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13130$as_echo "$ac_cv_search_crypt_r" >&6; }
13131ac_res=$ac_cv_search_crypt_r
13132if test "$ac_res" != no; then :
13133 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13134
13135fi
13136
13137
13138ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13139if test "x$ac_cv_func_crypt_r" = xyes; then :
13140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13141/* end confdefs.h. */
13142
13143#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13144#include <crypt.h>
13145
13146int
13147main ()
13148{
13149
13150struct crypt_data d;
13151char *r = crypt_r("", "", &d);
13152
13153 ;
13154 return 0;
13155}
13156_ACEOF
13157if ac_fn_c_try_compile "$LINENO"; then :
13158
13159$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13160
13161fi
13162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13163
13164fi
13165
13166
Victor Stinnere0be4232011-10-25 13:06:09 +020013167for ac_func in clock_gettime
13168do :
13169 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13170if test "x$ac_cv_func_clock_gettime" = xyes; then :
13171 cat >>confdefs.h <<_ACEOF
13172#define HAVE_CLOCK_GETTIME 1
13173_ACEOF
13174
13175else
13176
13177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13178$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13179if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13180 $as_echo_n "(cached) " >&6
13181else
13182 ac_check_lib_save_LIBS=$LIBS
13183LIBS="-lrt $LIBS"
13184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13185/* end confdefs.h. */
13186
13187/* Override any GCC internal prototype to avoid an error.
13188 Use char because int might match the return type of a GCC
13189 builtin and then its argument prototype would still apply. */
13190#ifdef __cplusplus
13191extern "C"
13192#endif
13193char clock_gettime ();
13194int
13195main ()
13196{
13197return clock_gettime ();
13198 ;
13199 return 0;
13200}
13201_ACEOF
13202if ac_fn_c_try_link "$LINENO"; then :
13203 ac_cv_lib_rt_clock_gettime=yes
13204else
13205 ac_cv_lib_rt_clock_gettime=no
13206fi
13207rm -f core conftest.err conftest.$ac_objext \
13208 conftest$ac_exeext conftest.$ac_ext
13209LIBS=$ac_check_lib_save_LIBS
13210fi
13211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13212$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13213if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13214
Victor Stinner7efb8332014-08-29 15:41:08 +020013215 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013216 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13217
13218
13219$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13220
13221
13222fi
13223
13224
13225fi
13226done
13227
13228
13229for ac_func in clock_getres
13230do :
13231 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13232if test "x$ac_cv_func_clock_getres" = xyes; then :
13233 cat >>confdefs.h <<_ACEOF
13234#define HAVE_CLOCK_GETRES 1
13235_ACEOF
13236
13237else
13238
13239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13240$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13241if ${ac_cv_lib_rt_clock_getres+:} false; then :
13242 $as_echo_n "(cached) " >&6
13243else
13244 ac_check_lib_save_LIBS=$LIBS
13245LIBS="-lrt $LIBS"
13246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247/* end confdefs.h. */
13248
13249/* Override any GCC internal prototype to avoid an error.
13250 Use char because int might match the return type of a GCC
13251 builtin and then its argument prototype would still apply. */
13252#ifdef __cplusplus
13253extern "C"
13254#endif
13255char clock_getres ();
13256int
13257main ()
13258{
13259return clock_getres ();
13260 ;
13261 return 0;
13262}
13263_ACEOF
13264if ac_fn_c_try_link "$LINENO"; then :
13265 ac_cv_lib_rt_clock_getres=yes
13266else
13267 ac_cv_lib_rt_clock_getres=no
13268fi
13269rm -f core conftest.err conftest.$ac_objext \
13270 conftest$ac_exeext conftest.$ac_ext
13271LIBS=$ac_check_lib_save_LIBS
13272fi
13273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13274$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13275if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13276
13277 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13278
13279
13280fi
13281
13282
13283fi
13284done
13285
13286
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013287for ac_func in clock_settime
13288do :
13289 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13290if test "x$ac_cv_func_clock_settime" = xyes; then :
13291 cat >>confdefs.h <<_ACEOF
13292#define HAVE_CLOCK_SETTIME 1
13293_ACEOF
13294
13295else
13296
13297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13298$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13299if ${ac_cv_lib_rt_clock_settime+:} false; then :
13300 $as_echo_n "(cached) " >&6
13301else
13302 ac_check_lib_save_LIBS=$LIBS
13303LIBS="-lrt $LIBS"
13304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13305/* end confdefs.h. */
13306
13307/* Override any GCC internal prototype to avoid an error.
13308 Use char because int might match the return type of a GCC
13309 builtin and then its argument prototype would still apply. */
13310#ifdef __cplusplus
13311extern "C"
13312#endif
13313char clock_settime ();
13314int
13315main ()
13316{
13317return clock_settime ();
13318 ;
13319 return 0;
13320}
13321_ACEOF
13322if ac_fn_c_try_link "$LINENO"; then :
13323 ac_cv_lib_rt_clock_settime=yes
13324else
13325 ac_cv_lib_rt_clock_settime=no
13326fi
13327rm -f core conftest.err conftest.$ac_objext \
13328 conftest$ac_exeext conftest.$ac_ext
13329LIBS=$ac_check_lib_save_LIBS
13330fi
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13332$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13333if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13334
13335 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13336
13337
13338fi
13339
13340
13341fi
13342done
13343
13344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13346$as_echo_n "checking for major... " >&6; }
13347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013348/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013349
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013350#if defined(MAJOR_IN_MKDEV)
13351#include <sys/mkdev.h>
13352#elif defined(MAJOR_IN_SYSMACROS)
13353#include <sys/sysmacros.h>
13354#else
13355#include <sys/types.h>
13356#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013357
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013358int
13359main ()
13360{
13361
13362 makedev(major(0),minor(0));
13363
13364 ;
13365 return 0;
13366}
13367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013368if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013369
13370
Matthias Kloseb9621712010-04-24 17:59:49 +000013371$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13374$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013375
13376else
Skip Montanaro6dead952003-09-25 14:50:04 +000013377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13379$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013380
13381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013382rm -f core conftest.err conftest.$ac_objext \
13383 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013384
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013385# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013386# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13388$as_echo_n "checking for getaddrinfo... " >&6; }
13389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013390/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013391
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013392#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013393#include <sys/socket.h>
13394#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013395#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013396
Martin v. Löwis11437992002-04-12 09:54:03 +000013397int
13398main ()
13399{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013400getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013401 ;
13402 return 0;
13403}
13404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013405if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013406 have_getaddrinfo=yes
13407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013410rm -f core conftest.err conftest.$ac_objext \
13411 conftest$ac_exeext conftest.$ac_ext
13412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13413$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013414if test $have_getaddrinfo = yes
13415then
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13417$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013418 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013422
13423if test "${enable_ipv6+set}" = set; then
13424 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13425else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013426 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013427fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013428else
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013430/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013431
Stefan Krah19c21392012-11-22 23:47:32 +010013432#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013433#include <sys/types.h>
13434#include <netdb.h>
13435#include <string.h>
13436#include <sys/socket.h>
13437#include <netinet/in.h>
13438
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013439int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013440{
13441 int passive, gaierr, inet4 = 0, inet6 = 0;
13442 struct addrinfo hints, *ai, *aitop;
13443 char straddr[INET6_ADDRSTRLEN], strport[16];
13444
13445 for (passive = 0; passive <= 1; passive++) {
13446 memset(&hints, 0, sizeof(hints));
13447 hints.ai_family = AF_UNSPEC;
13448 hints.ai_flags = passive ? AI_PASSIVE : 0;
13449 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013450 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013451 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13452 (void)gai_strerror(gaierr);
13453 goto bad;
13454 }
13455 for (ai = aitop; ai; ai = ai->ai_next) {
13456 if (ai->ai_addr == NULL ||
13457 ai->ai_addrlen == 0 ||
13458 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13459 straddr, sizeof(straddr), strport, sizeof(strport),
13460 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13461 goto bad;
13462 }
13463 switch (ai->ai_family) {
13464 case AF_INET:
13465 if (strcmp(strport, "54321") != 0) {
13466 goto bad;
13467 }
13468 if (passive) {
13469 if (strcmp(straddr, "0.0.0.0") != 0) {
13470 goto bad;
13471 }
13472 } else {
13473 if (strcmp(straddr, "127.0.0.1") != 0) {
13474 goto bad;
13475 }
13476 }
13477 inet4++;
13478 break;
13479 case AF_INET6:
13480 if (strcmp(strport, "54321") != 0) {
13481 goto bad;
13482 }
13483 if (passive) {
13484 if (strcmp(straddr, "::") != 0) {
13485 goto bad;
13486 }
13487 } else {
13488 if (strcmp(straddr, "::1") != 0) {
13489 goto bad;
13490 }
13491 }
13492 inet6++;
13493 break;
13494 case AF_UNSPEC:
13495 goto bad;
13496 break;
13497 default:
13498 /* another family support? */
13499 break;
13500 }
13501 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013502 freeaddrinfo(aitop);
13503 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013504 }
13505
13506 if (!(inet4 == 0 || inet4 == 2))
13507 goto bad;
13508 if (!(inet6 == 0 || inet6 == 2))
13509 goto bad;
13510
13511 if (aitop)
13512 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013513 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013514
13515 bad:
13516 if (aitop)
13517 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013518 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013519}
13520
Martin v. Löwis11437992002-04-12 09:54:03 +000013521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013523 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13528 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013530
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013531fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013532
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013534
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13536$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13537
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013538if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013539then
13540 if test $ipv6 = yes
13541 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013542 echo 'Fatal: You must get working getaddrinfo() function.'
13543 echo ' or you can specify "--disable-ipv6"'.
13544 exit 1
13545 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013546else
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
Matthias Kloseb9621712010-04-24 17:59:49 +000013548$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013549
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013550fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013551
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013552for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013553do :
13554 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013555if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013557#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013558_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013559
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013560fi
13561done
13562
Michael W. Hudson54241132001-12-07 15:38:26 +000013563
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013564# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13566$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013567if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569else
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013571/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013572#include <sys/types.h>
13573#include <sys/time.h>
13574#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013575
Martin v. Löwis11437992002-04-12 09:54:03 +000013576int
13577main ()
13578{
13579if ((struct tm *) 0)
13580return 0;
13581 ;
13582 return 0;
13583}
13584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013585if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013586 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013587else
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13593$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013594if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013597
13598fi
13599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13601$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013602if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013604else
Matthias Kloseb9621712010-04-24 17:59:49 +000013605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013606/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013607#include <sys/types.h>
13608#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Martin v. Löwis11437992002-04-12 09:54:03 +000013610int
13611main ()
13612{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013613struct tm tm;
13614 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013616 ;
13617 return 0;
13618}
13619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013620if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013621 ac_cv_struct_tm=time.h
13622else
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13628$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013629if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013632
13633fi
13634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635ac_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 +000013636#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638"
Victor Stinnere0be4232011-10-25 13:06:09 +020013639if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
13641cat >>confdefs.h <<_ACEOF
13642#define HAVE_STRUCT_TM_TM_ZONE 1
13643_ACEOF
13644
13645
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013646fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013647
Martin v. Löwis11437992002-04-12 09:54:03 +000013648if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013651
13652else
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13654"
Victor Stinnere0be4232011-10-25 13:06:09 +020013655if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013659fi
13660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013661cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013662#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013663_ACEOF
13664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13666$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013667if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013669else
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013671/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013672#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013673#if !HAVE_DECL_TZNAME
13674extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677int
13678main ()
13679{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013680return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 ;
13682 return 0;
13683}
13684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013685if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013686 ac_cv_var_tzname=yes
13687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013690rm -f core conftest.err conftest.$ac_objext \
13691 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13694$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013695 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013698
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013699 fi
13700fi
13701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702ac_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 +020013703if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013704
13705cat >>confdefs.h <<_ACEOF
13706#define HAVE_STRUCT_STAT_ST_RDEV 1
13707_ACEOF
13708
13709
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013710fi
13711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712ac_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 +020013713if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013714
Martin v. Löwis11437992002-04-12 09:54:03 +000013715cat >>confdefs.h <<_ACEOF
13716#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13717_ACEOF
13718
13719
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013720fi
13721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722ac_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 +020013723if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013724
13725cat >>confdefs.h <<_ACEOF
13726#define HAVE_STRUCT_STAT_ST_FLAGS 1
13727_ACEOF
13728
13729
13730fi
13731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732ac_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 +020013733if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013734
13735cat >>confdefs.h <<_ACEOF
13736#define HAVE_STRUCT_STAT_ST_GEN 1
13737_ACEOF
13738
13739
13740fi
13741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742ac_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 +020013743if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013744
13745cat >>confdefs.h <<_ACEOF
13746#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13747_ACEOF
13748
13749
13750fi
13751
Matthias Kloseb9621712010-04-24 17:59:49 +000013752ac_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 +020013753if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013754
Martin v. Löwis11437992002-04-12 09:54:03 +000013755cat >>confdefs.h <<_ACEOF
13756#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13757_ACEOF
13758
13759
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013760fi
13761
Stefan Krah267b6392016-04-26 01:09:18 +020013762ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13763 #include <sys/types.h>
13764 #include <pwd.h>
13765
13766"
13767if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13768
13769cat >>confdefs.h <<_ACEOF
13770#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13771_ACEOF
13772
13773
13774fi
13775ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13776 #include <sys/types.h>
13777 #include <pwd.h>
13778
13779"
13780if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13781
13782cat >>confdefs.h <<_ACEOF
13783#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13784_ACEOF
13785
13786
13787fi
13788
Zachary Ware6a6967e2016-10-01 00:47:27 -050013789# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13790ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13791"
13792if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13793
13794cat >>confdefs.h <<_ACEOF
13795#define HAVE_SIGINFO_T_SI_BAND 1
13796_ACEOF
13797
13798
13799fi
13800
Michael W. Hudson54241132001-12-07 15:38:26 +000013801
Matthias Kloseb9621712010-04-24 17:59:49 +000013802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13803$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013804if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013806else
Matthias Kloseb159a552010-04-25 21:00:44 +000013807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013809/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013810#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013811int
13812main ()
13813{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013814return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 ;
13816 return 0;
13817}
13818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013819if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013820 ac_cv_header_time_altzone=yes
13821else
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826fi
13827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13829$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013830if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013833
13834fi
13835
Guido van Rossumda88dad1995-01-26 00:46:29 +000013836was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13838$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013840/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013841
13842#include <sys/types.h>
13843#include <sys/select.h>
13844#include <sys/time.h>
13845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846int
13847main ()
13848{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013849;
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 ;
13851 return 0;
13852}
13853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013855
13856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013858
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013859 was_it_defined=yes
13860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13864$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013865
Matthias Kloseb9621712010-04-24 17:59:49 +000013866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13867$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013868if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013869 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013870else
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013872/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013873#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013874int
13875main ()
13876{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013877struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 ;
13879 return 0;
13880}
13881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013883 ac_cv_struct_addrinfo=yes
13884else
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13888fi
13889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13891$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013892if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013893
Matthias Kloseb9621712010-04-24 17:59:49 +000013894$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013895
13896fi
13897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13899$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013900if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013902else
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013904/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013905
13906# include <sys/types.h>
13907# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013908int
13909main ()
13910{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013911struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 ;
13913 return 0;
13914}
13915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013917 ac_cv_struct_sockaddr_storage=yes
13918else
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13922fi
13923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13925$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013926if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013927
Matthias Kloseb9621712010-04-24 17:59:49 +000013928$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013929
13930fi
13931
Christian Heimesdffa3942016-09-05 23:54:41 +020013932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13933$as_echo_n "checking for sockaddr_alg... " >&6; }
13934if ${ac_cv_struct_sockaddr_alg+:} false; then :
13935 $as_echo_n "(cached) " >&6
13936else
13937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13938/* end confdefs.h. */
13939
13940# include <sys/types.h>
13941# include <sys/socket.h>
13942# include <linux/if_alg.h>
13943int
13944main ()
13945{
13946struct sockaddr_alg s
13947 ;
13948 return 0;
13949}
13950_ACEOF
13951if ac_fn_c_try_compile "$LINENO"; then :
13952 ac_cv_struct_sockaddr_alg=yes
13953else
13954 ac_cv_struct_sockaddr_alg=no
13955fi
13956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13957fi
13958
13959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13960$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13961if test $ac_cv_struct_sockaddr_alg = yes; then
13962
13963$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13964
13965fi
13966
Guido van Rossum627b2d71993-12-24 10:39:16 +000013967# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13970$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013971if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013973else
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013976$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013977int
13978main ()
13979{
13980static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013981test_array [0] = 0;
13982return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
13984 ;
13985 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013986}
Martin v. Löwis11437992002-04-12 09:54:03 +000013987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013988if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013989 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013990else
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13996$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013997if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013999
14000fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014001
Matthias Kloseb9621712010-04-24 17:59:49 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14003$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014004if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014006else
Matthias Kloseb9621712010-04-24 17:59:49 +000014007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014008/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014009
Martin v. Löwis11437992002-04-12 09:54:03 +000014010int
14011main ()
14012{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014013
Martin v. Löwis11437992002-04-12 09:54:03 +000014014#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014015 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014017 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019 char const *const *pcpcc;
14020 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 /* NEC SVR4.0.2 mips cc rejects this. */
14022 struct point {int x, y;};
14023 static struct point const zero = {0,0};
14024 /* AIX XL C 1.02.0.0 rejects this.
14025 It does not let you subtract one const X* pointer from another in
14026 an arm of an if-expression whose if-part is not a constant
14027 expression */
14028 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031 ++pcpcc;
14032 ppc = (char**) pcpcc;
14033 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014034 { /* SCO 3.2v4 cc rejects this sort of thing. */
14035 char tx;
14036 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014037 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014040 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 }
14042 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14043 int x[] = {25, 17};
14044 const int *foo = &x[0];
14045 ++foo;
14046 }
14047 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14048 typedef const int *iptr;
14049 iptr p = 0;
14050 ++p;
14051 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014052 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014054 struct s { int j; const int *ap[3]; } bx;
14055 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 }
14057 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14058 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014060 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014061 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014062#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014063
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ;
14065 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014066}
Martin v. Löwis11437992002-04-12 09:54:03 +000014067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014068if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014069 ac_cv_c_const=yes
14070else
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14076$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014077if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014078
Matthias Kloseb9621712010-04-24 17:59:49 +000014079$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014080
14081fi
14082
Michael W. Hudson54241132001-12-07 15:38:26 +000014083
Guido van Rossumda88dad1995-01-26 00:46:29 +000014084works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14086$as_echo_n "checking for working signed char... " >&6; }
14087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014088/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014089
Martin v. Löwis11437992002-04-12 09:54:03 +000014090int
14091main ()
14092{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014093signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 ;
14095 return 0;
14096}
14097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014098if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014099 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014100else
Skip Montanaro6dead952003-09-25 14:50:04 +000014101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014103
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014104
Guido van Rossum7f43da71994-08-01 12:15:30 +000014105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14108$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014109
Guido van Rossumda88dad1995-01-26 00:46:29 +000014110have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14112$as_echo_n "checking for prototypes... " >&6; }
14113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014114/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014115int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014116int
14117main ()
14118{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014119return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 ;
14121 return 0;
14122}
14123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014124if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014125
Matthias Kloseb9621712010-04-24 17:59:49 +000014126$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014127
Matthias Kloseb159a552010-04-25 21:00:44 +000014128 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14132$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014133
Guido van Rossumda88dad1995-01-26 00:46:29 +000014134works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14136$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014138/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014139
14140#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014141int foo(int x, ...) {
14142 va_list va;
14143 va_start(va, x);
14144 va_arg(va, int);
14145 va_arg(va, char *);
14146 va_arg(va, double);
14147 return 0;
14148}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014149
Martin v. Löwis11437992002-04-12 09:54:03 +000014150int
14151main ()
14152{
Guido van Rossum90eea071996-08-30 20:58:57 +000014153return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 ;
14155 return 0;
14156}
14157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014159
14160
Matthias Kloseb9621712010-04-24 17:59:49 +000014161$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014162
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014163 works=yes
14164
Guido van Rossum627b2d71993-12-24 10:39:16 +000014165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14168$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014169
Martin v. Löwisd6320502004-08-12 13:45:08 +000014170# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14172$as_echo_n "checking for socketpair... " >&6; }
14173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014174/* end confdefs.h. */
14175
14176#include <sys/types.h>
14177#include <sys/socket.h>
14178
14179int
14180main ()
14181{
14182void *x=socketpair
14183 ;
14184 return 0;
14185}
14186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014188
Matthias Kloseb9621712010-04-24 17:59:49 +000014189$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014190
Matthias Kloseb159a552010-04-25 21:00:44 +000014191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014192$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014193else
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14195$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014196
14197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014199
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014200# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14202$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014204/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014205#include <sys/types.h>
14206#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014207int
14208main ()
14209{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014210struct sockaddr x;
14211x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014212 ;
14213 return 0;
14214}
14215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014216if ac_fn_c_try_compile "$LINENO"; then :
14217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14218$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014219
Matthias Kloseb9621712010-04-24 17:59:49 +000014220$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014221
14222else
Matthias Kloseb9621712010-04-24 17:59:49 +000014223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14224$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014225
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014228
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014229# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014230
14231
Matthias Kloseb9621712010-04-24 17:59:49 +000014232ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014233if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014234
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14238$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014239 OLD_CFLAGS=$CFLAGS
14240 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014242/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014243
14244# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
Martin v. Löwis11437992002-04-12 09:54:03 +000014246int
14247main ()
14248{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014249
14250 char *name;
14251 struct hostent *he, *res;
14252 char buffer[2048];
14253 int buflen = 2048;
14254 int h_errnop;
14255
14256 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014257
14258 ;
14259 return 0;
14260}
14261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014265
Martin v. Löwis11437992002-04-12 09:54:03 +000014266
Matthias Kloseb9621712010-04-24 17:59:49 +000014267$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014268
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14270$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014271
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014272else
Skip Montanaro6dead952003-09-25 14:50:04 +000014273
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14275$as_echo "no" >&6; }
14276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14277$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014279/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014280
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014281# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
Martin v. Löwis11437992002-04-12 09:54:03 +000014283int
14284main ()
14285{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014286
14287 char *name;
14288 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014289 char buffer[2048];
14290 int buflen = 2048;
14291 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014292
Matthias Kloseb159a552010-04-25 21:00:44 +000014293 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014294
14295 ;
14296 return 0;
14297}
14298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014302
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
Matthias Kloseb159a552010-04-25 21:00:44 +000014304$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014305
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14307$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014309else
Skip Montanaro6dead952003-09-25 14:50:04 +000014310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14312$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14314$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14316/* end confdefs.h. */
14317
14318# include <netdb.h>
14319
14320int
14321main ()
14322{
14323
14324 char *name;
14325 struct hostent *he;
14326 struct hostent_data data;
14327
14328 (void) gethostbyname_r(name, he, &data);
14329
14330 ;
14331 return 0;
14332}
14333_ACEOF
14334if ac_fn_c_try_compile "$LINENO"; then :
14335
14336 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14337
14338
14339$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14340
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14342$as_echo "yes" >&6; }
14343
14344else
14345
14346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14347$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014348
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014351
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014357 CFLAGS=$OLD_CFLAGS
14358
14359else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014360
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 for ac_func in gethostbyname
14362do :
14363 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014364if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014365 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014366#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014367_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014368
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014369fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014370done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014371
Michael W. Hudson54241132001-12-07 15:38:26 +000014372
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014373fi
14374
Michael W. Hudson54241132001-12-07 15:38:26 +000014375
14376
14377
14378
14379
14380
Guido van Rossum627b2d71993-12-24 10:39:16 +000014381# checks for system services
14382# (none yet)
14383
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014384# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014385ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014386if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014387
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014388else
Matthias Kloseb9621712010-04-24 17:59:49 +000014389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14390$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014391if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014392 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014393else
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014395LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399/* Override any GCC internal prototype to avoid an error.
14400 Use char because int might match the return type of a GCC
14401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014402#ifdef __cplusplus
14403extern "C"
14404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014405char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014406int
14407main ()
14408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 ;
14411 return 0;
14412}
14413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014416else
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014419rm -f core conftest.err conftest.$ac_objext \
14420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014421LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14424$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014425if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 cat >>confdefs.h <<_ACEOF
14427#define HAVE_LIBIEEE 1
14428_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014429
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014430 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014431
Guido van Rossum627b2d71993-12-24 10:39:16 +000014432fi
14433
Michael W. Hudson54241132001-12-07 15:38:26 +000014434
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014435fi
14436
Michael W. Hudson54241132001-12-07 15:38:26 +000014437
Guido van Rossum7f43da71994-08-01 12:15:30 +000014438# check for --with-libm=...
14439
Guido van Rossum563e7081996-09-10 18:20:48 +000014440case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014441Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014442*) LIBM=-lm
14443esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14445$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014448if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014450if test "$withval" = no
14451then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14453$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014454elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014455then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14457$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014458else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014459fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014460else
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14462$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463fi
14464
Guido van Rossum7f43da71994-08-01 12:15:30 +000014465
14466# check for --with-libc=...
14467
Matthias Kloseb9621712010-04-24 17:59:49 +000014468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14469$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014472if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014474if test "$withval" = no
14475then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14477$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014478elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014479then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14481$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014482else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014483fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014484else
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14486$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487fi
14488
Guido van Rossum7f43da71994-08-01 12:15:30 +000014489
Stefan Krah1919b7e2012-03-21 18:25:23 +010014490# **************************************
14491# * Check for gcc x64 inline assembler *
14492# **************************************
14493
14494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14495$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14497/* end confdefs.h. */
14498
14499int
14500main ()
14501{
14502
14503 __asm__ __volatile__ ("movq %rcx, %rax");
14504
14505 ;
14506 return 0;
14507}
14508_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014509if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014510 have_gcc_asm_for_x64=yes
14511else
14512 have_gcc_asm_for_x64=no
14513fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014514rm -f core conftest.err conftest.$ac_objext \
14515 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14517$as_echo "$have_gcc_asm_for_x64" >&6; }
14518if test "$have_gcc_asm_for_x64" = yes
14519then
14520
14521$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14522
14523fi
14524
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014525# **************************************************
14526# * Check for various properties of floating point *
14527# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014528
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14530$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14531if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014533else
14534
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014535
14536ax_cv_c_float_words_bigendian=unknown
14537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014538/* end confdefs.h. */
14539
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014540
14541double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14542
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014543
14544_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014545if ac_fn_c_try_compile "$LINENO"; then :
14546
14547
Arnon Yaari5dd83602020-04-01 18:19:09 +030014548if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014549 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014550fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014551if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014552 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14553 ax_cv_c_float_words_bigendian=no
14554 else
14555 ax_cv_c_float_words_bigendian=unknown
14556 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014557fi
14558
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014559
14560fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014562fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14564$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014565
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014566case $ax_cv_c_float_words_bigendian in
14567 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014568
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014569$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14570 ;;
14571 no)
14572 ;;
14573 *)
14574 as_fn_error $? "
14575
14576Unknown float word ordering. You need to manually preset
14577ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14578
14579 " "$LINENO" 5 ;;
14580esac
14581
14582
14583if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014584then
14585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014587
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014588elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014589then
14590
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014591$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14592
14593else
14594 # Some ARM platforms use a mixed-endian representation for doubles.
14595 # While Python doesn't currently have full support for these platforms
14596 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14597 # conversions work.
14598 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14599 # or little, then it must be this?
14600
Matthias Kloseb9621712010-04-24 17:59:49 +000014601$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014602
14603fi
14604
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014605# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014606# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014607# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014608# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014609# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014610# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014611
14612# This inline assembler syntax may also work for suncc and icc,
14613# so we try it on all platforms.
14614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14616$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014618/* end confdefs.h. */
14619
14620int
14621main ()
14622{
14623
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014624 unsigned short cw;
14625 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14626 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014627
14628 ;
14629 return 0;
14630}
14631_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014632if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014633 have_gcc_asm_for_x87=yes
14634else
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014636fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014637rm -f core conftest.err conftest.$ac_objext \
14638 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14640$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014641if test "$have_gcc_asm_for_x87" = yes
14642then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014643
Matthias Kloseb9621712010-04-24 17:59:49 +000014644$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014645
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014646fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014647
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14649$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14651/* end confdefs.h. */
14652
14653int
14654main ()
14655{
14656
14657 unsigned int fpcr;
14658 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14659 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14660
14661 ;
14662 return 0;
14663}
14664_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014665if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014666 have_gcc_asm_for_mc68881=yes
14667else
14668 have_gcc_asm_for_mc68881=no
14669fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014670rm -f core conftest.err conftest.$ac_objext \
14671 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14673$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14674if test "$have_gcc_asm_for_mc68881" = yes
14675then
14676
14677$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14678
14679fi
14680
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014681# Detect whether system arithmetic is subject to x87-style double
14682# rounding issues. The result of this test has little meaning on non
14683# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14684# mode is round-to-nearest and double rounding issues are present, and
14685# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14687$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014688# $BASECFLAGS may affect the result
14689ac_save_cc="$CC"
14690CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014691if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014692 ac_cv_x87_double_rounding=no
14693else
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014695/* end confdefs.h. */
14696
14697#include <stdlib.h>
14698#include <math.h>
14699int main() {
14700 volatile double x, y, z;
14701 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14702 x = 0.99999999999999989; /* 1-2**-53 */
14703 y = 1./x;
14704 if (y != 1.)
14705 exit(0);
14706 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14707 x = 1e16;
14708 y = 2.99999;
14709 z = x + y;
14710 if (z != 1e16+4.)
14711 exit(0);
14712 /* both tests show evidence of double rounding */
14713 exit(1);
14714}
14715
14716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014717if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014718 ac_cv_x87_double_rounding=no
14719else
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014724fi
14725
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014726CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14728$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014729if test "$ac_cv_x87_double_rounding" = yes
14730then
14731
Matthias Kloseb9621712010-04-24 17:59:49 +000014732$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014733
14734fi
14735
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014736# ************************************
14737# * Check for mathematical functions *
14738# ************************************
14739
14740LIBS_SAVE=$LIBS
14741LIBS="$LIBS $LIBM"
14742
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014743for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14744do :
14745 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14746ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014747if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014748 cat >>confdefs.h <<_ACEOF
14749#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14750_ACEOF
14751
14752fi
14753done
14754
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014755for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014756do :
14757 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14758ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014759if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014760 cat >>confdefs.h <<_ACEOF
14761#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14762_ACEOF
14763
14764fi
14765done
14766
14767ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14768"
Victor Stinnere0be4232011-10-25 13:06:09 +020014769if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014770 ac_have_decl=1
14771else
14772 ac_have_decl=0
14773fi
14774
14775cat >>confdefs.h <<_ACEOF
14776#define HAVE_DECL_ISINF $ac_have_decl
14777_ACEOF
14778ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14779"
Victor Stinnere0be4232011-10-25 13:06:09 +020014780if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014781 ac_have_decl=1
14782else
14783 ac_have_decl=0
14784fi
14785
14786cat >>confdefs.h <<_ACEOF
14787#define HAVE_DECL_ISNAN $ac_have_decl
14788_ACEOF
14789ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14790"
Victor Stinnere0be4232011-10-25 13:06:09 +020014791if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014792 ac_have_decl=1
14793else
14794 ac_have_decl=0
14795fi
14796
14797cat >>confdefs.h <<_ACEOF
14798#define HAVE_DECL_ISFINITE $ac_have_decl
14799_ACEOF
14800
14801
Mark Dickinsona614f042009-11-28 12:48:43 +000014802# For multiprocessing module, check that sem_open
14803# actually works. For FreeBSD versions <= 7.2,
14804# the kernel module that provides POSIX semaphores
14805# isn't loaded by default, so an attempt to call
14806# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14808$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014809if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014811else
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014813 ac_cv_posix_semaphores_enabled=yes
14814else
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014816/* end confdefs.h. */
14817
14818#include <unistd.h>
14819#include <fcntl.h>
14820#include <stdio.h>
14821#include <semaphore.h>
14822#include <sys/stat.h>
14823
14824int main(void) {
14825 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14826 if (a == SEM_FAILED) {
14827 perror("sem_open");
14828 return 1;
14829 }
14830 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014831 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014832 return 0;
14833}
14834
14835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014836if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014837 ac_cv_posix_semaphores_enabled=yes
14838else
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014843fi
14844
14845
Mark Dickinsona614f042009-11-28 12:48:43 +000014846fi
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14849$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014850if test $ac_cv_posix_semaphores_enabled = no
14851then
14852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014854
14855fi
14856
Mark Dickinson10683072009-04-18 21:18:19 +000014857# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14859$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014860if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014862else
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014864 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014865else
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014867/* end confdefs.h. */
14868
14869#include <unistd.h>
14870#include <fcntl.h>
14871#include <stdio.h>
14872#include <semaphore.h>
14873#include <sys/stat.h>
14874
14875int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014876 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014877 int count;
14878 int res;
14879 if(a==SEM_FAILED){
14880 perror("sem_open");
14881 return 1;
14882
14883 }
14884 res = sem_getvalue(a, &count);
14885 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014886 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014887 return res==-1 ? 1 : 0;
14888}
14889
Mark Dickinson10683072009-04-18 21:18:19 +000014890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014891if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014892 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014893else
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014898fi
14899
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014901fi
14902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14904$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014905if test $ac_cv_broken_sem_getvalue = yes
14906then
14907
Matthias Kloseb9621712010-04-24 17:59:49 +000014908$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014909
14910fi
14911
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014912ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14913"
14914if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14915 ac_have_decl=1
14916else
14917 ac_have_decl=0
14918fi
14919
14920cat >>confdefs.h <<_ACEOF
14921#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14922_ACEOF
14923ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14924"
14925if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14926 ac_have_decl=1
14927else
14928 ac_have_decl=0
14929fi
14930
14931cat >>confdefs.h <<_ACEOF
14932#define HAVE_DECL_RTLD_NOW $ac_have_decl
14933_ACEOF
14934ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14935"
14936if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14937 ac_have_decl=1
14938else
14939 ac_have_decl=0
14940fi
14941
14942cat >>confdefs.h <<_ACEOF
14943#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14944_ACEOF
14945ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14946"
14947if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14948 ac_have_decl=1
14949else
14950 ac_have_decl=0
14951fi
14952
14953cat >>confdefs.h <<_ACEOF
14954#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14955_ACEOF
14956ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14957"
14958if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14959 ac_have_decl=1
14960else
14961 ac_have_decl=0
14962fi
14963
14964cat >>confdefs.h <<_ACEOF
14965#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14966_ACEOF
14967ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14968"
14969if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14970 ac_have_decl=1
14971else
14972 ac_have_decl=0
14973fi
14974
14975cat >>confdefs.h <<_ACEOF
14976#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14977_ACEOF
14978ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14979"
14980if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14981 ac_have_decl=1
14982else
14983 ac_have_decl=0
14984fi
14985
14986cat >>confdefs.h <<_ACEOF
14987#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14988_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014989ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14990"
14991if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14992 ac_have_decl=1
14993else
14994 ac_have_decl=0
14995fi
14996
14997cat >>confdefs.h <<_ACEOF
14998#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14999_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015000
15001
Mark Dickinsonbd792642009-03-18 20:06:12 +000015002# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000015003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
15004$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015005# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015006if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000015007 enableval=$enable_big_digits; case $enable_big_digits in
15008yes)
15009 enable_big_digits=30 ;;
15010no)
15011 enable_big_digits=15 ;;
1501215|30)
15013 ;;
15014*)
Victor Stinnere0be4232011-10-25 13:06:09 +020015015 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 +000015016esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
15018$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015019
15020cat >>confdefs.h <<_ACEOF
15021#define PYLONG_BITS_IN_DIGIT $enable_big_digits
15022_ACEOF
15023
15024
15025else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15027$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015028fi
15029
15030
Guido van Rossumef2255b2000-03-10 22:30:29 +000015031# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015032ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020015033if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
15035
Matthias Kloseb9621712010-04-24 17:59:49 +000015036$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015037
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015038 wchar_h="yes"
15039
Guido van Rossumef2255b2000-03-10 22:30:29 +000015040else
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015042
15043fi
15044
Michael W. Hudson54241132001-12-07 15:38:26 +000015045
Martin v. Löwis11437992002-04-12 09:54:03 +000015046
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015047# determine wchar_t size
15048if test "$wchar_h" = yes
15049then
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15052# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15053# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000015054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15055$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015056if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015058else
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
15060"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015061
Martin v. Löwis11437992002-04-12 09:54:03 +000015062else
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 if test "$ac_cv_type_wchar_t" = yes; then
15064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015066as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015067See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068 else
15069 ac_cv_sizeof_wchar_t=0
15070 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015072
Martin v. Löwis11437992002-04-12 09:54:03 +000015073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15075$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076
15077
15078
Martin v. Löwis11437992002-04-12 09:54:03 +000015079cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015080#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015081_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015082
Michael W. Hudson54241132001-12-07 15:38:26 +000015083
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015084fi
15085
Matthias Kloseb9621712010-04-24 17:59:49 +000015086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15087$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015088have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015090/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015091
15092#include <tcl.h>
15093#if TCL_UTF_MAX != 6
15094# error "NOT UCS4_TCL"
15095#endif
15096int
15097main ()
15098{
15099
15100 ;
15101 return 0;
15102}
15103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015104if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015105
15106
Matthias Kloseb9621712010-04-24 17:59:49 +000015107$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015108
15109 have_ucs4_tcl=yes
15110
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15114$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015115
Skip Montanaro6dead952003-09-25 14:50:04 +000015116# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015117if test "$wchar_h" = yes
15118then
15119 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15121$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015122 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015124else
15125
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015127 ac_cv_wchar_t_signed=yes
15128else
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015130/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015131
15132 #include <wchar.h>
15133 int main()
15134 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015135 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015136 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015137 }
15138
15139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015140if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015141 ac_cv_wchar_t_signed=yes
15142else
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15146 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015147fi
15148
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015149fi
15150
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15152$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153fi
15154
Michael Osipov3738fad2018-08-24 18:17:19 +020015155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15156$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015157# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015158if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015159 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015160then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015161
Matthias Kloseb9621712010-04-24 17:59:49 +000015162$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015163
Michael Osipov3738fad2018-08-24 18:17:19 +020015164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15165$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015166else
Michael Osipov3738fad2018-08-24 18:17:19 +020015167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15168$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015169fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015170
15171# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15173$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015174if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015176else
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 ac_cv_c_bigendian=unknown
15178 # See if we're dealing with a universal compiler.
15179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15180/* end confdefs.h. */
15181#ifndef __APPLE_CC__
15182 not a universal capable compiler
15183 #endif
15184 typedef int dummy;
15185
Skip Montanaro6dead952003-09-25 14:50:04 +000015186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015187if ac_fn_c_try_compile "$LINENO"; then :
15188
15189 # Check for potential -arch flags. It is not universal unless
15190 # there are at least two -arch flags with different values.
15191 ac_arch=
15192 ac_prev=
15193 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15194 if test -n "$ac_prev"; then
15195 case $ac_word in
15196 i?86 | x86_64 | ppc | ppc64)
15197 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15198 ac_arch=$ac_word
15199 else
15200 ac_cv_c_bigendian=universal
15201 break
15202 fi
15203 ;;
15204 esac
15205 ac_prev=
15206 elif test "x$ac_word" = "x-arch"; then
15207 ac_prev=arch
15208 fi
15209 done
15210fi
15211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15212 if test $ac_cv_c_bigendian = unknown; then
15213 # See if sys/param.h defines the BYTE_ORDER macro.
15214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015215/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015216#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015218
Martin v. Löwis11437992002-04-12 09:54:03 +000015219int
15220main ()
15221{
Matthias Kloseb9621712010-04-24 17:59:49 +000015222#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15223 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15224 && LITTLE_ENDIAN)
15225 bogus endian macros
15226 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015227
15228 ;
15229 return 0;
15230}
15231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015232if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015233 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015235/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015236#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015238
Martin v. Löwis11437992002-04-12 09:54:03 +000015239int
15240main ()
15241{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015242#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 not big endian
15244 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015245
15246 ;
15247 return 0;
15248}
15249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015251 ac_cv_c_bigendian=yes
15252else
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015256fi
15257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15258 fi
15259 if test $ac_cv_c_bigendian = unknown; then
15260 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015262/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015263#include <limits.h>
15264
Martin v. Löwis11437992002-04-12 09:54:03 +000015265int
15266main ()
15267{
Matthias Kloseb9621712010-04-24 17:59:49 +000015268#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15269 bogus endian macros
15270 #endif
15271
Martin v. Löwis11437992002-04-12 09:54:03 +000015272 ;
15273 return 0;
15274}
15275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015276if ac_fn_c_try_compile "$LINENO"; then :
15277 # It does; now see whether it defined to _BIG_ENDIAN or not.
15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15279/* end confdefs.h. */
15280#include <limits.h>
15281
15282int
15283main ()
15284{
15285#ifndef _BIG_ENDIAN
15286 not big endian
15287 #endif
15288
15289 ;
15290 return 0;
15291}
15292_ACEOF
15293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015294 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015295else
Matthias Kloseb9621712010-04-24 17:59:49 +000015296 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15299fi
15300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15301 fi
15302 if test $ac_cv_c_bigendian = unknown; then
15303 # Compile a test program.
15304 if test "$cross_compiling" = yes; then :
15305 # Try to guess by grepping values from an object file.
15306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15307/* end confdefs.h. */
15308short int ascii_mm[] =
15309 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15310 short int ascii_ii[] =
15311 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15312 int use_ascii (int i) {
15313 return ascii_mm[i] + ascii_ii[i];
15314 }
15315 short int ebcdic_ii[] =
15316 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15317 short int ebcdic_mm[] =
15318 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15319 int use_ebcdic (int i) {
15320 return ebcdic_mm[i] + ebcdic_ii[i];
15321 }
15322 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323
Matthias Kloseb9621712010-04-24 17:59:49 +000015324int
15325main ()
15326{
15327return use_ascii (foo) == use_ebcdic (foo);
15328 ;
15329 return 0;
15330}
15331_ACEOF
15332if ac_fn_c_try_compile "$LINENO"; then :
15333 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15334 ac_cv_c_bigendian=yes
15335 fi
15336 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15337 if test "$ac_cv_c_bigendian" = unknown; then
15338 ac_cv_c_bigendian=no
15339 else
15340 # finding both strings is unlikely to happen, but who knows?
15341 ac_cv_c_bigendian=unknown
15342 fi
15343 fi
15344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015346else
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015348/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015350int
15351main ()
15352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 /* Are we little or big endian? From Harbison&Steele. */
15355 union
15356 {
15357 long int l;
15358 char c[sizeof (long int)];
15359 } u;
15360 u.l = 1;
15361 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362
15363 ;
15364 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015365}
Martin v. Löwis11437992002-04-12 09:54:03 +000015366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015367if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015368 ac_cv_c_bigendian=no
15369else
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15373 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15379$as_echo "$ac_cv_c_bigendian" >&6; }
15380 case $ac_cv_c_bigendian in #(
15381 yes)
15382 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15383;; #(
15384 no)
15385 ;; #(
15386 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015387
Matthias Kloseb9621712010-04-24 17:59:49 +000015388$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015389
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 ;; #(
15391 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015392 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015393 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015394 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015395
Michael W. Hudson54241132001-12-07 15:38:26 +000015396
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015397# ABI version string for Python extension modules. This appears between the
15398# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15399# from the following attributes which affect the ABI of this Python build (in
15400# this order):
15401#
15402# * The Python implementation (always 'cpython-' for us)
15403# * The major and minor version numbers
15404# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015405#
15406# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015407# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15408# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015409#
15410# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15411# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015412
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15414$as_echo_n "checking ABIFLAGS... " >&6; }
15415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15416$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15418$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015419SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15421$as_echo "$SOABI" >&6; }
15422
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015423# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15424if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015425 # Similar to SOABI but remove "d" flag from ABIFLAGS
15426
15427 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15428
15429cat >>confdefs.h <<_ACEOF
15430#define ALT_SOABI "${ALT_SOABI}"
15431_ACEOF
15432
15433fi
15434
Victor Stinner52a327c2020-12-23 03:41:08 +010015435
Matti Picusa44ce6c2020-12-20 04:56:57 +020015436EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015437
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15439$as_echo_n "checking LDVERSION... " >&6; }
15440LDVERSION='$(VERSION)$(ABIFLAGS)'
15441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15442$as_echo "$LDVERSION" >&6; }
15443
E. M. Brayc994c8f2019-05-24 17:33:47 +020015444# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015445
E. M. Brayb1fc4172019-05-24 18:39:39 +020015446if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015447 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015448else
15449 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015450fi
15451
doko@python.org87421192013-01-26 11:39:31 +010015452
Victor Stinner51ae31e2020-06-09 15:32:43 +020015453
15454BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15455
15456
15457# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015458# /usr/$LIDIRNAME/python$VERSION
15459
15460PLATLIBDIR="lib"
15461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15462$as_echo_n "checking for --with-platlibdir... " >&6; }
15463
15464# Check whether --with-platlibdir was given.
15465if test "${with_platlibdir+set}" = set; then :
15466 withval=$with_platlibdir;
15467# ignore 3 options:
15468# --with-platlibdir
15469# --with-platlibdir=
15470# --without-platlibdir
15471if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15472then
15473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15474$as_echo "yes" >&6; }
15475 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015476 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015477else
Victor Stinner8510f432020-03-10 09:53:09 +010015478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15479$as_echo "no" >&6; }
15480fi
15481else
15482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15483$as_echo "no" >&6; }
15484fi
15485
15486
15487
15488
15489if test x$PLATFORM_TRIPLET = x; then
15490 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15491else
15492 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015493fi
doko@python.org87421192013-01-26 11:39:31 +010015494
15495
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015496# Check whether right shifting a negative integer extends the sign bit
15497# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15499$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015500if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015502else
Martin v. Löwis11437992002-04-12 09:54:03 +000015503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015505 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015506else
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015508/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015509
15510int main()
15511{
Joshua Root674fa0a2020-12-14 07:56:34 +110015512 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015513}
15514
Martin v. Löwis11437992002-04-12 09:54:03 +000015515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015516if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015517 ac_cv_rshift_extends_sign=yes
15518else
Matthias Kloseb9621712010-04-24 17:59:49 +000015519 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15522 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015523fi
15524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015525fi
15526
Matthias Kloseb9621712010-04-24 17:59:49 +000015527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15528$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015529if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015530then
Martin v. Löwis11437992002-04-12 09:54:03 +000015531
Matthias Kloseb9621712010-04-24 17:59:49 +000015532$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015533
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015534fi
15535
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015536# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15538$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015539if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015541else
Martin v. Löwis11437992002-04-12 09:54:03 +000015542
Matthias Kloseb9621712010-04-24 17:59:49 +000015543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015544/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015545#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015546int
15547main ()
15548{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015549
15550 FILE *f = fopen("/dev/null", "r");
15551 flockfile(f);
15552 getc_unlocked(f);
15553 funlockfile(f);
15554
Martin v. Löwis11437992002-04-12 09:54:03 +000015555 ;
15556 return 0;
15557}
15558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015559if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015560 ac_cv_have_getc_unlocked=yes
15561else
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 ac_cv_have_getc_unlocked=no
15563fi
15564rm -f core conftest.err conftest.$ac_objext \
15565 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567
Matthias Kloseb9621712010-04-24 17:59:49 +000015568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15569$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015570if test "$ac_cv_have_getc_unlocked" = yes
15571then
Martin v. Löwis11437992002-04-12 09:54:03 +000015572
Matthias Kloseb9621712010-04-24 17:59:49 +000015573$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015574
15575fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015576
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015577# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015578# save the value of LIBS so we don't actually link Python with readline
15579LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015580
Gregory P. Smith18820942008-09-07 06:24:49 +000015581# On some systems we need to link readline to a termcap compatible
15582# library. NOTE: Keep the precedence of listed libraries synchronised
15583# with setup.py.
15584py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15586$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015587for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015588 if test -z "$py_libtermcap"; then
15589 READLINE_LIBS="-lreadline"
15590 else
15591 READLINE_LIBS="-lreadline -l$py_libtermcap"
15592 fi
15593 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015595/* end confdefs.h. */
15596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015597/* Override any GCC internal prototype to avoid an error.
15598 Use char because int might match the return type of a GCC
15599 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015600#ifdef __cplusplus
15601extern "C"
15602#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015603char readline ();
15604int
15605main ()
15606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015608 ;
15609 return 0;
15610}
15611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015612if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015613 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015615rm -f core conftest.err conftest.$ac_objext \
15616 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015617 if test $py_cv_lib_readline = yes; then
15618 break
15619 fi
15620done
15621# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15622#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015623if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15625$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015626else
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15628$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015629
Matthias Kloseb9621712010-04-24 17:59:49 +000015630$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015631
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015632fi
15633
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015634# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015636/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015637#include <readline/readline.h>
15638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015639if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015640 have_readline=yes
15641else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015642 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015643
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015644fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015645rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015646if test $have_readline = yes
15647then
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015649/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015650#include <readline/readline.h>
15651
15652_ACEOF
15653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015657
15658fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015659rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015660
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015662/* end confdefs.h. */
15663#include <readline/readline.h>
15664
15665_ACEOF
15666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015668
Matthias Kloseb9621712010-04-24 17:59:49 +000015669$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015670
15671fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015672rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015673
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015674fi
15675
Martin v. Löwis0daad592001-09-30 21:09:59 +000015676# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15678$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015679if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015681else
Martin v. Löwis11437992002-04-12 09:54:03 +000015682 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015683LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015687/* Override any GCC internal prototype to avoid an error.
15688 Use char because int might match the return type of a GCC
15689 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015690#ifdef __cplusplus
15691extern "C"
15692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015693char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015694int
15695main ()
15696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015697return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 ;
15699 return 0;
15700}
15701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015704else
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015707rm -f core conftest.err conftest.$ac_objext \
15708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015709LIBS=$ac_check_lib_save_LIBS
15710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15712$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015713if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015714
Matthias Kloseb9621712010-04-24 17:59:49 +000015715$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015716
Martin v. Löwis0daad592001-09-30 21:09:59 +000015717fi
15718
Michael W. Hudson54241132001-12-07 15:38:26 +000015719
Thomas Wouters89d996e2007-09-08 17:39:28 +000015720# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15722$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015723if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015725else
15726 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015727LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015729/* end confdefs.h. */
15730
15731/* Override any GCC internal prototype to avoid an error.
15732 Use char because int might match the return type of a GCC
15733 builtin and then its argument prototype would still apply. */
15734#ifdef __cplusplus
15735extern "C"
15736#endif
15737char rl_completion_display_matches_hook ();
15738int
15739main ()
15740{
15741return rl_completion_display_matches_hook ();
15742 ;
15743 return 0;
15744}
15745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015746if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015747 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15748else
Matthias Kloseb9621712010-04-24 17:59:49 +000015749 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015751rm -f core conftest.err conftest.$ac_objext \
15752 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015753LIBS=$ac_check_lib_save_LIBS
15754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15756$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015757if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015760
15761fi
15762
15763
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015764# also in 4.0, but not in editline
15765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15766$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15767if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15768 $as_echo_n "(cached) " >&6
15769else
15770 ac_check_lib_save_LIBS=$LIBS
15771LIBS="-lreadline $READLINE_LIBS $LIBS"
15772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15773/* end confdefs.h. */
15774
15775/* Override any GCC internal prototype to avoid an error.
15776 Use char because int might match the return type of a GCC
15777 builtin and then its argument prototype would still apply. */
15778#ifdef __cplusplus
15779extern "C"
15780#endif
15781char rl_resize_terminal ();
15782int
15783main ()
15784{
15785return rl_resize_terminal ();
15786 ;
15787 return 0;
15788}
15789_ACEOF
15790if ac_fn_c_try_link "$LINENO"; then :
15791 ac_cv_lib_readline_rl_resize_terminal=yes
15792else
15793 ac_cv_lib_readline_rl_resize_terminal=no
15794fi
15795rm -f core conftest.err conftest.$ac_objext \
15796 conftest$ac_exeext conftest.$ac_ext
15797LIBS=$ac_check_lib_save_LIBS
15798fi
15799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15800$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15801if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15802
15803$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15804
15805fi
15806
15807
Martin v. Löwis0daad592001-09-30 21:09:59 +000015808# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15810$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015811if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015813else
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015815LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015819/* Override any GCC internal prototype to avoid an error.
15820 Use char because int might match the return type of a GCC
15821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015822#ifdef __cplusplus
15823extern "C"
15824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015825char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015826int
15827main ()
15828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 ;
15831 return 0;
15832}
15833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015834if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015835 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015836else
Matthias Kloseb9621712010-04-24 17:59:49 +000015837 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015839rm -f core conftest.err conftest.$ac_objext \
15840 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015841LIBS=$ac_check_lib_save_LIBS
15842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15844$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015845if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015846
Matthias Kloseb9621712010-04-24 17:59:49 +000015847$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015848
Guido van Rossum353ae582001-07-10 16:45:32 +000015849fi
15850
Jack Jansendd19cf82001-12-06 22:36:17 +000015851
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015852# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015854/* end confdefs.h. */
15855#include <readline/readline.h>
15856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015857if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015858 have_readline=yes
15859else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015860 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015861
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015862fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015863rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015864if test $have_readline = yes
15865then
Matthias Kloseb9621712010-04-24 17:59:49 +000015866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015867/* end confdefs.h. */
15868#include <readline/readline.h>
15869
15870_ACEOF
15871if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015873
Matthias Kloseb9621712010-04-24 17:59:49 +000015874$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015875
15876fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015877rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015878
15879fi
15880
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15882$as_echo_n "checking for append_history in -lreadline... " >&6; }
15883if ${ac_cv_lib_readline_append_history+:} false; then :
15884 $as_echo_n "(cached) " >&6
15885else
15886 ac_check_lib_save_LIBS=$LIBS
15887LIBS="-lreadline $READLINE_LIBS $LIBS"
15888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889/* end confdefs.h. */
15890
15891/* Override any GCC internal prototype to avoid an error.
15892 Use char because int might match the return type of a GCC
15893 builtin and then its argument prototype would still apply. */
15894#ifdef __cplusplus
15895extern "C"
15896#endif
15897char append_history ();
15898int
15899main ()
15900{
15901return append_history ();
15902 ;
15903 return 0;
15904}
15905_ACEOF
15906if ac_fn_c_try_link "$LINENO"; then :
15907 ac_cv_lib_readline_append_history=yes
15908else
15909 ac_cv_lib_readline_append_history=no
15910fi
15911rm -f core conftest.err conftest.$ac_objext \
15912 conftest$ac_exeext conftest.$ac_ext
15913LIBS=$ac_check_lib_save_LIBS
15914fi
15915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15916$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15917if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15918
15919$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15920
15921fi
15922
15923
Martin v. Löwis82bca632006-02-10 20:49:30 +000015924# End of readline checks: restore LIBS
15925LIBS=$LIBS_no_readline
15926
Matthias Kloseb9621712010-04-24 17:59:49 +000015927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15928$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015929if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015930 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015931else
Martin v. Löwis11437992002-04-12 09:54:03 +000015932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015934 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015935else
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015937/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015938
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015939#include <stdlib.h>
15940#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015941int main()
15942{
15943 int val1 = nice(1);
15944 if (val1 != -1 && val1 == nice(2))
15945 exit(0);
15946 exit(1);
15947}
15948
Martin v. Löwis11437992002-04-12 09:54:03 +000015949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015950if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015951 ac_cv_broken_nice=yes
15952else
Matthias Kloseb9621712010-04-24 17:59:49 +000015953 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15956 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015957fi
15958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015959fi
15960
Matthias Kloseb9621712010-04-24 17:59:49 +000015961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15962$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015963if test "$ac_cv_broken_nice" = yes
15964then
Martin v. Löwis11437992002-04-12 09:54:03 +000015965
Matthias Kloseb9621712010-04-24 17:59:49 +000015966$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015967
15968fi
15969
Matthias Kloseb9621712010-04-24 17:59:49 +000015970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15971$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015972if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015974else
Matthias Kloseb9621712010-04-24 17:59:49 +000015975 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015976 ac_cv_broken_poll=no
15977else
Matthias Kloseb9621712010-04-24 17:59:49 +000015978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015979/* end confdefs.h. */
15980
15981#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110015982#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015984int main()
15985{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015986 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015987 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015988
15989 close (42);
15990
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015991 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015992 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015993 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015994 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015995 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015996 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015997 return 1;
15998}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015999
16000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016001if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016002 ac_cv_broken_poll=yes
16003else
Matthias Kloseb9621712010-04-24 17:59:49 +000016004 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16007 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016009
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016010fi
16011
Matthias Kloseb9621712010-04-24 17:59:49 +000016012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16013$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016014if test "$ac_cv_broken_poll" = yes
16015then
16016
Matthias Kloseb9621712010-04-24 17:59:49 +000016017$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016018
16019fi
16020
Martin v. Löwis1d459062005-03-14 21:23:33 +000016021# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000016022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16023$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016024if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016025 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016026else
16027
Matthias Kloseb9621712010-04-24 17:59:49 +000016028if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016029 ac_cv_working_tzset=no
16030else
Matthias Kloseb9621712010-04-24 17:59:49 +000016031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016032/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016033
16034#include <stdlib.h>
16035#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016036#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016037
16038#if HAVE_TZNAME
16039extern char *tzname[];
16040#endif
16041
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016042int main()
16043{
Brett Cannon18367812003-09-19 00:59:16 +000016044 /* Note that we need to ensure that not only does tzset(3)
16045 do 'something' with localtime, but it works as documented
16046 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016047 This includes making sure that tzname is set properly if
16048 tm->tm_zone does not exist since it is the alternative way
16049 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016050
16051 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016052 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016053 */
16054
Martin v. Löwis1d459062005-03-14 21:23:33 +000016055 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016056 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16057
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016058 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016059 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016060 if (localtime(&groundhogday)->tm_hour != 0)
16061 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016062#if HAVE_TZNAME
16063 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16064 if (strcmp(tzname[0], "UTC") ||
16065 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16066 exit(1);
16067#endif
Brett Cannon18367812003-09-19 00:59:16 +000016068
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016069 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016070 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016071 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016072 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016073#if HAVE_TZNAME
16074 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16075 exit(1);
16076#endif
Brett Cannon18367812003-09-19 00:59:16 +000016077
16078 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16079 tzset();
16080 if (localtime(&groundhogday)->tm_hour != 11)
16081 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016082#if HAVE_TZNAME
16083 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16084 exit(1);
16085#endif
16086
16087#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016088 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16089 exit(1);
16090 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16091 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016092#endif
Brett Cannon18367812003-09-19 00:59:16 +000016093
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016094 exit(0);
16095}
16096
16097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016098if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016099 ac_cv_working_tzset=yes
16100else
Matthias Kloseb9621712010-04-24 17:59:49 +000016101 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16104 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016105fi
16106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107fi
16108
Matthias Kloseb9621712010-04-24 17:59:49 +000016109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16110$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016111if test "$ac_cv_working_tzset" = yes
16112then
16113
Matthias Kloseb9621712010-04-24 17:59:49 +000016114$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016115
16116fi
16117
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016118# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16120$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016121if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016123else
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016125/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016126#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016127int
16128main ()
16129{
16130
16131struct stat st;
16132st.st_mtim.tv_nsec = 1;
16133
16134 ;
16135 return 0;
16136}
16137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016139 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016140else
Matthias Kloseb9621712010-04-24 17:59:49 +000016141 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16144fi
16145
Matthias Kloseb9621712010-04-24 17:59:49 +000016146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16147$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016148if test "$ac_cv_stat_tv_nsec" = yes
16149then
16150
Matthias Kloseb9621712010-04-24 17:59:49 +000016151$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016152
16153fi
16154
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016155# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16157$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016158if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016159 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016160else
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016162/* end confdefs.h. */
16163#include <sys/stat.h>
16164int
16165main ()
16166{
16167
16168struct stat st;
16169st.st_mtimespec.tv_nsec = 1;
16170
16171 ;
16172 return 0;
16173}
16174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016175if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016176 ac_cv_stat_tv_nsec2=yes
16177else
Matthias Kloseb9621712010-04-24 17:59:49 +000016178 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16181fi
16182
Matthias Kloseb9621712010-04-24 17:59:49 +000016183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16184$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016185if test "$ac_cv_stat_tv_nsec2" = yes
16186then
16187
Matthias Kloseb9621712010-04-24 17:59:49 +000016188$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016189
16190fi
16191
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016192# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016193ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016194if test "$cross_compiling" = no; then
16195 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16196fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016197
16198for ac_header in curses.h ncurses.h
16199do :
16200 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16201ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16202if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16203 cat >>confdefs.h <<_ACEOF
16204#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16205_ACEOF
16206
16207fi
16208
16209done
16210
16211
16212# On Solaris, term.h requires curses.h
16213for ac_header in term.h
16214do :
16215 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16216#ifdef HAVE_CURSES_H
16217#include <curses.h>
16218#endif
16219
16220"
16221if test "x$ac_cv_header_term_h" = xyes; then :
16222 cat >>confdefs.h <<_ACEOF
16223#define HAVE_TERM_H 1
16224_ACEOF
16225
16226fi
16227
16228done
16229
16230
Jack Jansen666b1e72001-10-31 12:11:48 +000016231# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16233$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016234if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016235 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016236else
Matthias Kloseb9621712010-04-24 17:59:49 +000016237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016238/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016239#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016240int
16241main ()
16242{
Jack Jansen666b1e72001-10-31 12:11:48 +000016243
16244 int rtn;
16245 rtn = mvwdelch(0,0,0);
16246
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 ;
16248 return 0;
16249}
16250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016251if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016252 ac_cv_mvwdelch_is_expression=yes
16253else
Matthias Kloseb9621712010-04-24 17:59:49 +000016254 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16257fi
16258
Matthias Kloseb9621712010-04-24 17:59:49 +000016259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16260$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016261
16262if test "$ac_cv_mvwdelch_is_expression" = yes
16263then
Martin v. Löwis11437992002-04-12 09:54:03 +000016264
Matthias Kloseb9621712010-04-24 17:59:49 +000016265$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016266
16267fi
16268
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016269# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16270# structs since version 5.7. If the macro is defined as zero before including
16271# [n]curses.h, ncurses will expose fields of the structs regardless of the
16272# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16274$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016275if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016276 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016277else
Matthias Kloseb9621712010-04-24 17:59:49 +000016278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016279/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016280
16281 #define NCURSES_OPAQUE 0
16282 #include <curses.h>
16283
Martin v. Löwis11437992002-04-12 09:54:03 +000016284int
16285main ()
16286{
Jack Jansen666b1e72001-10-31 12:11:48 +000016287
16288 WINDOW *w;
16289 w->_flags = 0;
16290
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 ;
16292 return 0;
16293}
16294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016295if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016296 ac_cv_window_has_flags=yes
16297else
Matthias Kloseb9621712010-04-24 17:59:49 +000016298 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16301fi
16302
Matthias Kloseb9621712010-04-24 17:59:49 +000016303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16304$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016305
Jack Jansen666b1e72001-10-31 12:11:48 +000016306
16307if test "$ac_cv_window_has_flags" = yes
16308then
Martin v. Löwis11437992002-04-12 09:54:03 +000016309
Matthias Kloseb9621712010-04-24 17:59:49 +000016310$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016311
16312fi
16313
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16315$as_echo_n "checking for is_pad... " >&6; }
16316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16317/* end confdefs.h. */
16318#include <curses.h>
16319int
16320main ()
16321{
16322
16323#ifndef is_pad
16324void *x=is_pad
16325#endif
16326
16327 ;
16328 return 0;
16329}
16330_ACEOF
16331if ac_fn_c_try_compile "$LINENO"; then :
16332
16333$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16334
16335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16336$as_echo "yes" >&6; }
16337else
16338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16339$as_echo "no" >&6; }
16340
16341fi
16342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16343
Matthias Kloseb9621712010-04-24 17:59:49 +000016344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16345$as_echo_n "checking for is_term_resized... " >&6; }
16346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016347/* end confdefs.h. */
16348#include <curses.h>
16349int
16350main ()
16351{
16352void *x=is_term_resized
16353 ;
16354 return 0;
16355}
16356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016358
Matthias Kloseb9621712010-04-24 17:59:49 +000016359$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016360
Matthias Kloseb159a552010-04-25 21:00:44 +000016361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016362$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016363else
Matthias Kloseb9621712010-04-24 17:59:49 +000016364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16365$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016366
16367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16369
Matthias Kloseb9621712010-04-24 17:59:49 +000016370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16371$as_echo_n "checking for resize_term... " >&6; }
16372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016373/* end confdefs.h. */
16374#include <curses.h>
16375int
16376main ()
16377{
16378void *x=resize_term
16379 ;
16380 return 0;
16381}
16382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016383if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016384
Matthias Kloseb9621712010-04-24 17:59:49 +000016385$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016386
Matthias Kloseb159a552010-04-25 21:00:44 +000016387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016388$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016389else
Matthias Kloseb9621712010-04-24 17:59:49 +000016390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16391$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016392
16393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16395
Matthias Kloseb9621712010-04-24 17:59:49 +000016396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16397$as_echo_n "checking for resizeterm... " >&6; }
16398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016399/* end confdefs.h. */
16400#include <curses.h>
16401int
16402main ()
16403{
16404void *x=resizeterm
16405 ;
16406 return 0;
16407}
16408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016409if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016410
Matthias Kloseb9621712010-04-24 17:59:49 +000016411$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016412
Matthias Kloseb159a552010-04-25 21:00:44 +000016413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016414$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016415else
Matthias Kloseb9621712010-04-24 17:59:49 +000016416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16417$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016418
16419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016421
16422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16423$as_echo_n "checking for immedok... " >&6; }
16424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16425/* end confdefs.h. */
16426#include <curses.h>
16427int
16428main ()
16429{
16430
16431#ifndef immedok
16432void *x=immedok
16433#endif
16434
16435 ;
16436 return 0;
16437}
16438_ACEOF
16439if ac_fn_c_try_compile "$LINENO"; then :
16440
16441$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16442
16443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16444$as_echo "yes" >&6; }
16445else
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16447$as_echo "no" >&6; }
16448
16449fi
16450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16451
16452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16453$as_echo_n "checking for syncok... " >&6; }
16454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16455/* end confdefs.h. */
16456#include <curses.h>
16457int
16458main ()
16459{
16460
16461#ifndef syncok
16462void *x=syncok
16463#endif
16464
16465 ;
16466 return 0;
16467}
16468_ACEOF
16469if ac_fn_c_try_compile "$LINENO"; then :
16470
16471$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16472
16473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16474$as_echo "yes" >&6; }
16475else
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16477$as_echo "no" >&6; }
16478
16479fi
16480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16481
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16483$as_echo_n "checking for wchgat... " >&6; }
16484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16485/* end confdefs.h. */
16486#include <curses.h>
16487int
16488main ()
16489{
16490
16491#ifndef wchgat
16492void *x=wchgat
16493#endif
16494
16495 ;
16496 return 0;
16497}
16498_ACEOF
16499if ac_fn_c_try_compile "$LINENO"; then :
16500
16501$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16502
16503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16504$as_echo "yes" >&6; }
16505else
16506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16507$as_echo "no" >&6; }
16508
16509fi
16510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16511
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16513$as_echo_n "checking for filter... " >&6; }
16514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16515/* end confdefs.h. */
16516#include <curses.h>
16517int
16518main ()
16519{
16520
16521#ifndef filter
16522void *x=filter
16523#endif
16524
16525 ;
16526 return 0;
16527}
16528_ACEOF
16529if ac_fn_c_try_compile "$LINENO"; then :
16530
16531$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16532
16533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16534$as_echo "yes" >&6; }
16535else
16536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16537$as_echo "no" >&6; }
16538
16539fi
16540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16541
16542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16543$as_echo_n "checking for has_key... " >&6; }
16544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16545/* end confdefs.h. */
16546#include <curses.h>
16547int
16548main ()
16549{
16550
16551#ifndef has_key
16552void *x=has_key
16553#endif
16554
16555 ;
16556 return 0;
16557}
16558_ACEOF
16559if ac_fn_c_try_compile "$LINENO"; then :
16560
16561$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16562
16563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16564$as_echo "yes" >&6; }
16565else
16566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16567$as_echo "no" >&6; }
16568
16569fi
16570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16571
16572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16573$as_echo_n "checking for typeahead... " >&6; }
16574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16575/* end confdefs.h. */
16576#include <curses.h>
16577int
16578main ()
16579{
16580
16581#ifndef typeahead
16582void *x=typeahead
16583#endif
16584
16585 ;
16586 return 0;
16587}
16588_ACEOF
16589if ac_fn_c_try_compile "$LINENO"; then :
16590
16591$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16592
16593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16594$as_echo "yes" >&6; }
16595else
16596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16597$as_echo "no" >&6; }
16598
16599fi
16600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16601
16602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16603$as_echo_n "checking for use_env... " >&6; }
16604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16605/* end confdefs.h. */
16606#include <curses.h>
16607int
16608main ()
16609{
16610
16611#ifndef use_env
16612void *x=use_env
16613#endif
16614
16615 ;
16616 return 0;
16617}
16618_ACEOF
16619if ac_fn_c_try_compile "$LINENO"; then :
16620
16621$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16622
16623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16624$as_echo "yes" >&6; }
16625else
16626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16627$as_echo "no" >&6; }
16628
16629fi
16630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016631# last curses configure check
16632CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16635$as_echo "$as_me: checking for device files" >&6;}
16636
16637if test "x$cross_compiling" = xyes; then
16638 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16640$as_echo_n "checking for /dev/ptmx... " >&6; }
16641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16642$as_echo "not set" >&6; }
16643 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16644 fi
16645 if test "${ac_cv_file__dev_ptc+set}" != set; then
16646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16647$as_echo_n "checking for /dev/ptc... " >&6; }
16648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16649$as_echo "not set" >&6; }
16650 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16651 fi
16652fi
16653
Matthias Kloseb9621712010-04-24 17:59:49 +000016654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16655$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016656if ${ac_cv_file__dev_ptmx+:} false; then :
16657 $as_echo_n "(cached) " >&6
16658else
16659 test "$cross_compiling" = yes &&
16660 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16661if test -r "/dev/ptmx"; then
16662 ac_cv_file__dev_ptmx=yes
16663else
16664 ac_cv_file__dev_ptmx=no
16665fi
16666fi
16667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16668$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16669if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016670
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016671fi
16672
16673if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016674
Matthias Kloseb9621712010-04-24 17:59:49 +000016675$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016676
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16679$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016680if ${ac_cv_file__dev_ptc+:} false; then :
16681 $as_echo_n "(cached) " >&6
16682else
16683 test "$cross_compiling" = yes &&
16684 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16685if test -r "/dev/ptc"; then
16686 ac_cv_file__dev_ptc=yes
16687else
16688 ac_cv_file__dev_ptc=no
16689fi
16690fi
16691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16692$as_echo "$ac_cv_file__dev_ptc" >&6; }
16693if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016694
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016695fi
16696
16697if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016698
Matthias Kloseb9621712010-04-24 17:59:49 +000016699$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016700
Neal Norwitz865400f2003-03-21 01:42:58 +000016701fi
16702
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016703if test $ac_sys_system = Darwin
16704then
16705 LIBS="$LIBS -framework CoreFoundation"
16706fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016707
Matthias Kloseb9621712010-04-24 17:59:49 +000016708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16709$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016710if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016711 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016712else
Matthias Kloseb9621712010-04-24 17:59:49 +000016713 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016714 ac_cv_have_size_t_format="cross -- assuming yes"
16715
Thomas Wouters477c8d52006-05-27 19:21:47 +000016716else
Matthias Kloseb9621712010-04-24 17:59:49 +000016717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016718/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016719
Thomas Wouters477c8d52006-05-27 19:21:47 +000016720#include <stdio.h>
16721#include <stddef.h>
16722#include <string.h>
16723
Christian Heimes2c181612007-12-17 20:04:13 +000016724#ifdef HAVE_SYS_TYPES_H
16725#include <sys/types.h>
16726#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016727
16728#ifdef HAVE_SSIZE_T
16729typedef ssize_t Py_ssize_t;
16730#elif SIZEOF_VOID_P == SIZEOF_LONG
16731typedef long Py_ssize_t;
16732#else
16733typedef int Py_ssize_t;
16734#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016735
Christian Heimes2c181612007-12-17 20:04:13 +000016736int main()
16737{
16738 char buffer[256];
16739
Thomas Wouters477c8d52006-05-27 19:21:47 +000016740 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16741 return 1;
16742
Thomas Wouters89f507f2006-12-13 04:49:30 +000016743 if (strcmp(buffer, "123"))
16744 return 1;
16745
16746 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16747 return 1;
16748
16749 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016750 return 1;
16751
16752 return 0;
16753}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016754
Thomas Wouters477c8d52006-05-27 19:21:47 +000016755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016756if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016757 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016758else
Matthias Kloseb9621712010-04-24 17:59:49 +000016759 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16762 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016763fi
16764
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16767$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016768if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016769
Matthias Kloseb9621712010-04-24 17:59:49 +000016770$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016771
16772fi
16773
Matthias Kloseb9621712010-04-24 17:59:49 +000016774ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016775#ifdef HAVE_SYS_TYPES_H
16776#include <sys/types.h>
16777#endif
16778#ifdef HAVE_SYS_SOCKET_H
16779#include <sys/socket.h>
16780#endif
16781
Matthias Kloseb9621712010-04-24 17:59:49 +000016782"
Victor Stinnere0be4232011-10-25 13:06:09 +020016783if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016784
Martin v. Löwis11437992002-04-12 09:54:03 +000016785else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016786
Matthias Kloseb9621712010-04-24 17:59:49 +000016787$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016788
16789fi
16790
Michael W. Hudson54241132001-12-07 15:38:26 +000016791
Matthias Kloseb9621712010-04-24 17:59:49 +000016792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16793$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016794if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016795 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016796else
Matthias Kloseb9621712010-04-24 17:59:49 +000016797 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016798 ac_cv_broken_mbstowcs=no
16799else
Matthias Kloseb9621712010-04-24 17:59:49 +000016800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016801/* end confdefs.h. */
16802
Stefan Krah19c21392012-11-22 23:47:32 +010016803#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016804#include<stdlib.h>
16805int main() {
16806 size_t len = -1;
16807 const char *str = "text";
16808 len = mbstowcs(NULL, str, 0);
16809 return (len != 4);
16810}
16811
16812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016813if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016814 ac_cv_broken_mbstowcs=no
16815else
Matthias Kloseb9621712010-04-24 17:59:49 +000016816 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016820fi
16821
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016822fi
16823
Matthias Kloseb9621712010-04-24 17:59:49 +000016824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16825$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016826if test "$ac_cv_broken_mbstowcs" = yes
16827then
16828
Matthias Kloseb9621712010-04-24 17:59:49 +000016829$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016830
16831fi
16832
Antoine Pitroub52ec782009-01-25 16:34:23 +000016833# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16835$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016836
16837# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016838if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016839 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016840if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016841then
16842
Matthias Kloseb9621712010-04-24 17:59:49 +000016843$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016844
Matthias Kloseb9621712010-04-24 17:59:49 +000016845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16846$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016847fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016848if test "$withval" = no
16849then
16850
16851$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16852
Matthias Kloseb9621712010-04-24 17:59:49 +000016853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16854$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016855fi
16856
Antoine Pitrou042b1282010-08-13 21:15:58 +000016857else
16858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16859$as_echo "no value specified" >&6; }
16860fi
16861
Antoine Pitroub52ec782009-01-25 16:34:23 +000016862
Matthias Kloseb17289e2012-03-15 19:51:34 +010016863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16864$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16865if ${ac_cv_computed_gotos+:} false; then :
16866 $as_echo_n "(cached) " >&6
16867else
16868 if test "$cross_compiling" = yes; then :
16869 if test "${with_computed_gotos+set}" = set; then
16870 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16871 else
16872 ac_cv_computed_gotos=no
16873 fi
16874else
16875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16876/* end confdefs.h. */
16877
16878int main(int argc, char **argv)
16879{
16880 static void *targets[1] = { &&LABEL1 };
16881 goto LABEL2;
16882LABEL1:
16883 return 0;
16884LABEL2:
16885 goto *targets[0];
16886 return 1;
16887}
16888
16889_ACEOF
16890if ac_fn_c_try_run "$LINENO"; then :
16891 ac_cv_computed_gotos=yes
16892else
16893 ac_cv_computed_gotos=no
16894fi
16895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16896 conftest.$ac_objext conftest.beam conftest.$ac_ext
16897fi
16898
16899fi
16900
16901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16902$as_echo "$ac_cv_computed_gotos" >&6; }
16903case "$ac_cv_computed_gotos" in yes*)
16904
16905$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16906
16907esac
16908
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016909case $ac_sys_system in
16910AIX*)
16911
16912$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16913 ;;
16914esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016915
Michael W. Hudson54241132001-12-07 15:38:26 +000016916
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016917
16918
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016919for h in `(cd $srcdir;echo Python/thread_*.h)`
16920do
16921 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16922done
16923
Michael W. Hudson54241132001-12-07 15:38:26 +000016924
Ned Deily8d02f912020-06-25 10:46:44 -040016925SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16927$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016928for dir in $SRCDIRS; do
16929 if test ! -d $dir; then
16930 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016931 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016932done
Matthias Kloseb9621712010-04-24 17:59:49 +000016933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16934$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016935
Stefan Krah1919b7e2012-03-21 18:25:23 +010016936# Availability of -O2:
16937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16938$as_echo_n "checking for -O2... " >&6; }
16939saved_cflags="$CFLAGS"
16940CFLAGS="-O2"
16941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16942/* end confdefs.h. */
16943
16944int
16945main ()
16946{
16947
16948
16949 ;
16950 return 0;
16951}
16952_ACEOF
16953if ac_fn_c_try_compile "$LINENO"; then :
16954 have_O2=yes
16955else
16956 have_O2=no
16957fi
16958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16960$as_echo "$have_O2" >&6; }
16961CFLAGS="$saved_cflags"
16962
16963# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16964# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16966$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16967saved_cflags="$CFLAGS"
16968CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16969if test "$have_O2" = no; then
16970 CFLAGS=""
16971fi
16972if test "$cross_compiling" = yes; then :
16973 have_glibc_memmove_bug=undefined
16974else
16975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16976/* end confdefs.h. */
16977
16978#include <stdio.h>
16979#include <stdlib.h>
16980#include <string.h>
16981void foo(void *p, void *q) { memmove(p, q, 19); }
16982int main() {
16983 char a[32] = "123456789000000000";
16984 foo(&a[9], a);
16985 if (strcmp(a, "123456789123456789000000000") != 0)
16986 return 1;
16987 foo(a, &a[9]);
16988 if (strcmp(a, "123456789000000000") != 0)
16989 return 1;
16990 return 0;
16991}
16992
16993_ACEOF
16994if ac_fn_c_try_run "$LINENO"; then :
16995 have_glibc_memmove_bug=no
16996else
16997 have_glibc_memmove_bug=yes
16998fi
16999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17000 conftest.$ac_objext conftest.beam conftest.$ac_ext
17001fi
17002
17003CFLAGS="$saved_cflags"
17004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17005$as_echo "$have_glibc_memmove_bug" >&6; }
17006if test "$have_glibc_memmove_bug" = yes; then
17007
17008$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
17009
17010fi
17011
17012if test "$have_gcc_asm_for_x87" = yes; then
17013 # Some versions of gcc miscompile inline asm:
17014 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17015 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17016 case $CC in
17017 *gcc*)
17018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17019$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
17020 saved_cflags="$CFLAGS"
17021 CFLAGS="-O2"
17022 if test "$cross_compiling" = yes; then :
17023 have_ipa_pure_const_bug=undefined
17024else
17025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17026/* end confdefs.h. */
17027
17028 __attribute__((noinline)) int
17029 foo(int *p) {
17030 int r;
17031 asm ( "movl \$6, (%1)\n\t"
17032 "xorl %0, %0\n\t"
17033 : "=r" (r) : "r" (p) : "memory"
17034 );
17035 return r;
17036 }
17037 int main() {
17038 int p = 8;
17039 if ((foo(&p) ? : p) != 6)
17040 return 1;
17041 return 0;
17042 }
17043
17044_ACEOF
17045if ac_fn_c_try_run "$LINENO"; then :
17046 have_ipa_pure_const_bug=no
17047else
17048 have_ipa_pure_const_bug=yes
17049fi
17050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17051 conftest.$ac_objext conftest.beam conftest.$ac_ext
17052fi
17053
17054 CFLAGS="$saved_cflags"
17055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17056$as_echo "$have_ipa_pure_const_bug" >&6; }
17057 if test "$have_ipa_pure_const_bug" = yes; then
17058
17059$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
17060
17061 fi
17062 ;;
17063 esac
17064fi
17065
Victor Stinner4f5366e2015-01-09 02:13:19 +010017066# Check for stdatomic.h
17067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17068$as_echo_n "checking for stdatomic.h... " >&6; }
17069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17070/* end confdefs.h. */
17071
17072
17073 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017074 atomic_int int_var;
17075 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017076 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017077 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17078 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17079 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017080 return 0;
17081 }
17082
17083
17084_ACEOF
17085if ac_fn_c_try_link "$LINENO"; then :
17086 have_stdatomic_h=yes
17087else
17088 have_stdatomic_h=no
17089fi
17090rm -f core conftest.err conftest.$ac_objext \
17091 conftest$ac_exeext conftest.$ac_ext
17092
17093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17094$as_echo "$have_stdatomic_h" >&6; }
17095
17096if test "$have_stdatomic_h" = yes; then
17097
17098$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
17099
17100fi
17101
Victor Stinner52a327c2020-12-23 03:41:08 +010017102# Check for GCC >= 4.7 and clang __atomic builtin functions
17103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17104$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17106/* end confdefs.h. */
17107
17108
Victor Stinner52a327c2020-12-23 03:41:08 +010017109 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017110 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017111 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17112 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017113 return 0;
17114 }
17115
17116
17117_ACEOF
17118if ac_fn_c_try_link "$LINENO"; then :
17119 have_builtin_atomic=yes
17120else
17121 have_builtin_atomic=no
17122fi
17123rm -f core conftest.err conftest.$ac_objext \
17124 conftest$ac_exeext conftest.$ac_ext
17125
17126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17127$as_echo "$have_builtin_atomic" >&6; }
17128
17129if test "$have_builtin_atomic" = yes; then
17130
17131$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17132
17133fi
17134
Ned Deily322f5ba2013-11-21 23:01:59 -080017135# ensurepip option
17136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17137$as_echo_n "checking for ensurepip... " >&6; }
17138
17139# Check whether --with-ensurepip was given.
17140if test "${with_ensurepip+set}" = set; then :
17141 withval=$with_ensurepip;
17142else
17143 with_ensurepip=upgrade
17144fi
17145
17146case $with_ensurepip in #(
17147 yes|upgrade) :
17148 ENSUREPIP=upgrade ;; #(
17149 install) :
17150 ENSUREPIP=install ;; #(
17151 no) :
17152 ENSUREPIP=no ;; #(
17153 *) :
17154 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17155esac
17156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17157$as_echo "$ENSUREPIP" >&6; }
17158
17159
Victor Stinner35a97c02015-03-08 02:59:09 +010017160# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17162$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17164/* end confdefs.h. */
17165
17166
17167 #include <dirent.h>
17168
17169 int main() {
17170 struct dirent entry;
17171 return entry.d_type == DT_UNKNOWN;
17172 }
17173
17174
17175_ACEOF
17176if ac_fn_c_try_link "$LINENO"; then :
17177 have_dirent_d_type=yes
17178else
17179 have_dirent_d_type=no
17180fi
17181rm -f core conftest.err conftest.$ac_objext \
17182 conftest$ac_exeext conftest.$ac_ext
17183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17184$as_echo "$have_dirent_d_type" >&6; }
17185
17186if test "$have_dirent_d_type" = yes; then
17187
17188$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17189
17190fi
17191
Victor Stinner9eb57c52015-03-19 22:21:49 +010017192# check if the Linux getrandom() syscall is available
17193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17194$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17196/* end confdefs.h. */
17197
17198
Victor Stinner1b80b242016-04-12 22:34:58 +020017199 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017200 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017201 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017202
17203 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017204 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017205 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017206 const int flags = GRND_NONBLOCK;
17207 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017208 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017209 return 0;
17210 }
17211
17212
17213_ACEOF
17214if ac_fn_c_try_link "$LINENO"; then :
17215 have_getrandom_syscall=yes
17216else
17217 have_getrandom_syscall=no
17218fi
17219rm -f core conftest.err conftest.$ac_objext \
17220 conftest$ac_exeext conftest.$ac_ext
17221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17222$as_echo "$have_getrandom_syscall" >&6; }
17223
17224if test "$have_getrandom_syscall" = yes; then
17225
17226$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17227
17228fi
17229
Victor Stinner3abf44e2015-09-18 15:38:37 +020017230# check if the getrandom() function is available
17231# the test was written for the Solaris function of <sys/random.h>
17232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17233$as_echo_n "checking for the getrandom() function... " >&6; }
17234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17235/* end confdefs.h. */
17236
17237
17238 #include <sys/random.h>
17239
17240 int main() {
17241 char buffer[1];
17242 const size_t buflen = sizeof(buffer);
17243 const int flags = 0;
17244 /* ignore the result, Python checks for ENOSYS at runtime */
17245 (void)getrandom(buffer, buflen, flags);
17246 return 0;
17247 }
17248
17249
17250_ACEOF
17251if ac_fn_c_try_link "$LINENO"; then :
17252 have_getrandom=yes
17253else
17254 have_getrandom=no
17255fi
17256rm -f core conftest.err conftest.$ac_objext \
17257 conftest$ac_exeext conftest.$ac_ext
17258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17259$as_echo "$have_getrandom" >&6; }
17260
17261if test "$have_getrandom" = yes; then
17262
17263$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17264
17265fi
17266
Neil Schemenauer5741c452019-02-08 10:48:46 -080017267# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17268# shm_* may only be available if linking against librt
17269save_LIBS="$LIBS"
17270save_includes_default="$ac_includes_default"
17271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17272$as_echo_n "checking for library containing shm_open... " >&6; }
17273if ${ac_cv_search_shm_open+:} false; then :
17274 $as_echo_n "(cached) " >&6
17275else
17276 ac_func_search_save_LIBS=$LIBS
17277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17278/* end confdefs.h. */
17279
17280/* Override any GCC internal prototype to avoid an error.
17281 Use char because int might match the return type of a GCC
17282 builtin and then its argument prototype would still apply. */
17283#ifdef __cplusplus
17284extern "C"
17285#endif
17286char shm_open ();
17287int
17288main ()
17289{
17290return shm_open ();
17291 ;
17292 return 0;
17293}
17294_ACEOF
17295for ac_lib in '' rt; do
17296 if test -z "$ac_lib"; then
17297 ac_res="none required"
17298 else
17299 ac_res=-l$ac_lib
17300 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17301 fi
17302 if ac_fn_c_try_link "$LINENO"; then :
17303 ac_cv_search_shm_open=$ac_res
17304fi
17305rm -f core conftest.err conftest.$ac_objext \
17306 conftest$ac_exeext
17307 if ${ac_cv_search_shm_open+:} false; then :
17308 break
17309fi
17310done
17311if ${ac_cv_search_shm_open+:} false; then :
17312
17313else
17314 ac_cv_search_shm_open=no
17315fi
17316rm conftest.$ac_ext
17317LIBS=$ac_func_search_save_LIBS
17318fi
17319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17320$as_echo "$ac_cv_search_shm_open" >&6; }
17321ac_res=$ac_cv_search_shm_open
17322if test "$ac_res" != no; then :
17323 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17324
17325fi
17326
17327if test "$ac_cv_search_shm_open" = "-lrt"; then
17328
17329$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17330
17331fi
17332for ac_header in sys/mman.h
17333do :
17334 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17335if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17336 cat >>confdefs.h <<_ACEOF
17337#define HAVE_SYS_MMAN_H 1
17338_ACEOF
17339
17340fi
17341
17342done
17343
17344# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17345ac_includes_default="\
17346${ac_includes_default}
17347#ifndef __cplusplus
17348# ifdef HAVE_SYS_MMAN_H
17349# include <sys/mman.h>
17350# endif
17351#endif
17352"
17353for ac_func in shm_open shm_unlink
17354do :
17355 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17356ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17357if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17358 cat >>confdefs.h <<_ACEOF
17359#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17360_ACEOF
17361
17362fi
17363done
17364
17365# we don't want to link with librt always, restore LIBS
17366LIBS="$save_LIBS"
17367ac_includes_default="$save_includes_default"
17368
Christian Heimesff5be6e2018-01-20 13:19:21 +010017369# Check for usable OpenSSL
17370
17371 found=false
17372
17373# Check whether --with-openssl was given.
17374if test "${with_openssl+set}" = set; then :
17375 withval=$with_openssl;
17376 case "$withval" in
17377 "" | y | ye | yes | n | no)
17378 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17379 ;;
17380 *) ssldirs="$withval"
17381 ;;
17382 esac
17383
17384else
17385
17386 # if pkg-config is installed and openssl has installed a .pc file,
17387 # then use that information and don't search ssldirs
17388 if test -n "$ac_tool_prefix"; then
17389 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17390set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17392$as_echo_n "checking for $ac_word... " >&6; }
17393if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17394 $as_echo_n "(cached) " >&6
17395else
17396 if test -n "$PKG_CONFIG"; then
17397 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17398else
17399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17400for as_dir in $PATH
17401do
17402 IFS=$as_save_IFS
17403 test -z "$as_dir" && as_dir=.
17404 for ac_exec_ext in '' $ac_executable_extensions; do
17405 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17406 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17408 break 2
17409 fi
17410done
17411 done
17412IFS=$as_save_IFS
17413
17414fi
17415fi
17416PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17417if test -n "$PKG_CONFIG"; then
17418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17419$as_echo "$PKG_CONFIG" >&6; }
17420else
17421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17422$as_echo "no" >&6; }
17423fi
17424
17425
17426fi
17427if test -z "$ac_cv_prog_PKG_CONFIG"; then
17428 ac_ct_PKG_CONFIG=$PKG_CONFIG
17429 # Extract the first word of "pkg-config", so it can be a program name with args.
17430set dummy pkg-config; ac_word=$2
17431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17432$as_echo_n "checking for $ac_word... " >&6; }
17433if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17434 $as_echo_n "(cached) " >&6
17435else
17436 if test -n "$ac_ct_PKG_CONFIG"; then
17437 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17438else
17439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17440for as_dir in $PATH
17441do
17442 IFS=$as_save_IFS
17443 test -z "$as_dir" && as_dir=.
17444 for ac_exec_ext in '' $ac_executable_extensions; do
17445 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17446 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17448 break 2
17449 fi
17450done
17451 done
17452IFS=$as_save_IFS
17453
17454fi
17455fi
17456ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17457if test -n "$ac_ct_PKG_CONFIG"; then
17458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17459$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17460else
17461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17462$as_echo "no" >&6; }
17463fi
17464
17465 if test "x$ac_ct_PKG_CONFIG" = x; then
17466 PKG_CONFIG=""
17467 else
17468 case $cross_compiling:$ac_tool_warned in
17469yes:)
17470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17472ac_tool_warned=yes ;;
17473esac
17474 PKG_CONFIG=$ac_ct_PKG_CONFIG
17475 fi
17476else
17477 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17478fi
17479
17480 if test x"$PKG_CONFIG" != x""; then
17481 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17482 if test $? = 0; then
17483 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17484 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17485 found=true
17486 fi
17487 fi
17488
17489 # no such luck; use some default ssldirs
17490 if ! $found; then
17491 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17492 fi
17493
17494
17495fi
17496
17497
17498
17499 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17500 # an 'openssl' subdirectory
17501
17502 if ! $found; then
17503 OPENSSL_INCLUDES=
17504 for ssldir in $ssldirs; do
17505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17506$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17507 if test -f "$ssldir/include/openssl/ssl.h"; then
17508 OPENSSL_INCLUDES="-I$ssldir/include"
17509 OPENSSL_LDFLAGS="-L$ssldir/lib"
17510 OPENSSL_LIBS="-lssl -lcrypto"
17511 found=true
17512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17513$as_echo "yes" >&6; }
17514 break
17515 else
17516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17517$as_echo "no" >&6; }
17518 fi
17519 done
17520
17521 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17522 # it will just work!
17523 fi
17524
17525 # try the preprocessor and linker with our new flags,
17526 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17527
17528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17529$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17530 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17531 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17532
17533 save_LIBS="$LIBS"
17534 save_LDFLAGS="$LDFLAGS"
17535 save_CPPFLAGS="$CPPFLAGS"
17536 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17537 LIBS="$OPENSSL_LIBS $LIBS"
17538 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17540/* end confdefs.h. */
17541#include <openssl/ssl.h>
17542int
17543main ()
17544{
17545SSL_new(NULL)
17546 ;
17547 return 0;
17548}
17549_ACEOF
17550if ac_fn_c_try_link "$LINENO"; then :
17551
17552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17553$as_echo "yes" >&6; }
17554 have_openssl=yes
17555
17556else
17557
17558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17559$as_echo "no" >&6; }
17560 have_openssl=no
17561
17562fi
17563rm -f core conftest.err conftest.$ac_objext \
17564 conftest$ac_exeext conftest.$ac_ext
17565 CPPFLAGS="$save_CPPFLAGS"
17566 LDFLAGS="$save_LDFLAGS"
17567 LIBS="$save_LIBS"
17568
17569
17570
17571
17572
17573
17574if test "$have_openssl" = yes; then
17575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17576$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17577
17578 save_LIBS="$LIBS"
17579 save_LDFLAGS="$LDFLAGS"
17580 save_CPPFLAGS="$CPPFLAGS"
17581 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17582 LIBS="$OPENSSL_LIBS $LIBS"
17583 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17584
17585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17586/* end confdefs.h. */
17587
17588 #include <openssl/x509_vfy.h>
17589
17590int
17591main ()
17592{
17593
17594 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17595 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17596 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17597 X509_VERIFY_PARAM_set_hostflags(p, 0);
17598
17599 ;
17600 return 0;
17601}
17602
17603_ACEOF
17604if ac_fn_c_try_link "$LINENO"; then :
17605
17606 ac_cv_has_x509_verify_param_set1_host=yes
17607
17608else
17609
17610 ac_cv_has_x509_verify_param_set1_host=no
17611
17612fi
17613rm -f core conftest.err conftest.$ac_objext \
17614 conftest$ac_exeext conftest.$ac_ext
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17616$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17617 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17618
17619$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17620
17621 fi
17622
17623 CPPFLAGS="$save_CPPFLAGS"
17624 LDFLAGS="$save_LDFLAGS"
17625 LIBS="$save_LIBS"
17626fi
17627
Christian Heimes892d66e2018-01-29 14:10:18 +010017628# ssl module default cipher suite string
17629
17630
17631
17632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17633$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17634
17635# Check whether --with-ssl-default-suites was given.
17636if test "${with_ssl_default_suites+set}" = set; then :
17637 withval=$with_ssl_default_suites;
17638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17639$as_echo "$withval" >&6; }
17640case "$withval" in
17641 python)
17642 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17643
17644 ;;
17645 openssl)
17646 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17647
17648 ;;
17649 *)
17650 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17651
17652 cat >>confdefs.h <<_ACEOF
17653#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17654_ACEOF
17655
17656 ;;
17657esac
17658
17659else
17660
17661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17662$as_echo "python" >&6; }
17663$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17664
17665
17666fi
17667
17668
Christian Heimes9b60e552020-05-15 23:54:53 +020017669# builtin hash modules
17670default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17671
17672$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17673
17674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17675$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17676
17677# Check whether --with-builtin-hashlib-hashes was given.
17678if test "${with_builtin_hashlib_hashes+set}" = set; then :
17679 withval=$with_builtin_hashlib_hashes;
17680case "$withval" in
17681 yes)
17682 withval=$default_hashlib_hashes
17683 ;;
17684 no)
17685 withval=""
17686 ;;
17687esac
17688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17689$as_echo "$withval" >&6; }
17690cat >>confdefs.h <<_ACEOF
17691#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17692_ACEOF
17693
17694
17695else
17696
17697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17698$as_echo "$default_hashlib_hashes" >&6; };
17699cat >>confdefs.h <<_ACEOF
17700#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17701_ACEOF
17702
17703
17704fi
17705
17706
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017707# --with-experimental-isolated-subinterpreters
17708
17709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17710$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17711
17712# Check whether --with-experimental-isolated-subinterpreters was given.
17713if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17714 withval=$with_experimental_isolated_subinterpreters;
17715if test "$withval" != no
17716then
17717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17718$as_echo "yes" >&6; };
17719 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17720
17721else
17722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17723$as_echo "no" >&6; };
17724fi
17725else
17726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17727$as_echo "no" >&6; }
17728fi
17729
17730
pxinwr277ce302020-12-30 20:50:39 +080017731# Check whether to disable test modules. Once set, setup.py will not build
17732# test extension modules and "make install" will not install test suites.
17733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17734$as_echo_n "checking for --disable-test-modules... " >&6; }
17735# Check whether --enable-test-modules was given.
17736if test "${enable_test_modules+set}" = set; then :
17737 enableval=$enable_test_modules;
17738fi
17739
17740if test "$enable_test_modules" = no; then
17741 TEST_MODULES=no
17742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17743$as_echo "yes" >&6; }
17744else
17745 TEST_MODULES=yes
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17747$as_echo "no" >&6; }
17748fi
17749
17750
Christian Heimes892d66e2018-01-29 14:10:18 +010017751
Guido van Rossum627b2d71993-12-24 10:39:16 +000017752# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017753ac_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 +000017754
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017755ac_config_files="$ac_config_files Modules/ld_so_aix"
17756
Martin v. Löwis11437992002-04-12 09:54:03 +000017757cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017758# This file is a shell script that caches the results of configure
17759# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017760# scripts and configure runs, see configure's option --config-cache.
17761# It is not useful on other systems. If it contains results you don't
17762# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017763#
Martin v. Löwis11437992002-04-12 09:54:03 +000017764# config.status only pays attention to the cache file if you give it
17765# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017766#
Skip Montanaro6dead952003-09-25 14:50:04 +000017767# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017768# loading this file, other *unset* `ac_cv_foo' will be assigned the
17769# following values.
17770
17771_ACEOF
17772
Guido van Rossumf78abae1997-01-21 22:02:36 +000017773# The following way of writing the cache mishandles newlines in values,
17774# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017776# Ultrix sh set writes to stderr and can't be redirected directly,
17777# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017778(
17779 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17780 eval ac_val=\$$ac_var
17781 case $ac_val in #(
17782 *${as_nl}*)
17783 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017784 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17785$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017786 esac
17787 case $ac_var in #(
17788 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017789 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17790 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017791 esac ;;
17792 esac
17793 done
17794
Martin v. Löwis11437992002-04-12 09:54:03 +000017795 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17797 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017798 # `set' does not quote correctly, so add quotes: double-quote
17799 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017801 "s/'/'\\\\''/g;
17802 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017804 *)
17805 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017807 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808 esac |
17809 sort
17810) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017811 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017812 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017813 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017815 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17816 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17818 :end' >>confcache
17819if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17820 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017821 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017822 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17823$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017824 if test ! -f "$cache_file" || test -h "$cache_file"; then
17825 cat confcache >"$cache_file"
17826 else
17827 case $cache_file in #(
17828 */* | ?:*)
17829 mv -f confcache "$cache_file"$$ &&
17830 mv -f "$cache_file"$$ "$cache_file" ;; #(
17831 *)
17832 mv -f confcache "$cache_file" ;;
17833 esac
17834 fi
17835 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017836 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017837 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17838$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017839 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017840fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017841rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017842
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017843test "x$prefix" = xNONE && prefix=$ac_default_prefix
17844# Let make expand exec_prefix.
17845test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017846
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017847DEFS=-DHAVE_CONFIG_H
17848
Skip Montanaro6dead952003-09-25 14:50:04 +000017849ac_libobjs=
17850ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017851U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017852for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17853 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017855 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017856 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17857 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017858 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17859 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017860done
17861LIBOBJS=$ac_libobjs
17862
17863LTLIBOBJS=$ac_ltlibobjs
17864
17865
Martin v. Löwis11437992002-04-12 09:54:03 +000017866
Matthias Kloseb9621712010-04-24 17:59:49 +000017867
Victor Stinnere0be4232011-10-25 13:06:09 +020017868: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017869ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017870ac_clean_files_save=$ac_clean_files
17871ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017872{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17873$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17874as_write_fail=0
17875cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017876#! $SHELL
17877# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017878# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017879# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017880# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017881
Martin v. Löwis11437992002-04-12 09:54:03 +000017882debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017883ac_cs_recheck=false
17884ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017885
Matthias Kloseb9621712010-04-24 17:59:49 +000017886SHELL=\${CONFIG_SHELL-$SHELL}
17887export SHELL
17888_ASEOF
17889cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17890## -------------------- ##
17891## M4sh Initialization. ##
17892## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894# Be more Bourne compatible
17895DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017896if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 emulate sh
17898 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017899 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017900 # is contrary to our usage. Disable this feature.
17901 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017903else
Matthias Kloseb9621712010-04-24 17:59:49 +000017904 case `(set -o) 2>/dev/null` in #(
17905 *posix*) :
17906 set -o posix ;; #(
17907 *) :
17908 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017909esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017910fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017911
17912
Matthias Kloseb9621712010-04-24 17:59:49 +000017913as_nl='
17914'
17915export as_nl
17916# Printing a long string crashes Solaris 7 /usr/bin/printf.
17917as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17918as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17919as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17920# Prefer a ksh shell builtin over an external printf program on Solaris,
17921# but without wasting forks for bash or zsh.
17922if test -z "$BASH_VERSION$ZSH_VERSION" \
17923 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17924 as_echo='print -r --'
17925 as_echo_n='print -rn --'
17926elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17927 as_echo='printf %s\n'
17928 as_echo_n='printf %s'
17929else
17930 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17931 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17932 as_echo_n='/usr/ucb/echo -n'
17933 else
17934 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17935 as_echo_n_body='eval
17936 arg=$1;
17937 case $arg in #(
17938 *"$as_nl"*)
17939 expr "X$arg" : "X\\(.*\\)$as_nl";
17940 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17941 esac;
17942 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17943 '
17944 export as_echo_n_body
17945 as_echo_n='sh -c $as_echo_n_body as_echo'
17946 fi
17947 export as_echo_body
17948 as_echo='sh -c $as_echo_body as_echo'
17949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017950
17951# The user is always right.
17952if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017953 PATH_SEPARATOR=:
17954 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17955 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17956 PATH_SEPARATOR=';'
17957 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017960
17961# IFS
17962# We need space, tab and new line, in precisely that order. Quoting is
17963# there to prevent editors from complaining about space-tab.
17964# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17965# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017966IFS=" "" $as_nl"
17967
17968# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017969as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017970case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017971 *[\\/]* ) as_myself=$0 ;;
17972 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017973for as_dir in $PATH
17974do
17975 IFS=$as_save_IFS
17976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017977 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17978 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981 ;;
17982esac
17983# We did not find ourselves, most probably we were run as `sh COMMAND'
17984# in which case we are not to be found in the path.
17985if test "x$as_myself" = x; then
17986 as_myself=$0
17987fi
17988if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017989 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17990 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991fi
17992
Matthias Kloseb9621712010-04-24 17:59:49 +000017993# Unset variables that we do not need and which cause bugs (e.g. in
17994# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17995# suppresses any "Segmentation fault" message there. '((' could
17996# trigger a bug in pdksh 5.2.14.
17997for as_var in BASH_ENV ENV MAIL MAILPATH
17998do eval test x\${$as_var+set} = xset \
17999 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000done
18001PS1='$ '
18002PS2='> '
18003PS4='+ '
18004
18005# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000018006LC_ALL=C
18007export LC_ALL
18008LANGUAGE=C
18009export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010
Matthias Kloseb9621712010-04-24 17:59:49 +000018011# CDPATH.
18012(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18013
18014
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018015# as_fn_error STATUS ERROR [LINENO LOG_FD]
18016# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018017# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18018# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018019# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018020as_fn_error ()
18021{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018022 as_status=$1; test $as_status -eq 0 && as_status=1
18023 if test "$4"; then
18024 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18025 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018026 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018027 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018028 as_fn_exit $as_status
18029} # as_fn_error
18030
18031
18032# as_fn_set_status STATUS
18033# -----------------------
18034# Set $? to STATUS, without forking.
18035as_fn_set_status ()
18036{
18037 return $1
18038} # as_fn_set_status
18039
18040# as_fn_exit STATUS
18041# -----------------
18042# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18043as_fn_exit ()
18044{
18045 set +e
18046 as_fn_set_status $1
18047 exit $1
18048} # as_fn_exit
18049
18050# as_fn_unset VAR
18051# ---------------
18052# Portably unset VAR.
18053as_fn_unset ()
18054{
18055 { eval $1=; unset $1;}
18056}
18057as_unset=as_fn_unset
18058# as_fn_append VAR VALUE
18059# ----------------------
18060# Append the text in VALUE to the end of the definition contained in VAR. Take
18061# advantage of any shell optimizations that allow amortized linear growth over
18062# repeated appends, instead of the typical quadratic growth present in naive
18063# implementations.
18064if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18065 eval 'as_fn_append ()
18066 {
18067 eval $1+=\$2
18068 }'
18069else
18070 as_fn_append ()
18071 {
18072 eval $1=\$$1\$2
18073 }
18074fi # as_fn_append
18075
18076# as_fn_arith ARG...
18077# ------------------
18078# Perform arithmetic evaluation on the ARGs, and store the result in the
18079# global $as_val. Take advantage of shells that can avoid forks. The arguments
18080# must be portable across $(()) and expr.
18081if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18082 eval 'as_fn_arith ()
18083 {
18084 as_val=$(( $* ))
18085 }'
18086else
18087 as_fn_arith ()
18088 {
18089 as_val=`expr "$@" || test $? -eq 1`
18090 }
18091fi # as_fn_arith
18092
18093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018094if expr a : '\(a\)' >/dev/null 2>&1 &&
18095 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18096 as_expr=expr
18097else
18098 as_expr=false
18099fi
18100
18101if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18102 as_basename=basename
18103else
18104 as_basename=false
18105fi
18106
Matthias Kloseb9621712010-04-24 17:59:49 +000018107if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18108 as_dirname=dirname
18109else
18110 as_dirname=false
18111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113as_me=`$as_basename -- "$0" ||
18114$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18115 X"$0" : 'X\(//\)$' \| \
18116 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018117$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118 sed '/^.*\/\([^/][^/]*\)\/*$/{
18119 s//\1/
18120 q
18121 }
18122 /^X\/\(\/\/\)$/{
18123 s//\1/
18124 q
18125 }
18126 /^X\/\(\/\).*/{
18127 s//\1/
18128 q
18129 }
18130 s/.*/./; q'`
18131
Matthias Kloseb9621712010-04-24 17:59:49 +000018132# Avoid depending upon Character Ranges.
18133as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18134as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18135as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18136as_cr_digits='0123456789'
18137as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138
18139ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018140case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018142 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018144 xy) ECHO_C='\c';;
18145 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18146 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147 esac;;
18148*)
18149 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018150esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018151
Martin v. Löwis11437992002-04-12 09:54:03 +000018152rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018153if test -d conf$$.dir; then
18154 rm -f conf$$.dir/conf$$.file
18155else
18156 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018157 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018159if (echo >conf$$.file) 2>/dev/null; then
18160 if ln -s conf$$.file conf$$ 2>/dev/null; then
18161 as_ln_s='ln -s'
18162 # ... but there are two gotchas:
18163 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18164 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018165 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018166 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018167 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018168 elif ln conf$$.file conf$$ 2>/dev/null; then
18169 as_ln_s=ln
18170 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018171 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018172 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018173else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018174 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018176rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18177rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018178
Matthias Kloseb9621712010-04-24 17:59:49 +000018179
18180# as_fn_mkdir_p
18181# -------------
18182# Create "$as_dir" as a directory, including parents if necessary.
18183as_fn_mkdir_p ()
18184{
18185
18186 case $as_dir in #(
18187 -*) as_dir=./$as_dir;;
18188 esac
18189 test -d "$as_dir" || eval $as_mkdir_p || {
18190 as_dirs=
18191 while :; do
18192 case $as_dir in #(
18193 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18194 *) as_qdir=$as_dir;;
18195 esac
18196 as_dirs="'$as_qdir' $as_dirs"
18197 as_dir=`$as_dirname -- "$as_dir" ||
18198$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18199 X"$as_dir" : 'X\(//\)[^/]' \| \
18200 X"$as_dir" : 'X\(//\)$' \| \
18201 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18202$as_echo X"$as_dir" |
18203 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18204 s//\1/
18205 q
18206 }
18207 /^X\(\/\/\)[^/].*/{
18208 s//\1/
18209 q
18210 }
18211 /^X\(\/\/\)$/{
18212 s//\1/
18213 q
18214 }
18215 /^X\(\/\).*/{
18216 s//\1/
18217 q
18218 }
18219 s/.*/./; q'`
18220 test -d "$as_dir" && break
18221 done
18222 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018223 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018224
18225
18226} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018227if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018228 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018229else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018230 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018231 as_mkdir_p=false
18232fi
18233
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018234
18235# as_fn_executable_p FILE
18236# -----------------------
18237# Test if FILE is an executable regular file.
18238as_fn_executable_p ()
18239{
18240 test -f "$1" && test -x "$1"
18241} # as_fn_executable_p
18242as_test_x='test -x'
18243as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018244
18245# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018246as_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 +000018247
18248# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018249as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018250
18251
Martin v. Löwis11437992002-04-12 09:54:03 +000018252exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018253## ----------------------------------- ##
18254## Main body of $CONFIG_STATUS script. ##
18255## ----------------------------------- ##
18256_ASEOF
18257test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018258
Matthias Kloseb9621712010-04-24 17:59:49 +000018259cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18260# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018261# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018262# values after options handling.
18263ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018264This file was extended by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018265generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018266
18267 CONFIG_FILES = $CONFIG_FILES
18268 CONFIG_HEADERS = $CONFIG_HEADERS
18269 CONFIG_LINKS = $CONFIG_LINKS
18270 CONFIG_COMMANDS = $CONFIG_COMMANDS
18271 $ $0 $@
18272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273on `(hostname || uname -n) 2>/dev/null | sed 1q`
18274"
18275
Martin v. Löwis11437992002-04-12 09:54:03 +000018276_ACEOF
18277
Matthias Kloseb9621712010-04-24 17:59:49 +000018278case $ac_config_files in *"
18279"*) set x $ac_config_files; shift; ac_config_files=$*;;
18280esac
18281
18282case $ac_config_headers in *"
18283"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18284esac
18285
18286
18287cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018288# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018289config_files="$ac_config_files"
18290config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018292_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018293
Matthias Kloseb9621712010-04-24 17:59:49 +000018294cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018295ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018296\`$as_me' instantiates files and other configuration actions
18297from templates according to the current configuration. Unless the files
18298and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018299
Matthias Kloseb9621712010-04-24 17:59:49 +000018300Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018301
18302 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018303 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018304 --config print configuration, then exit
18305 -q, --quiet, --silent
18306 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018307 -d, --debug don't remove temporary files
18308 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018309 --file=FILE[:TEMPLATE]
18310 instantiate the configuration file FILE
18311 --header=FILE[:TEMPLATE]
18312 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018313
18314Configuration files:
18315$config_files
18316
18317Configuration headers:
18318$config_headers
18319
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018320Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018323cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18324ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018325ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018326python config.status 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018327configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018328 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018329
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018330Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018331This config.status script is free software; the Free Software Foundation
18332gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333
18334ac_pwd='$ac_pwd'
18335srcdir='$srcdir'
18336INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018337MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018338test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018339_ACEOF
18340
Matthias Kloseb9621712010-04-24 17:59:49 +000018341cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18342# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018343ac_need_defaults=:
18344while test $# != 0
18345do
18346 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018347 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018348 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18349 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018350 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018351 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018352 --*=)
18353 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18354 ac_optarg=
18355 ac_shift=:
18356 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018357 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018358 ac_option=$1
18359 ac_optarg=$2
18360 ac_shift=shift
18361 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018362 esac
18363
Skip Montanaro6dead952003-09-25 14:50:04 +000018364 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018365 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018366 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18367 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018368 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018369 $as_echo "$ac_cs_version"; exit ;;
18370 --config | --confi | --conf | --con | --co | --c )
18371 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018372 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018373 debug=: ;;
18374 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018375 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018376 case $ac_optarg in
18377 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018378 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018379 esac
18380 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018381 ac_need_defaults=false;;
18382 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018383 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018384 case $ac_optarg in
18385 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18386 esac
18387 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018388 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389 --he | --h)
18390 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018391 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018392Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018393 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018394 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18396 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18397 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018398
18399 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018400 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018401Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018402
Matthias Kloseb9621712010-04-24 17:59:49 +000018403 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018405
18406 esac
18407 shift
18408done
18409
Skip Montanaro6dead952003-09-25 14:50:04 +000018410ac_configure_extra_args=
18411
18412if $ac_cs_silent; then
18413 exec 6>/dev/null
18414 ac_configure_extra_args="$ac_configure_extra_args --silent"
18415fi
18416
18417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018418cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018419if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018420 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018421 shift
18422 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18423 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018424 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018425 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018426fi
18427
Martin v. Löwis11437992002-04-12 09:54:03 +000018428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430exec 5>>config.log
18431{
18432 echo
18433 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18434## Running $as_me. ##
18435_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018436 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018440cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018442
Matthias Kloseb9621712010-04-24 17:59:49 +000018443cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444
18445# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018446for ac_config_target in $ac_config_targets
18447do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018448 case $ac_config_target in
18449 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18450 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18451 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018452 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18453 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018455 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018456 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018457 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018458 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459
Victor Stinnere0be4232011-10-25 13:06:09 +020018460 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018461 esac
18462done
18463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464
Martin v. Löwis11437992002-04-12 09:54:03 +000018465# If the user did not use the arguments to specify the items to instantiate,
18466# then the envvar interface is used. Set only those that are not.
18467# We use the long form for the default assignment because of an extremely
18468# bizarre bug on SunOS 4.1.3.
18469if $ac_need_defaults; then
18470 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18471 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18472fi
18473
Skip Montanaro6dead952003-09-25 14:50:04 +000018474# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018475# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018476# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477# Hook for its removal unless debugging.
18478# Note that there is a small window in which the directory will not be cleaned:
18479# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018480$debug ||
18481{
Victor Stinnere0be4232011-10-25 13:06:09 +020018482 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018483 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018484 : "${ac_tmp:=$tmp}"
18485 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018487 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018488}
Martin v. Löwis11437992002-04-12 09:54:03 +000018489# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018490
Martin v. Löwis11437992002-04-12 09:54:03 +000018491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018493 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018494} ||
18495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018496 tmp=./conf$$-$RANDOM
18497 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018498} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018499ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018500
Matthias Kloseb9621712010-04-24 17:59:49 +000018501# Set up the scripts for CONFIG_FILES section.
18502# No need to generate them if there are no CONFIG_FILES.
18503# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018504if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018505
Matthias Kloseb9621712010-04-24 17:59:49 +000018506
18507ac_cr=`echo X | tr X '\015'`
18508# On cygwin, bash can eat \r inside `` if the user requested igncr.
18509# But we know of no other shell where ac_cr would be empty at this
18510# point, so we can use a bashism as a fallback.
18511if test "x$ac_cr" = x; then
18512 eval ac_cr=\$\'\\r\'
18513fi
18514ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18515if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018516 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018517else
18518 ac_cs_awk_cr=$ac_cr
18519fi
18520
Victor Stinnere0be4232011-10-25 13:06:09 +020018521echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018522_ACEOF
18523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018524
Matthias Kloseb9621712010-04-24 17:59:49 +000018525{
18526 echo "cat >conf$$subs.awk <<_ACEOF" &&
18527 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18528 echo "_ACEOF"
18529} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018530 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18531ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532ac_delim='%!_!# '
18533for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018534 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018535 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018536
Matthias Kloseb9621712010-04-24 17:59:49 +000018537 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18538 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018539 break
18540 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018541 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542 else
18543 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018544 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018545done
Matthias Kloseb9621712010-04-24 17:59:49 +000018546rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547
Matthias Kloseb9621712010-04-24 17:59:49 +000018548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018549cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018551sed -n '
18552h
18553s/^/S["/; s/!.*/"]=/
18554p
18555g
18556s/^[^!]*!//
18557:repl
18558t repl
18559s/'"$ac_delim"'$//
18560t delim
18561:nl
18562h
18563s/\(.\{148\}\)..*/\1/
18564t more1
18565s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18566p
18567n
18568b repl
18569:more1
18570s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18571p
18572g
18573s/.\{148\}//
18574t nl
18575:delim
18576h
18577s/\(.\{148\}\)..*/\1/
18578t more2
18579s/["\\]/\\&/g; s/^/"/; s/$/"/
18580p
18581b
18582:more2
18583s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18584p
18585g
18586s/.\{148\}//
18587t delim
18588' <conf$$subs.awk | sed '
18589/^[^""]/{
18590 N
18591 s/\n//
18592}
18593' >>$CONFIG_STATUS || ac_write_fail=1
18594rm -f conf$$subs.awk
18595cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18596_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018597cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018598 for (key in S) S_is_set[key] = 1
18599 FS = ""
18600
18601}
18602{
18603 line = $ 0
18604 nfields = split(line, field, "@")
18605 substed = 0
18606 len = length(field[1])
18607 for (i = 2; i < nfields; i++) {
18608 key = field[i]
18609 keylen = length(key)
18610 if (S_is_set[key]) {
18611 value = S[key]
18612 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18613 len += length(value) + length(field[++i])
18614 substed = 1
18615 } else
18616 len += 1 + keylen
18617 }
18618
18619 print line
18620}
18621
18622_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018624cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18625if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18626 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18627else
18628 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018629fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018630 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018631_ACEOF
18632
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018633# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18634# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635# trailing colons and then remove the whole line if VPATH becomes empty
18636# (actually we leave an empty line to preserve line numbers).
18637if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018638 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18639h
18640s///
18641s/^/:/
18642s/[ ]*$/:/
18643s/:\$(srcdir):/:/g
18644s/:\${srcdir}:/:/g
18645s/:@srcdir@:/:/g
18646s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018647s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018648x
18649s/\(=[ ]*\).*/\1/
18650G
18651s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018652s/^[^=]*=[ ]*$//
18653}'
18654fi
18655
Matthias Kloseb9621712010-04-24 17:59:49 +000018656cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018657fi # test -n "$CONFIG_FILES"
18658
Matthias Kloseb9621712010-04-24 17:59:49 +000018659# Set up the scripts for CONFIG_HEADERS section.
18660# No need to generate them if there are no CONFIG_HEADERS.
18661# This happens for instance with `./config.status Makefile'.
18662if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018663cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018664BEGIN {
18665_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018666
Matthias Kloseb9621712010-04-24 17:59:49 +000018667# Transform confdefs.h into an awk script `defines.awk', embedded as
18668# here-document in config.status, that substitutes the proper values into
18669# config.h.in to produce config.h.
18670
18671# Create a delimiter string that does not exist in confdefs.h, to ease
18672# handling of long lines.
18673ac_delim='%!_!# '
18674for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018675 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18676 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018677 break
18678 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018679 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018680 else
18681 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18682 fi
18683done
18684
18685# For the awk script, D is an array of macro values keyed by name,
18686# likewise P contains macro parameters if any. Preserve backslash
18687# newline sequences.
18688
18689ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18690sed -n '
18691s/.\{148\}/&'"$ac_delim"'/g
18692t rset
18693:rset
18694s/^[ ]*#[ ]*define[ ][ ]*/ /
18695t def
18696d
18697:def
18698s/\\$//
18699t bsnl
18700s/["\\]/\\&/g
18701s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18702D["\1"]=" \3"/p
18703s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18704d
18705:bsnl
18706s/["\\]/\\&/g
18707s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18708D["\1"]=" \3\\\\\\n"\\/p
18709t cont
18710s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18711t cont
18712d
18713:cont
18714n
18715s/.\{148\}/&'"$ac_delim"'/g
18716t clear
18717:clear
18718s/\\$//
18719t bsnlc
18720s/["\\]/\\&/g; s/^/"/; s/$/"/p
18721d
18722:bsnlc
18723s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18724b cont
18725' <confdefs.h | sed '
18726s/'"$ac_delim"'/"\\\
18727"/g' >>$CONFIG_STATUS || ac_write_fail=1
18728
18729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18730 for (key in D) D_is_set[key] = 1
18731 FS = ""
18732}
18733/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18734 line = \$ 0
18735 split(line, arg, " ")
18736 if (arg[1] == "#") {
18737 defundef = arg[2]
18738 mac1 = arg[3]
18739 } else {
18740 defundef = substr(arg[1], 2)
18741 mac1 = arg[2]
18742 }
18743 split(mac1, mac2, "(") #)
18744 macro = mac2[1]
18745 prefix = substr(line, 1, index(line, defundef) - 1)
18746 if (D_is_set[macro]) {
18747 # Preserve the white space surrounding the "#".
18748 print prefix "define", macro P[macro] D[macro]
18749 next
18750 } else {
18751 # Replace #undef with comments. This is necessary, for example,
18752 # in the case of _POSIX_SOURCE, which is predefined and required
18753 # on some systems where configure will not decide to define it.
18754 if (defundef == "undef") {
18755 print "/*", prefix defundef, macro, "*/"
18756 next
18757 }
18758 }
18759}
18760{ print }
18761_ACAWK
18762_ACEOF
18763cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018764 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018765fi # test -n "$CONFIG_HEADERS"
18766
18767
18768eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18769shift
18770for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018771do
18772 case $ac_tag in
18773 :[FHLC]) ac_mode=$ac_tag; continue;;
18774 esac
18775 case $ac_mode$ac_tag in
18776 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018777 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018778 :[FH]-) ac_tag=-:-;;
18779 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18780 esac
18781 ac_save_IFS=$IFS
18782 IFS=:
18783 set x $ac_tag
18784 IFS=$ac_save_IFS
18785 shift
18786 ac_file=$1
18787 shift
18788
18789 case $ac_mode in
18790 :L) ac_source=$1;;
18791 :[FH])
18792 ac_file_inputs=
18793 for ac_f
18794 do
18795 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018796 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018797 *) # Look for the file first in the build tree, then in the source tree
18798 # (if the path is not absolute). The absolute path cannot be DOS-style,
18799 # because $ac_f cannot contain `:'.
18800 test -f "$ac_f" ||
18801 case $ac_f in
18802 [\\/$]*) false;;
18803 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18804 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018805 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018806 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018807 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18808 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018809 done
18810
18811 # Let's still pretend it is `configure' which instantiates (i.e., don't
18812 # use $as_me), people would be surprised to read:
18813 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018814 configure_input='Generated from '`
18815 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18816 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018817 if test x"$ac_file" != x-; then
18818 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018819 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18820$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018821 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018822 # Neutralize special characters interpreted by sed in replacement strings.
18823 case $configure_input in #(
18824 *\&* | *\|* | *\\* )
18825 ac_sed_conf_input=`$as_echo "$configure_input" |
18826 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18827 *) ac_sed_conf_input=$configure_input;;
18828 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018829
18830 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018831 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18832 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018833 esac
18834 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018835 esac
18836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018837 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018838$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018839 X"$ac_file" : 'X\(//\)[^/]' \| \
18840 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018841 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018842$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018843 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18844 s//\1/
18845 q
18846 }
18847 /^X\(\/\/\)[^/].*/{
18848 s//\1/
18849 q
18850 }
18851 /^X\(\/\/\)$/{
18852 s//\1/
18853 q
18854 }
18855 /^X\(\/\).*/{
18856 s//\1/
18857 q
18858 }
18859 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018860 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018861 ac_builddir=.
18862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018863case "$ac_dir" in
18864.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18865*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018866 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018867 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018868 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869 case $ac_top_builddir_sub in
18870 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18871 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18872 esac ;;
18873esac
18874ac_abs_top_builddir=$ac_pwd
18875ac_abs_builddir=$ac_pwd$ac_dir_suffix
18876# for backward compatibility:
18877ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018878
18879case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018880 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018881 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018882 ac_top_srcdir=$ac_top_builddir_sub
18883 ac_abs_top_srcdir=$ac_pwd ;;
18884 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018885 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018886 ac_top_srcdir=$srcdir
18887 ac_abs_top_srcdir=$srcdir ;;
18888 *) # Relative name.
18889 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18890 ac_top_srcdir=$ac_top_build_prefix$srcdir
18891 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018892esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018893ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018894
Martin v. Löwis11437992002-04-12 09:54:03 +000018895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018896 case $ac_mode in
18897 :F)
18898 #
18899 # CONFIG_FILE
18900 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018901
18902 case $INSTALL in
18903 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018904 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018905 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018906 ac_MKDIR_P=$MKDIR_P
18907 case $MKDIR_P in
18908 [\\/$]* | ?:[\\/]* ) ;;
18909 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18910 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018911_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018912
Matthias Kloseb9621712010-04-24 17:59:49 +000018913cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018914# If the template does not know about datarootdir, expand it.
18915# FIXME: This hack should be removed a few years after 2.60.
18916ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018917ac_sed_dataroot='
18918/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018919 p
18920 q
18921}
18922/@datadir@/p
18923/@docdir@/p
18924/@infodir@/p
18925/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018926/@mandir@/p'
18927case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018928*datarootdir*) ac_datarootdir_seen=yes;;
18929*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18931$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018933cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018934 ac_datarootdir_hack='
18935 s&@datadir@&$datadir&g
18936 s&@docdir@&$docdir&g
18937 s&@infodir@&$infodir&g
18938 s&@localedir@&$localedir&g
18939 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018940 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018941esac
18942_ACEOF
18943
18944# Neutralize VPATH when `$srcdir' = `.'.
18945# Shell code in configure.ac might set extrasub.
18946# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018947cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18948ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018949$extrasub
18950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018951cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018952:t
18953/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018954s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018955s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018956s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018957s&@srcdir@&$ac_srcdir&;t t
18958s&@abs_srcdir@&$ac_abs_srcdir&;t t
18959s&@top_srcdir@&$ac_top_srcdir&;t t
18960s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18961s&@builddir@&$ac_builddir&;t t
18962s&@abs_builddir@&$ac_abs_builddir&;t t
18963s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18964s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018965s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018966$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018967"
Victor Stinnere0be4232011-10-25 13:06:09 +020018968eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18969 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018971test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018972 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18973 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18974 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018976which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018977$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018978which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018979
Victor Stinnere0be4232011-10-25 13:06:09 +020018980 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018981 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018982 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18983 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018984 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018985 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018986 ;;
18987 :H)
18988 #
18989 # CONFIG_HEADER
18990 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018991 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018992 {
18993 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018994 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18995 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018996 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018997 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018998 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18999$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019000 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019001 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019002 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019003 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019004 fi
19005 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019006 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019007 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019008 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019009 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019010 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019012
19013 esac
19014
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019015
19016 case $ac_file$ac_mode in
19017 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19018
19019 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019020done # for ac_tag
19021
Guido van Rossum627b2d71993-12-24 10:39:16 +000019022
Matthias Kloseb9621712010-04-24 17:59:49 +000019023as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019024_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019025ac_clean_files=$ac_clean_files_save
19026
Matthias Kloseb9621712010-04-24 17:59:49 +000019027test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019028 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019029
Martin v. Löwis11437992002-04-12 09:54:03 +000019030
19031# configure is writing to config.log, and then calls config.status.
19032# config.status does its own redirection, appending to config.log.
19033# Unfortunately, on DOS this fails, as config.log is still kept open
19034# by configure, so config.status won't be able to write to it; its
19035# output is simply discarded. So we exec the FD to /dev/null,
19036# effectively closing config.log, so it can be properly (re)opened and
19037# appended to by config.status. When coming back to configure, we
19038# need to make the FD available again.
19039if test "$no_create" != yes; then
19040 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019041 ac_config_status_args=
19042 test "$silent" = yes &&
19043 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019044 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019045 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019046 exec 5>>config.log
19047 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19048 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019049 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019050fi
19051if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19052 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19053$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019054fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019055
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019056
Christian Heimes75ed8902013-11-20 01:11:18 +010019057echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019058if test ! -f Modules/Setup.local
19059then
19060 echo "# Edit this file for local setup changes" >Modules/Setup.local
19061fi
19062
Christian Heimes75ed8902013-11-20 01:11:18 +010019063echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019064$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019065 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019066 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019067mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019068
19069if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19070 echo "" >&6
19071 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019072 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 +000019073 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019074 echo "" >&6
19075 echo "" >&6
19076fi