blob: 2d379feb4b7bf0c0556fa76449669d282a7ac5af [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100634PLATLIBDIR
Miss Islington (bot)6cb24a02020-06-09 06:54:54 -0700635BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200636LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700637EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200638ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000639SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000640LIBC
641LIBM
642HAVE_GETHOSTBYNAME
643HAVE_GETHOSTBYNAME_R
644HAVE_GETHOSTBYNAME_R_3_ARG
645HAVE_GETHOSTBYNAME_R_5_ARG
646HAVE_GETHOSTBYNAME_R_6_ARG
647LIBOBJS
648TRUE
649MACHDEP_OBJS
650DYNLOADFILE
651DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700652DTRACE_OBJS
653DTRACE_HEADERS
654DFLAGS
655DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700656TCLTK_LIBS
657TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000658LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800659PKG_CONFIG_LIBDIR
660PKG_CONFIG_PATH
661PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400662TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000663SHLIBS
664CFLAGSFORSHARED
665LINKFORSHARED
666CCSHARED
667BLDSHARED
668LDCXXSHARED
669LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700670SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LIBTOOL_CRUFT
672OTHER_LIBTOOL_OPT
673UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100674LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700675CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000676BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200677CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000678OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700680LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700681LLVM_PROF_ERR
682LLVM_PROF_FILE
683LLVM_PROF_MERGER
684PGO_PROF_USE_FLAG
685PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200686LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200687LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700688PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700689DEF_MAKE_RULE
690DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000691ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000692LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100693MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000694INSTALL_DATA
695INSTALL_SCRIPT
696INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200697ac_ct_READELF
698READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000699ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702GNULD
Miss Islington (bot)88b86a92020-08-29 09:36:40 -0700703EXPORTSFROM
704EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000705LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000706LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000707RUNSHARED
708INSTSONAME
709LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000710PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000711BLDLIBRARY
712DLLLIBRARY
713LDLIBRARY
714LIBRARY
715BUILDEXEEXT
716EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200717NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200718MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719PLATFORM_TRIPLET
720MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200721ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000722MAINCC
723CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700724SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200725GREP
726CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000727OBJEXT
728EXEEXT
729ac_ct_CC
730CPPFLAGS
731LDFLAGS
732CFLAGS
733CC
734EXPORT_MACOSX_DEPLOYMENT_TARGET
735CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200736_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000737MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000738FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800740FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000741FRAMEWORKALTINSTALLLAST
742FRAMEWORKALTINSTALLFIRST
743FRAMEWORKINSTALLLAST
744FRAMEWORKINSTALLFIRST
745PYTHONFRAMEWORKINSTALLDIR
746PYTHONFRAMEWORKPREFIX
747PYTHONFRAMEWORKDIR
748PYTHONFRAMEWORKIDENTIFIER
749PYTHONFRAMEWORK
750LIPO_32BIT_FLAGS
751ARCH_RUN_32BIT
752UNIVERSALSDK
753CONFIG_ARGS
754SOVERSION
755VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200756PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200757PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100758host_os
759host_vendor
760host_cpu
761host
762build_os
763build_vendor
764build_cpu
765build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500766HAS_GIT
767GITBRANCH
768GITTAG
769GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400770BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000771target_alias
772host_alias
773build_alias
774LIBS
775ECHO_T
776ECHO_N
777ECHO_C
778DEFS
779mandir
780localedir
781libdir
782psdir
783pdfdir
784dvidir
785htmldir
786infodir
787docdir
788oldincludedir
789includedir
790localstatedir
791sharedstatedir
792sysconfdir
793datadir
794datarootdir
795libexecdir
796sbindir
797bindir
798program_transform_name
799prefix
800exec_prefix
801PACKAGE_URL
802PACKAGE_BUGREPORT
803PACKAGE_STRING
804PACKAGE_VERSION
805PACKAGE_TARNAME
806PACKAGE_NAME
807PATH_SEPARATOR
808SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000809ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000810ac_user_opts='
811enable_option_checking
812enable_universalsdk
813with_universal_archs
814with_framework_name
815enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200821with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200822with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000823enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700824with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100825with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400826with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100827with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800828with_memory_sanitizer
829with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_libs
831with_system_expat
832with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100833with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100834with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000835enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700836with_tcltk_includes
837with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000839enable_ipv6
840with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000842with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700844with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_libm
846with_libc
847enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100848with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000849with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800850with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100851with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100852with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200853with_builtin_hashlib_hashes
Matthias Kloseb9621712010-04-24 17:59:49 +0000854'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855 ac_precious_vars='build_alias
856host_alias
857target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100858MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859CC
860CFLAGS
861LDFLAGS
862LIBS
863CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800864CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700865PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800866PKG_CONFIG
867PKG_CONFIG_PATH
868PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869
Guido van Rossum627b2d71993-12-24 10:39:16 +0000870
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000872ac_init_help=
873ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000874ac_unrecognized_opts=
875ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876# The variables have the same names as the options, with
877# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000878cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881no_recursion=
882prefix=NONE
883program_prefix=NONE
884program_suffix=NONE
885program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890x_includes=NONE
891x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000892
893# Installation directory options.
894# These are left unexpanded so users can "make install exec_prefix=/foo"
895# and all the variables that are supposed to be based on exec_prefix
896# by default will actually change.
897# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899bindir='${exec_prefix}/bin'
900sbindir='${exec_prefix}/sbin'
901libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902datarootdir='${prefix}/share'
903datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904sysconfdir='${prefix}/etc'
905sharedstatedir='${prefix}/com'
906localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907includedir='${prefix}/include'
908oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
910infodir='${datarootdir}/info'
911htmldir='${docdir}'
912dvidir='${docdir}'
913pdfdir='${docdir}'
914psdir='${docdir}'
915libdir='${exec_prefix}/lib'
916localedir='${datarootdir}/locale'
917mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923 # If the previous option needs an argument, assign it.
924 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926 ac_prev=
927 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000928 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200931 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
932 *=) ac_optarg= ;;
933 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 # Accept the important Cygnus configure options, so we can diagnose typos.
937
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 case $ac_dashdash$ac_option in
939 --)
940 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -bindir | --bindir | --bindi | --bind | --bin | --bi)
943 ac_prev=bindir ;;
944 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 -cache-file | --cache-file | --cache-fil | --cache-fi \
953 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
954 ac_prev=cache_file ;;
955 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
956 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 cache_file=$ac_optarg ;;
958
959 --config-cache | -C)
960 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000962 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000964 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
968 | --dataroo | --dataro | --datar)
969 ac_prev=datarootdir ;;
970 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
971 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
972 datarootdir=$ac_optarg ;;
973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000976 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000977 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200978 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000979 ac_useropt_orig=$ac_useropt
980 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
981 case $ac_user_opts in
982 *"
983"enable_$ac_useropt"
984"*) ;;
985 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
986 ac_unrecognized_sep=', ';;
987 esac
988 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000989
990 -docdir | --docdir | --docdi | --doc | --do)
991 ac_prev=docdir ;;
992 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
993 docdir=$ac_optarg ;;
994
995 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
996 ac_prev=dvidir ;;
997 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
998 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001001 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001003 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001004 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001005 ac_useropt_orig=$ac_useropt
1006 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1007 case $ac_user_opts in
1008 *"
1009"enable_$ac_useropt"
1010"*) ;;
1011 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1012 ac_unrecognized_sep=', ';;
1013 esac
1014 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1017 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1018 | --exec | --exe | --ex)
1019 ac_prev=exec_prefix ;;
1020 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1021 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1022 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001026 # Obsolete; use --with-gas.
1027 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 -help | --help | --hel | --he | -h)
1030 ac_init_help=long ;;
1031 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1032 ac_init_help=recursive ;;
1033 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1034 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1042 ac_prev=htmldir ;;
1043 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1044 | --ht=*)
1045 htmldir=$ac_optarg ;;
1046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -includedir | --includedir | --includedi | --included | --include \
1048 | --includ | --inclu | --incl | --inc)
1049 ac_prev=includedir ;;
1050 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1051 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -infodir | --infodir | --infodi | --infod | --info | --inf)
1055 ac_prev=infodir ;;
1056 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -libdir | --libdir | --libdi | --libd)
1060 ac_prev=libdir ;;
1061 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1065 | --libexe | --libex | --libe)
1066 ac_prev=libexecdir ;;
1067 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1068 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 -localedir | --localedir | --localedi | --localed | --locale)
1072 ac_prev=localedir ;;
1073 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1074 localedir=$ac_optarg ;;
1075
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001077 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078 ac_prev=localstatedir ;;
1079 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001080 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082
1083 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1084 ac_prev=mandir ;;
1085 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 # Obsolete; use --without-fp.
1090 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 no_create=yes ;;
1095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001096 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1097 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1098 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1101 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1102 | --oldin | --oldi | --old | --ol | --o)
1103 ac_prev=oldincludedir ;;
1104 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1105 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1106 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1110 ac_prev=prefix ;;
1111 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1115 | --program-pre | --program-pr | --program-p)
1116 ac_prev=program_prefix ;;
1117 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1118 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1122 | --program-suf | --program-su | --program-s)
1123 ac_prev=program_suffix ;;
1124 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1125 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
1128 -program-transform-name | --program-transform-name \
1129 | --program-transform-nam | --program-transform-na \
1130 | --program-transform-n | --program-transform- \
1131 | --program-transform | --program-transfor \
1132 | --program-transfo | --program-transf \
1133 | --program-trans | --program-tran \
1134 | --progr-tra | --program-tr | --program-t)
1135 ac_prev=program_transform_name ;;
1136 -program-transform-name=* | --program-transform-name=* \
1137 | --program-transform-nam=* | --program-transform-na=* \
1138 | --program-transform-n=* | --program-transform-=* \
1139 | --program-transform=* | --program-transfor=* \
1140 | --program-transfo=* | --program-transf=* \
1141 | --program-trans=* | --program-tran=* \
1142 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001145 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1146 ac_prev=pdfdir ;;
1147 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1148 pdfdir=$ac_optarg ;;
1149
1150 -psdir | --psdir | --psdi | --psd | --ps)
1151 ac_prev=psdir ;;
1152 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1153 psdir=$ac_optarg ;;
1154
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1156 | -silent | --silent | --silen | --sile | --sil)
1157 silent=yes ;;
1158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160 ac_prev=sbindir ;;
1161 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
1165 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167 | --sharedst | --shareds | --shared | --share | --shar \
1168 | --sha | --sh)
1169 ac_prev=sharedstatedir ;;
1170 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 -site | --site | --sit)
1177 ac_prev=site ;;
1178 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182 ac_prev=srcdir ;;
1183 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187 | --syscon | --sysco | --sysc | --sys | --sy)
1188 ac_prev=sysconfdir ;;
1189 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199 verbose=yes ;;
1200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 -version | --version | --versio | --versi | --vers | -V)
1202 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
1220 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 ac_useropt_orig=$ac_useropt
1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227 case $ac_user_opts in
1228 *"
1229"with_$ac_useropt"
1230"*) ;;
1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232 ac_unrecognized_sep=', ';;
1233 esac
1234 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 --x)
1237 # Obsolete; use --with-x.
1238 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241 | --x-incl | --x-inc | --x-in | --x-i)
1242 ac_prev=x_includes ;;
1243 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
1247 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249 ac_prev=x_libraries ;;
1250 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 *=*)
1259 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 case $ac_envvar in #(
1262 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 export $ac_envvar ;;
1267
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001268 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001273 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 ;;
1275
1276 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277done
1278
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282fi
1283
Matthias Kloseb9621712010-04-24 17:59:49 +00001284if test -n "$ac_unrecognized_opts"; then
1285 case $enable_option_checking in
1286 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289 esac
1290fi
1291
1292# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294 datadir sysconfdir sharedstatedir localstatedir includedir \
1295 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001296 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 # Remove trailing slashes.
1300 case $ac_val in
1301 */ )
1302 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303 eval $ac_var=\$ac_val;;
1304 esac
1305 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 [\\/$]* | ?:[\\/]* ) continue;;
1308 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001311done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# There might be people who depend on the old broken behavior: `$host'
1314# used to hold the argument of --host etc.
1315# FIXME: To remove some day.
1316build=$build_alias
1317host=$host_alias
1318target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320# FIXME: To remove some day.
1321if test "x$host_alias" != x; then
1322 if test "x$build_alias" = x; then
1323 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 elif test "x$build_alias" != "x$host_alias"; then
1325 cross_compiling=yes
1326 fi
1327fi
1328
1329ac_tool_prefix=
1330test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332test "$silent" = yes && exec 6>/dev/null
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336ac_ls_di=`ls -di .` &&
1337ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341
1342
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343# Find the source files, if location was not specified.
1344if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 ac_confdir=`$as_dirname -- "$as_myself" ||
1348$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349 X"$as_myself" : 'X\(//\)[^/]' \| \
1350 X"$as_myself" : 'X\(//\)$' \| \
1351 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)[^/].*/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\/\)$/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\).*/{
1366 s//\1/
1367 q
1368 }
1369 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 srcdir=..
1373 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374else
1375 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377if test ! -r "$srcdir/$ac_unique_file"; then
1378 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384 pwd)`
1385# When building in place, set srcdir=.
1386if test "$ac_abs_confdir" = "$ac_pwd"; then
1387 srcdir=.
1388fi
1389# Remove unnecessary trailing slashes from srcdir.
1390# Double slashes in file names in object file debugging info
1391# mess up M-x gdb in Emacs.
1392case $srcdir in
1393*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394esac
1395for ac_var in $ac_precious_vars; do
1396 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_env_${ac_var}_value=\$${ac_var}
1398 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402#
1403# Report the --help message.
1404#
1405if test "$ac_init_help" = "long"; then
1406 # Omit some internal or obsolete options to make the list less imposing.
1407 # This message is too long to be a string in the A/UX 3.1 sh.
1408 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001409\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414VAR=VALUE. See below for descriptions of some of the useful variables.
1415
1416Defaults for the options are specified in brackets.
1417
1418Configuration:
1419 -h, --help display this help and exit
1420 --help=short display options specific to this package
1421 --help=recursive display the short help of all the included packages
1422 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001423 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --cache-file=FILE cache test results in FILE [disabled]
1425 -C, --config-cache alias for \`--cache-file=config.cache'
1426 -n, --no-create do not create output files
1427 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429Installation directories:
1430 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435By default, \`make install' will install all the files in
1436\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1437an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438for instance \`--prefix=\$HOME'.
1439
1440For better control, use the options below.
1441
1442Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --bindir=DIR user executables [EPREFIX/bin]
1444 --sbindir=DIR system admin executables [EPREFIX/sbin]
1445 --libexecdir=DIR program executables [EPREFIX/libexec]
1446 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1447 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1448 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1449 --libdir=DIR object code libraries [EPREFIX/lib]
1450 --includedir=DIR C header files [PREFIX/include]
1451 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1452 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1453 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1454 --infodir=DIR info documentation [DATAROOTDIR/info]
1455 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1456 --mandir=DIR man documentation [DATAROOTDIR/man]
1457 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1458 --htmldir=DIR html documentation [DOCDIR]
1459 --dvidir=DIR dvi documentation [DOCDIR]
1460 --pdfdir=DIR pdf documentation [DOCDIR]
1461 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463
1464 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001465
1466System types:
1467 --build=BUILD configure for building on BUILD [guessed]
1468 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001469_ACEOF
1470fi
1471
1472if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001473 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001474 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001475 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 cat <<\_ACEOF
1477
1478Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001479 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1481 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001482 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001483 create a universal binary build. SDKDIR specifies
1484 which macOS SDK should be used to perform the build,
1485 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001487 create a Python.framework rather than a traditional
1488 Unix install. optional INSTALLDIR specifies the
1489 installation path. see Mac/README.rst (default is
1490 no)
1491 --enable-shared enable building a shared Python library (default is
1492 no)
1493 --enable-profiling enable C-level code profiling with gprof (default is
1494 no)
1495 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1496 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001497 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001498 support loadable extensions in _sqlite module, see
1499 Doc/library/sqlite3.rst (default is no)
1500 --enable-ipv6 enable ipv6 (with ipv4) support, see
1501 Doc/library/socket.rst (default is yes if supported)
1502 --enable-big-digits[=15|30]
1503 use big digits (30 or 15 bits) for Python longs
1504 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
1506Optional Packages:
1507 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1508 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001509 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001510 specify the kind of universal binary that should be
1511 created. this option is only valid when
1512 --enable-universalsdk is set; options are:
Ronald Oussorene8b1c032020-11-22 11:18:40 +01001513 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1514 "intel-32", "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001515 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001516 specify the name for the python framework on macOS
1517 only valid when --enable-framework is set. see
1518 Mac/README.rst (default is 'Python')
1519 --with-cxx-main[=COMPILER]
1520 compile main() and link Python executable with C++
1521 compiler specified in COMPILER (default is $CXX)
1522 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1523 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001524 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001525 (default is no)
1526 --with-assertions build with C assertions enabled (default is no)
1527 --with-lto enable Link-Time-Optimization in any build (default
1528 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001529 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001530 select hash algorithm for use in Python/pyhash.c
1531 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001532 --with-tzpath=<list of absolute paths separated by pathsep>
1533 Select the default time zone search path for zoneinfo.TZPATH
1534
Charles-François Natalid30b0222014-05-08 23:08:51 +01001535 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001536 enable AddressSanitizer memory error detector,
1537 'asan' (default is no)
1538 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1539 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001540 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001541 enable UndefinedBehaviorSanitizer undefined
1542 behaviour detector, 'ubsan' (default is no)
1543 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001544 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001545 library, see Doc/library/pyexpat.rst (default is no)
1546 --with-system-ffi build _ctypes module using an installed ffi library,
1547 see Doc/library/ctypes.rst (default is
1548 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001549 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001550 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001551 --with-decimal-contextvar
1552 build _decimal module using a coroutine-local rather
1553 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001554 --with-tcltk-includes='-I...'
1555 override search for Tcl and Tk include files
1556 --with-tcltk-libs='-L...'
1557 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001558 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001559 override order to check db backends for dbm; a valid
1560 value is a colon separated string with the backend
1561 names `ndbm', `gdbm' and `bdb'.
1562 --with-doc-strings enable documentation strings (default is yes)
1563 --with-pymalloc enable specialized mallocs (default is yes)
1564 --with-c-locale-coercion
1565 enable C locale coercion to a UTF-8 based locale
1566 (default is yes)
1567 --with-valgrind enable Valgrind support (default is no)
1568 --with-dtrace enable DTrace support (default is no)
1569 --with-libm=STRING override libm math library to STRING (default is
1570 system-dependent)
1571 --with-libc=STRING override libc C library to STRING (default is
1572 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001573 --with-platlibdir=DIRNAME
1574 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001575 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001576 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001577 --with-ensurepip[=install|upgrade|no]
1578 "install" or "upgrade" using bundled pip (default is
1579 upgrade)
1580 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001581 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001582 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001583 Python's preferred selection (default), openssl:
1584 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001585 custom string, PROTOCOL_SSLv2 ignores the setting,
1586 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001587 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1588 builtin hash modules, md5, sha1, sha256, sha512,
1589 sha3 (with shake), blake2
Martin v. Löwis11437992002-04-12 09:54:03 +00001590
1591Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001592 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 CC C compiler command
1594 CFLAGS C compiler flags
1595 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1596 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001598 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001601 PROFILE_TASK
1602 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001603 PKG_CONFIG path to pkg-config utility
1604 PKG_CONFIG_PATH
1605 directories to add to pkg-config's search path
1606 PKG_CONFIG_LIBDIR
1607 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001608
1609Use these variables to override the choices made by `configure' or to help
1610it to find libraries and programs with nonstandard names/locations.
1611
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001612Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001615fi
1616
1617if test "$ac_init_help" = "recursive"; then
1618 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 test -d "$ac_dir" ||
1621 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1622 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 ac_builddir=.
1624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625case "$ac_dir" in
1626.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1627*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001628 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001630 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 case $ac_top_builddir_sub in
1632 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1633 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1634 esac ;;
1635esac
1636ac_abs_top_builddir=$ac_pwd
1637ac_abs_builddir=$ac_pwd$ac_dir_suffix
1638# for backward compatibility:
1639ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001640
1641case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 ac_top_srcdir=$ac_top_builddir_sub
1645 ac_abs_top_srcdir=$ac_pwd ;;
1646 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001648 ac_top_srcdir=$srcdir
1649 ac_abs_top_srcdir=$srcdir ;;
1650 *) # Relative name.
1651 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1652 ac_top_srcdir=$ac_top_build_prefix$srcdir
1653 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001654esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 cd "$ac_dir" || { ac_status=$?; continue; }
1658 # Check for guested configure.
1659 if test -f "$ac_srcdir/configure.gnu"; then
1660 echo &&
1661 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1662 elif test -f "$ac_srcdir/configure"; then
1663 echo &&
1664 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001665 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001666 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001667 fi || ac_status=$?
1668 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001669 done
1670fi
1671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001672test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001673if $ac_init_version; then
1674 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001675python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001676generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001677
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001678Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001679This configure script is free software; the Free Software Foundation
1680gives unlimited permission to copy, distribute and modify it.
1681_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001682 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001684
1685## ------------------------ ##
1686## Autoconf initialization. ##
1687## ------------------------ ##
1688
1689# ac_fn_c_try_compile LINENO
1690# --------------------------
1691# Try to compile conftest.$ac_ext, and return whether this succeeded.
1692ac_fn_c_try_compile ()
1693{
1694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695 rm -f conftest.$ac_objext
1696 if { { ac_try="$ac_compile"
1697case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_compile") 2>conftest.err
1704 ac_status=$?
1705 if test -s conftest.err; then
1706 grep -v '^ *+' conftest.err >conftest.er1
1707 cat conftest.er1 >&5
1708 mv -f conftest.er1 conftest.err
1709 fi
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; } && {
1712 test -z "$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 } && test -s conftest.$ac_objext; then :
1715 ac_retval=0
1716else
1717 $as_echo "$as_me: failed program was:" >&5
1718sed 's/^/| /' conftest.$ac_ext >&5
1719
1720 ac_retval=1
1721fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001722 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001723 as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_compile
1726
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001727# ac_fn_c_try_cpp LINENO
1728# ----------------------
1729# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1730ac_fn_c_try_cpp ()
1731{
1732 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1733 if { { ac_try="$ac_cpp conftest.$ac_ext"
1734case "(($ac_try" in
1735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1736 *) ac_try_echo=$ac_try;;
1737esac
1738eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1739$as_echo "$ac_try_echo"; } >&5
1740 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1741 ac_status=$?
1742 if test -s conftest.err; then
1743 grep -v '^ *+' conftest.err >conftest.er1
1744 cat conftest.er1 >&5
1745 mv -f conftest.er1 conftest.err
1746 fi
1747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1748 test $ac_status = 0; } > conftest.i && {
1749 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1750 test ! -s conftest.err
1751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1760 as_fn_set_status $ac_retval
1761
1762} # ac_fn_c_try_cpp
1763
Matthias Kloseb9621712010-04-24 17:59:49 +00001764# ac_fn_c_try_link LINENO
1765# -----------------------
1766# Try to link conftest.$ac_ext, and return whether this succeeded.
1767ac_fn_c_try_link ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1770 rm -f conftest.$ac_objext conftest$ac_exeext
1771 if { { ac_try="$ac_link"
1772case "(($ac_try" in
1773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774 *) ac_try_echo=$ac_try;;
1775esac
1776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777$as_echo "$ac_try_echo"; } >&5
1778 (eval "$ac_link") 2>conftest.err
1779 ac_status=$?
1780 if test -s conftest.err; then
1781 grep -v '^ *+' conftest.err >conftest.er1
1782 cat conftest.er1 >&5
1783 mv -f conftest.er1 conftest.err
1784 fi
1785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786 test $ac_status = 0; } && {
1787 test -z "$ac_c_werror_flag" ||
1788 test ! -s conftest.err
1789 } && test -s conftest$ac_exeext && {
1790 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001791 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 }; then :
1793 ac_retval=0
1794else
1795 $as_echo "$as_me: failed program was:" >&5
1796sed 's/^/| /' conftest.$ac_ext >&5
1797
1798 ac_retval=1
1799fi
1800 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1801 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1802 # interfere with the next link command; also delete a directory that is
1803 # left behind by Apple's compiler. We do this before executing the actions.
1804 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001805 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 as_fn_set_status $ac_retval
1807
1808} # ac_fn_c_try_link
1809
Matthias Kloseb9621712010-04-24 17:59:49 +00001810# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1811# -------------------------------------------------------
1812# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1813# the include files in INCLUDES and setting the cache variable VAR
1814# accordingly.
1815ac_fn_c_check_header_mongrel ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001818 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001821if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001822 $as_echo_n "(cached) " >&6
1823fi
1824eval ac_res=\$$3
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826$as_echo "$ac_res" >&6; }
1827else
1828 # Is the header compilable?
1829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1830$as_echo_n "checking $2 usability... " >&6; }
1831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834#include <$2>
1835_ACEOF
1836if ac_fn_c_try_compile "$LINENO"; then :
1837 ac_header_compiler=yes
1838else
1839 ac_header_compiler=no
1840fi
1841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1843$as_echo "$ac_header_compiler" >&6; }
1844
1845# Is the header present?
1846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1847$as_echo_n "checking $2 presence... " >&6; }
1848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849/* end confdefs.h. */
1850#include <$2>
1851_ACEOF
1852if ac_fn_c_try_cpp "$LINENO"; then :
1853 ac_header_preproc=yes
1854else
1855 ac_header_preproc=no
1856fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001857rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1859$as_echo "$ac_header_preproc" >&6; }
1860
1861# So? What about this header?
1862case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1863 yes:no: )
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1865$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868 ;;
1869 no:yes:* )
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1871$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1873$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1875$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1877$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1879$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001880( $as_echo "## --------------------------------------- ##
1881## Report this to https://bugs.python.org/ ##
1882## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001883 ) | sed "s/^/$as_me: WARNING: /" >&2
1884 ;;
1885esac
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001888if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001889 $as_echo_n "(cached) " >&6
1890else
1891 eval "$3=\$ac_header_compiler"
1892fi
1893eval ac_res=\$$3
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1895$as_echo "$ac_res" >&6; }
1896fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898
1899} # ac_fn_c_check_header_mongrel
1900
1901# ac_fn_c_try_run LINENO
1902# ----------------------
1903# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1904# that executables *can* be run.
1905ac_fn_c_try_run ()
1906{
1907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908 if { { ac_try="$ac_link"
1909case "(($ac_try" in
1910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1911 *) ac_try_echo=$ac_try;;
1912esac
1913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1914$as_echo "$ac_try_echo"; } >&5
1915 (eval "$ac_link") 2>&5
1916 ac_status=$?
1917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1919 { { case "(($ac_try" in
1920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1921 *) ac_try_echo=$ac_try;;
1922esac
1923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1924$as_echo "$ac_try_echo"; } >&5
1925 (eval "$ac_try") 2>&5
1926 ac_status=$?
1927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1928 test $ac_status = 0; }; }; then :
1929 ac_retval=0
1930else
1931 $as_echo "$as_me: program exited with status $ac_status" >&5
1932 $as_echo "$as_me: failed program was:" >&5
1933sed 's/^/| /' conftest.$ac_ext >&5
1934
1935 ac_retval=$ac_status
1936fi
1937 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001938 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001939 as_fn_set_status $ac_retval
1940
1941} # ac_fn_c_try_run
1942
1943# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1944# -------------------------------------------------------
1945# Tests whether HEADER exists and can be compiled using the include files in
1946# INCLUDES, setting the cache variable VAR accordingly.
1947ac_fn_c_check_header_compile ()
1948{
1949 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1951$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001952if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 $as_echo_n "(cached) " >&6
1954else
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$4
1958#include <$2>
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961 eval "$3=yes"
1962else
1963 eval "$3=no"
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967eval ac_res=\$$3
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001971
1972} # ac_fn_c_check_header_compile
1973
Matthias Kloseb9621712010-04-24 17:59:49 +00001974# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1975# -------------------------------------------
1976# Tests whether TYPE exists after having included INCLUDES, setting cache
1977# variable VAR accordingly.
1978ac_fn_c_check_type ()
1979{
1980 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1982$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001984 $as_echo_n "(cached) " >&6
1985else
1986 eval "$3=no"
1987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990int
1991main ()
1992{
1993if (sizeof ($2))
1994 return 0;
1995 ;
1996 return 0;
1997}
1998_ACEOF
1999if ac_fn_c_try_compile "$LINENO"; then :
2000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2001/* end confdefs.h. */
2002$4
2003int
2004main ()
2005{
2006if (sizeof (($2)))
2007 return 0;
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013
2014else
2015 eval "$3=yes"
2016fi
2017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2018fi
2019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2020fi
2021eval ac_res=\$$3
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2023$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002024 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002025
2026} # ac_fn_c_check_type
2027
Matthias Kloseb9621712010-04-24 17:59:49 +00002028# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2029# --------------------------------------------
2030# Tries to find the compile-time value of EXPR in a program that includes
2031# INCLUDES, setting VAR accordingly. Returns whether the value could be
2032# computed
2033ac_fn_c_compute_int ()
2034{
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 if test "$cross_compiling" = yes; then
2037 # Depending upon the size, compute the lo and hi bounds.
2038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_lo=0 ac_mid=0
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_hi=$ac_mid; break
2071else
2072 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2073 if test $ac_lo -le $ac_mid; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084$4
2085int
2086main ()
2087{
2088static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002089test_array [0] = 0;
2090return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_hi=-1 ac_mid=-1
2098 while :; do
2099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h. */
2101$4
2102int
2103main ()
2104{
2105static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002106test_array [0] = 0;
2107return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 ac_lo=$ac_mid; break
2115else
2116 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2117 if test $ac_mid -le $ac_hi; then
2118 ac_lo= ac_hi=
2119 break
2120 fi
2121 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124 done
2125else
2126 ac_lo= ac_hi=
2127fi
2128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2129fi
2130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2131# Binary search between lo and hi bounds.
2132while test "x$ac_lo" != "x$ac_hi"; do
2133 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137int
2138main ()
2139{
2140static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002141test_array [0] = 0;
2142return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002143
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_compile "$LINENO"; then :
2149 ac_hi=$ac_mid
2150else
2151 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2152fi
2153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2154done
2155case $ac_lo in #((
2156?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2157'') ac_retval=1 ;;
2158esac
2159 else
2160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161/* end confdefs.h. */
2162$4
2163static long int longval () { return $2; }
2164static unsigned long int ulongval () { return $2; }
2165#include <stdio.h>
2166#include <stdlib.h>
2167int
2168main ()
2169{
2170
2171 FILE *f = fopen ("conftest.val", "w");
2172 if (! f)
2173 return 1;
2174 if (($2) < 0)
2175 {
2176 long int i = longval ();
2177 if (i != ($2))
2178 return 1;
2179 fprintf (f, "%ld", i);
2180 }
2181 else
2182 {
2183 unsigned long int i = ulongval ();
2184 if (i != ($2))
2185 return 1;
2186 fprintf (f, "%lu", i);
2187 }
2188 /* Do not output a trailing newline, as this causes \r\n confusion
2189 on some platforms. */
2190 return ferror (f) || fclose (f) != 0;
2191
2192 ;
2193 return 0;
2194}
2195_ACEOF
2196if ac_fn_c_try_run "$LINENO"; then :
2197 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2198else
2199 ac_retval=1
2200fi
2201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2202 conftest.$ac_objext conftest.beam conftest.$ac_ext
2203rm -f conftest.val
2204
2205 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002206 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002207 as_fn_set_status $ac_retval
2208
2209} # ac_fn_c_compute_int
2210
2211# ac_fn_c_check_func LINENO FUNC VAR
2212# ----------------------------------
2213# Tests whether FUNC exists, setting the cache variable VAR accordingly
2214ac_fn_c_check_func ()
2215{
2216 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2218$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002219if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002220 $as_echo_n "(cached) " >&6
2221else
2222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2223/* end confdefs.h. */
2224/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2225 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2226#define $2 innocuous_$2
2227
2228/* System header to define __stub macros and hopefully few prototypes,
2229 which can conflict with char $2 (); below.
2230 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2231 <limits.h> exists even on freestanding compilers. */
2232
2233#ifdef __STDC__
2234# include <limits.h>
2235#else
2236# include <assert.h>
2237#endif
2238
2239#undef $2
2240
2241/* Override any GCC internal prototype to avoid an error.
2242 Use char because int might match the return type of a GCC
2243 builtin and then its argument prototype would still apply. */
2244#ifdef __cplusplus
2245extern "C"
2246#endif
2247char $2 ();
2248/* The GNU C library defines this for functions which it implements
2249 to always fail with ENOSYS. Some functions are actually named
2250 something starting with __ and the normal name is an alias. */
2251#if defined __stub_$2 || defined __stub___$2
2252choke me
2253#endif
2254
2255int
2256main ()
2257{
2258return $2 ();
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_link "$LINENO"; then :
2264 eval "$3=yes"
2265else
2266 eval "$3=no"
2267fi
2268rm -f core conftest.err conftest.$ac_objext \
2269 conftest$ac_exeext conftest.$ac_ext
2270fi
2271eval ac_res=\$$3
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2273$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002275
2276} # ac_fn_c_check_func
2277
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002278# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2279# ---------------------------------------------
2280# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2281# accordingly.
2282ac_fn_c_check_decl ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 as_decl_name=`echo $2|sed 's/ *(.*//'`
2286 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2288$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2289if eval \${$3+:} false; then :
2290 $as_echo_n "(cached) " >&6
2291else
2292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h. */
2294$4
2295int
2296main ()
2297{
2298#ifndef $as_decl_name
2299#ifdef __cplusplus
2300 (void) $as_decl_use;
2301#else
2302 (void) $as_decl_name;
2303#endif
2304#endif
2305
2306 ;
2307 return 0;
2308}
2309_ACEOF
2310if ac_fn_c_try_compile "$LINENO"; then :
2311 eval "$3=yes"
2312else
2313 eval "$3=no"
2314fi
2315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2316fi
2317eval ac_res=\$$3
2318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2319$as_echo "$ac_res" >&6; }
2320 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2321
2322} # ac_fn_c_check_decl
2323
Matthias Kloseb9621712010-04-24 17:59:49 +00002324# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2325# ----------------------------------------------------
2326# Tries to find if the field MEMBER exists in type AGGR, after including
2327# INCLUDES, setting cache variable VAR accordingly.
2328ac_fn_c_check_member ()
2329{
2330 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2332$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002333if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002334 $as_echo_n "(cached) " >&6
2335else
2336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337/* end confdefs.h. */
2338$5
2339int
2340main ()
2341{
2342static $2 ac_aggr;
2343if (ac_aggr.$3)
2344return 0;
2345 ;
2346 return 0;
2347}
2348_ACEOF
2349if ac_fn_c_try_compile "$LINENO"; then :
2350 eval "$4=yes"
2351else
2352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h. */
2354$5
2355int
2356main ()
2357{
2358static $2 ac_aggr;
2359if (sizeof ac_aggr.$3)
2360return 0;
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$4=yes"
2367else
2368 eval "$4=no"
2369fi
2370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371fi
2372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2373fi
2374eval ac_res=\$$4
2375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2376$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002377 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002378
2379} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002381This file contains any messages produced by compilers while
2382running configure, to aid debugging if configure makes a mistake.
2383
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002384It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002385generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002386
2387 $ $0 $@
2388
2389_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002390exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002391{
2392cat <<_ASUNAME
2393## --------- ##
2394## Platform. ##
2395## --------- ##
2396
2397hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2398uname -m = `(uname -m) 2>/dev/null || echo unknown`
2399uname -r = `(uname -r) 2>/dev/null || echo unknown`
2400uname -s = `(uname -s) 2>/dev/null || echo unknown`
2401uname -v = `(uname -v) 2>/dev/null || echo unknown`
2402
2403/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2404/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2405
2406/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2407/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2408/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002410/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2411/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2412/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2413
2414_ASUNAME
2415
2416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2417for as_dir in $PATH
2418do
2419 IFS=$as_save_IFS
2420 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 $as_echo "PATH: $as_dir"
2422 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002424
2425} >&5
2426
2427cat >&5 <<_ACEOF
2428
2429
2430## ----------- ##
2431## Core tests. ##
2432## ----------- ##
2433
2434_ACEOF
2435
2436
2437# Keep a trace of the command line.
2438# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002439# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002440# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002441# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002442ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002443ac_configure_args0=
2444ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002445ac_must_keep_next=false
2446for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002447do
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 for ac_arg
2449 do
2450 case $ac_arg in
2451 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2452 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2453 | -silent | --silent | --silen | --sile | --sil)
2454 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002456 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002457 esac
2458 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002460 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002462 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002463 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002465 case $ac_arg in
2466 *=* | --config-cache | -C | -disable-* | --disable-* \
2467 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2468 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2469 | -with-* | --with-* | -without-* | --without-* | --x)
2470 case "$ac_configure_args0 " in
2471 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2472 esac
2473 ;;
2474 -* ) ac_must_keep_next=true ;;
2475 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 ;;
2479 esac
2480 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002481done
Matthias Kloseb9621712010-04-24 17:59:49 +00002482{ ac_configure_args0=; unset ac_configure_args0;}
2483{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002484
2485# When interrupted or exit'd, cleanup temporary files, and complete
2486# config.log. We remove comments because anyway the quotes in there
2487# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488# WARNING: Use '\'' to represent an apostrophe within the trap.
2489# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002490trap 'exit_status=$?
2491 # Save into config.log some information that might help in debugging.
2492 {
2493 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002494
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002496## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
2499 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500(
2501 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2502 eval ac_val=\$$ac_var
2503 case $ac_val in #(
2504 *${as_nl}*)
2505 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2507$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
2509 case $ac_var in #(
2510 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2512 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac ;;
2514 esac
2515 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2518 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 "s/'\''/'\''\\\\'\'''\''/g;
2521 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2522 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002523 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002525 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 esac |
2527 sort
2528)
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002530
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002532## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002534 echo
2535 for ac_var in $ac_subst_vars
2536 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 eval ac_val=\$$ac_var
2538 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 done | sort
2543 echo
2544
2545 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002546 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002548## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002549 echo
2550 for ac_var in $ac_subst_files
2551 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 eval ac_val=\$$ac_var
2553 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002554 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 done | sort
2558 echo
2559 fi
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002563## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 echo
2568 fi
2569 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002570 $as_echo "$as_me: caught signal $ac_signal"
2571 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 rm -f core *.core core.conftest.* &&
2574 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002577for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002579done
2580ac_signal=0
2581
2582# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002584
Matthias Kloseb9621712010-04-24 17:59:49 +00002585$as_echo "/* confdefs.h */" > confdefs.h
2586
Martin v. Löwis11437992002-04-12 09:54:03 +00002587# Predefined preprocessor variables.
2588
2589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_NAME "$PACKAGE_NAME"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2595_ACEOF
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_VERSION "$PACKAGE_VERSION"
2599_ACEOF
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_STRING "$PACKAGE_STRING"
2603_ACEOF
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2607_ACEOF
2608
Matthias Kloseb9621712010-04-24 17:59:49 +00002609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_URL "$PACKAGE_URL"
2611_ACEOF
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613
2614# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002615# Prefer an explicitly selected file to automatically selected ones.
2616ac_site_file1=NONE
2617ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002619 # We do not want a PATH search for config.site.
2620 case $CONFIG_SITE in #((
2621 -*) ac_site_file1=./$CONFIG_SITE;;
2622 */*) ac_site_file1=$CONFIG_SITE;;
2623 *) ac_site_file1=./$CONFIG_SITE;;
2624 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 ac_site_file1=$prefix/share/config.site
2627 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628else
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 ac_site_file1=$ac_default_prefix/share/config.site
2630 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002632for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633do
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 test "x$ac_site_file" = xNONE && continue
2635 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2637$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002639 . "$ac_site_file" \
2640 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2641$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2642as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002643See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002644 fi
2645done
2646
2647if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 # Some versions of bash will fail to source /dev/null (special files
2649 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2650 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2652$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2655 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002658else
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2660$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 >$cache_file
2662fi
2663
2664# Check that the precious variables saved in the cache have kept the same
2665# value.
2666ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2669 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2671 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 case $ac_old_set,$ac_new_set in
2673 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2675$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 ac_cache_corrupted=: ;;
2677 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2679$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 ac_cache_corrupted=: ;;
2681 ,);;
2682 *)
2683 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 # differences in whitespace do not lead to failure.
2685 ac_old_val_w=`echo x $ac_old_val`
2686 ac_new_val_w=`echo x $ac_new_val`
2687 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2689$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2690 ac_cache_corrupted=:
2691 else
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2693$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2694 eval $ac_var=\$ac_old_val
2695 fi
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2697$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2699$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 fi;;
2701 esac
2702 # Pass precious variables to config.status.
2703 if test "$ac_new_set" = set; then
2704 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 *) ac_arg=$ac_var=$ac_new_val ;;
2707 esac
2708 case " $ac_configure_args " in
2709 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002710 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 esac
2712 fi
2713done
2714if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002715 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2718$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002719 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002721## -------------------- ##
2722## Main body of script. ##
2723## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002724
Guido van Rossum7f43da71994-08-01 12:15:30 +00002725ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002730
Guido van Rossum627b2d71993-12-24 10:39:16 +00002731
Michael W. Hudson54241132001-12-07 15:38:26 +00002732
Trent Nelson4d4ec652012-10-16 08:51:24 -04002733
Christian Heimesff5be6e2018-01-20 13:19:21 +01002734
2735
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002736if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002737 # If we're building out-of-tree, we need to make sure the following
2738 # resources get picked up before their $srcdir counterparts.
2739 # Objects/ -> typeslots.inc
2740 # Include/ -> Python-ast.h, graminit.h
2741 # Python/ -> importlib.h
2742 # (A side effect of this is that these resources will automatically be
2743 # regenerated when building out-of-tree, regardless of whether or not
2744 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2745 # off.)
2746 BASECPPFLAGS="-IObjects -IInclude -IPython"
2747else
2748 BASECPPFLAGS=""
2749fi
2750
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751
2752
2753
2754
Victor Stinner9ed34a82017-05-02 22:35:58 +02002755if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757# Extract the first word of "git", so it can be a program name with args.
2758set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2760$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762 $as_echo_n "(cached) " >&6
2763else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764 if test -n "$HAS_GIT"; then
2765 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766else
2767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2768for as_dir in $PATH
2769do
2770 IFS=$as_save_IFS
2771 test -z "$as_dir" && as_dir=.
2772 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002774 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2776 break 2
2777 fi
2778done
2779 done
2780IFS=$as_save_IFS
2781
Ned Deily5c4b0d02017-03-04 00:19:55 -05002782 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002783fi
2784fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002785HAS_GIT=$ac_cv_prog_HAS_GIT
2786if test -n "$HAS_GIT"; then
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2788$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002789else
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2791$as_echo "no" >&6; }
2792fi
2793
2794
2795else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002796HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002797fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002798if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799then
Xiang Zhang4c855572018-08-20 22:36:19 +08002800 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2801 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2802 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002804 GITVERSION=""
2805 GITTAG=""
2806 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002807fi
2808
2809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002810ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002811
2812
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002813ac_aux_dir=
2814for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2815 if test -f "$ac_dir/install-sh"; then
2816 ac_aux_dir=$ac_dir
2817 ac_install_sh="$ac_aux_dir/install-sh -c"
2818 break
2819 elif test -f "$ac_dir/install.sh"; then
2820 ac_aux_dir=$ac_dir
2821 ac_install_sh="$ac_aux_dir/install.sh -c"
2822 break
2823 elif test -f "$ac_dir/shtool"; then
2824 ac_aux_dir=$ac_dir
2825 ac_install_sh="$ac_aux_dir/shtool install -c"
2826 break
2827 fi
2828done
2829if test -z "$ac_aux_dir"; then
2830 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2831fi
2832
2833# These three variables are undocumented and unsupported,
2834# and are intended to be withdrawn in a future Autoconf release.
2835# They can cause serious problems if a builder's source tree is in a directory
2836# whose full name contains unusual characters.
2837ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2838ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2839ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2840
2841
2842# Make sure we can run config.sub.
2843$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2844 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2845
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2847$as_echo_n "checking build system type... " >&6; }
2848if ${ac_cv_build+:} false; then :
2849 $as_echo_n "(cached) " >&6
2850else
2851 ac_build_alias=$build_alias
2852test "x$ac_build_alias" = x &&
2853 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2854test "x$ac_build_alias" = x &&
2855 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2856ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2857 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2861$as_echo "$ac_cv_build" >&6; }
2862case $ac_cv_build in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2865esac
2866build=$ac_cv_build
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_build
2869shift
2870build_cpu=$1
2871build_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875build_os=$*
2876IFS=$ac_save_IFS
2877case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2878
2879
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2881$as_echo_n "checking host system type... " >&6; }
2882if ${ac_cv_host+:} false; then :
2883 $as_echo_n "(cached) " >&6
2884else
2885 if test "x$host_alias" = x; then
2886 ac_cv_host=$ac_cv_build
2887else
2888 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2889 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2890fi
2891
2892fi
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2894$as_echo "$ac_cv_host" >&6; }
2895case $ac_cv_host in
2896*-*-*) ;;
2897*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2898esac
2899host=$ac_cv_host
2900ac_save_IFS=$IFS; IFS='-'
2901set x $ac_cv_host
2902shift
2903host_cpu=$1
2904host_vendor=$2
2905shift; shift
2906# Remember, the first character of IFS is used to create $*,
2907# except with old shells:
2908host_os=$*
2909IFS=$ac_save_IFS
2910case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2911
2912
2913
doko@python.orga10e4a92013-01-25 18:45:12 +01002914
2915
Ned Deilyfcbc2462014-08-22 13:32:49 -07002916# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2917rm -f pybuilddir.txt
2918
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919for ac_prog in python$PACKAGE_VERSION python3 python
2920do
2921 # Extract the first word of "$ac_prog", so it can be a program name with args.
2922set dummy $ac_prog; ac_word=$2
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2924$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002925if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926 $as_echo_n "(cached) " >&6
2927else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002928 if test -n "$PYTHON_FOR_REGEN"; then
2929 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002930else
2931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2932for as_dir in $PATH
2933do
2934 IFS=$as_save_IFS
2935 test -z "$as_dir" && as_dir=.
2936 for ac_exec_ext in '' $ac_executable_extensions; do
2937 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002938 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2940 break 2
2941 fi
2942done
2943 done
2944IFS=$as_save_IFS
2945
2946fi
2947fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002948PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2949if test -n "$PYTHON_FOR_REGEN"; then
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2951$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002952else
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2954$as_echo "no" >&6; }
2955fi
2956
2957
Victor Stinnera5c62a82017-05-03 18:21:48 +02002958 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002959done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002960test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002961
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002962
2963
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002964if test "$cross_compiling" = yes; then
2965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2966$as_echo_n "checking for python interpreter for cross build... " >&6; }
2967 if test -z "$PYTHON_FOR_BUILD"; then
2968 for interp in python$PACKAGE_VERSION python3 python; do
2969 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002970 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002971 break
2972 fi
2973 interp=
2974 done
2975 if test x$interp = x; then
2976 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2977 fi
2978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2979$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002980 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002981 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002982elif test "$cross_compiling" = maybe; then
2983 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002984else
2985 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2986fi
2987
2988
Martin v. Löwis11437992002-04-12 09:54:03 +00002989
Benjamin Petersond23f8222009-04-05 19:13:16 +00002990if test "$prefix" != "/"; then
2991 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2992fi
2993
2994
Martin v. Löwis11437992002-04-12 09:54:03 +00002995
2996
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002997# We don't use PACKAGE_ variables, and they cause conflicts
2998# with other autoconf-based packages that include Python.h
2999grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3000rm confdefs.h
3001mv confdefs.h.new confdefs.h
3002
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003003
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003004VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003005
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003006# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003007
3008SOVERSION=1.0
3009
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010# The later defininition of _XOPEN_SOURCE disables certain features
3011# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3012
Matthias Kloseb9621712010-04-24 17:59:49 +00003013$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003014
3015
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003016# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3017# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3018# them.
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003021
3022
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003023# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3024# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3025# them.
3026
Matthias Kloseb9621712010-04-24 17:59:49 +00003027$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003028
3029
Martin v. Löwisd6320502004-08-12 13:45:08 +00003030# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003031# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3032# them.
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003035
3036
3037
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003038define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003039
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003040# Arguments passed to configure.
3041
3042CONFIG_ARGS="$ac_configure_args"
3043
Matthias Kloseb9621712010-04-24 17:59:49 +00003044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3045$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003047if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049 case $enableval in
3050 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003051 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003052 # information
3053 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003054 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3057 if test ! -d "${enableval}"
3058 then
3059 enableval=/
3060 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003062 ;;
3063 esac
3064 case $enableval in
3065 no)
3066 UNIVERSALSDK=
3067 enable_universalsdk=
3068 ;;
3069 *)
3070 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003071 if test ! -d "${UNIVERSALSDK}"
3072 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003073 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003074 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003075 ;;
3076 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003077
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003078
Thomas Wouters477c8d52006-05-27 19:21:47 +00003079else
3080
3081 UNIVERSALSDK=
3082 enable_universalsdk=
3083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003084fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003085
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086if test -n "${UNIVERSALSDK}"
3087then
Matthias Kloseb9621712010-04-24 17:59:49 +00003088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3089$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003090else
Matthias Kloseb9621712010-04-24 17:59:49 +00003091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3092$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003093fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003095
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003096
Ned Deily87adb6e2013-10-18 21:09:56 -07003097ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003098
Ned Deilycbfb9a52012-06-23 16:02:19 -07003099# For backward compatibility reasons we prefer to select '32-bit' if available,
3100# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003101UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003102if test "`uname -s`" = "Darwin"
3103then
3104 if test -n "${UNIVERSALSDK}"
3105 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003106 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003107 then
3108 UNIVERSAL_ARCHS="intel"
3109 fi
3110 fi
3111fi
3112
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003113
Matthias Kloseb9621712010-04-24 17:59:49 +00003114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3115$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003116
3117# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003118if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003119 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120 UNIVERSAL_ARCHS="$withval"
3121
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122fi
3123
Ned Deily87adb6e2013-10-18 21:09:56 -07003124if test -n "${UNIVERSALSDK}"
3125then
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3127$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3128else
3129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3130$as_echo "no" >&6; }
3131fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003133
3134# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003135if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003136 withval=$with_framework_name;
3137 PYTHONFRAMEWORK=${withval}
3138 PYTHONFRAMEWORKDIR=${withval}.framework
3139 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3140
3141else
3142
3143 PYTHONFRAMEWORK=Python
3144 PYTHONFRAMEWORKDIR=Python.framework
3145 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3146
3147fi
3148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003150if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003152 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003153 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003154 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003155 esac
3156 case $enableval in
3157 no)
3158 PYTHONFRAMEWORK=
3159 PYTHONFRAMEWORKDIR=no-framework
3160 PYTHONFRAMEWORKPREFIX=
3161 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003162 FRAMEWORKINSTALLFIRST=
3163 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003164 FRAMEWORKALTINSTALLFIRST=
3165 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003166 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003167 if test "x${prefix}" = "xNONE"; then
3168 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3169 else
3170 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3171 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003172 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003173 ;;
3174 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003175 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003176 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003178 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003179 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3180 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003181 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003183
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003184 if test "x${prefix}" = "xNONE" ; then
3185 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003186
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003187 else
3188 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3189 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003190
3191 case "${enableval}" in
3192 /System*)
3193 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3194 if test "${prefix}" = "NONE" ; then
3195 # See below
3196 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3197 fi
3198 ;;
3199
3200 /Library*)
3201 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3202 ;;
3203
3204 */Library/Frameworks)
3205 MDIR="`dirname "${enableval}"`"
3206 MDIR="`dirname "${MDIR}"`"
3207 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3208
3209 if test "${prefix}" = "NONE"; then
3210 # User hasn't specified the
3211 # --prefix option, but wants to install
3212 # the framework in a non-default location,
3213 # ensure that the compatibility links get
3214 # installed relative to that prefix as well
3215 # instead of in /usr/local.
3216 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3217 fi
3218 ;;
3219
3220 *)
3221 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3222 ;;
3223 esac
3224
Jack Jansen127e56e2001-09-11 14:41:54 +00003225 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003227 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003233 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3234
3235 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3236
Jack Jansene578a632001-08-15 01:27:14 +00003237 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003238
Guido van Rossum563e7081996-09-10 18:20:48 +00003239else
Martin v. Löwis11437992002-04-12 09:54:03 +00003240
Jack Jansene578a632001-08-15 01:27:14 +00003241 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003242 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003243 PYTHONFRAMEWORKPREFIX=
3244 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003245 FRAMEWORKINSTALLFIRST=
3246 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003247 FRAMEWORKALTINSTALLFIRST=
3248 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003249 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003250 if test "x${prefix}" = "xNONE" ; then
3251 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3252 else
3253 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3254 fi
Jack Jansene578a632001-08-15 01:27:14 +00003255 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003256
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258fi
3259
Thomas Wouters477c8d52006-05-27 19:21:47 +00003260
3261
Michael W. Hudson54241132001-12-07 15:38:26 +00003262
3263
3264
3265
Jack Jansene578a632001-08-15 01:27:14 +00003266
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003267
3268
3269
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003270
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003271
Ned Deilyb8f944f2013-11-21 22:42:25 -08003272
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003273
3274cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003275#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003276_ACEOF
3277
3278
Jack Jansene578a632001-08-15 01:27:14 +00003279##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003280## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003281## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003282##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283# Set name for machine-dependent library files
3284
Matthias Kloseb9621712010-04-24 17:59:49 +00003285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3286$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287if test -z "$MACHDEP"
3288then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 # avoid using uname for cross builds
3290 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003291 # ac_sys_system and ac_sys_release are used for setting
3292 # a lot of different things including 'define_xopen_source'
3293 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003294 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003295 *-*-linux-android*)
3296 ac_sys_system=Linux-android
3297 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 *-*-linux*)
3299 ac_sys_system=Linux
3300 ;;
3301 *-*-cygwin*)
3302 ac_sys_system=Cygwin
3303 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003304 *-*-vxworks*)
3305 ac_sys_system=VxWorks
3306 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 ac_sys_release=
3313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003314 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003315 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003316 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003317 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003319 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003321 fi
3322 ac_md_system=`echo $ac_sys_system |
3323 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3324 ac_md_release=`echo $ac_sys_release |
3325 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3326 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003327
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003328 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003329 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003330 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003331 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003332 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003333 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003334 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003335fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3337$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003338
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003339
3340if test "$cross_compiling" = yes; then
3341 case "$host" in
3342 *-*-linux*)
3343 case "$host_cpu" in
3344 arm*)
3345 _host_cpu=arm
3346 ;;
3347 *)
3348 _host_cpu=$host_cpu
3349 esac
3350 ;;
3351 *-*-cygwin*)
3352 _host_cpu=
3353 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003354 *-*-vxworks*)
3355 _host_cpu=$host_cpu
3356 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003357 *)
3358 # for now, limit cross builds to known configurations
3359 MACHDEP="unknown"
3360 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3361 esac
3362 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3363fi
3364
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003365# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3366# disable features if it is defined, without any means to access these
3367# features as extensions. For these systems, we skip the definition of
3368# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3369# some feature, make sure there is no alternative way to access this
3370# feature. Also, when using wildcards, make sure you have verified the
3371# need for not defining _XOPEN_SOURCE on all systems matching the
3372# wildcard, and that the wildcard does not include future systems
3373# (which may remove their limitations).
3374case $ac_sys_system/$ac_sys_release in
3375 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3376 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003377 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003378 # In addition, Stefan Krah confirms that issue #1244610 exists through
3379 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003380 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003381 define_xopen_source=no
3382 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3383 # also defined. This can be overridden by defining _BSD_SOURCE
3384 # As this has a different meaning on Linux, only define it on OpenBSD
3385
Matthias Kloseb9621712010-04-24 17:59:49 +00003386$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003387
3388 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003389 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003390 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3391 # also defined. This can be overridden by defining _BSD_SOURCE
3392 # As this has a different meaning on Linux, only define it on OpenBSD
3393
Matthias Kloseb9621712010-04-24 17:59:49 +00003394$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003395
3396 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003397 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3398 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3399 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003400 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003402 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3403 # request to enable features supported by the standard as a request
3404 # to disable features not supported by the standard. The best way
3405 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3406 # entirely and define __EXTENSIONS__ instead.
3407 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003408 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003409 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3410 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003411 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003412 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003413 define_xopen_source=no;;
3414 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003415 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003416 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003417 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003418 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3419 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3420 # identifies itself as Darwin/7.*
3421 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3422 # disables platform specific features beyond repair.
3423 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3424 # has no effect, don't bother defining them
3425 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003426 define_xopen_source=no;;
Miss Islington (bot)ad7a6672020-06-25 08:13:35 -07003427 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003428 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003429 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3430 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3431 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003432 AIX/4)
3433 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003434 AIX/5)
3435 if test `uname -r` -eq 1; then
3436 define_xopen_source=no
3437 fi
3438 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003439 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3440 # defining NI_NUMERICHOST.
3441 QNX/6.3.2)
3442 define_xopen_source=no
3443 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003444 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3445 # in network headers still using system V types.
3446 VxWorks/*)
3447 define_xopen_source=no
3448 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003449
Ian Nortona9edf442020-02-14 03:09:11 +00003450 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3451 # chroot() and other functions
3452 hp*|HP*)
3453 define_xopen_source=no
3454 ;;
3455
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003456esac
3457
3458if test $define_xopen_source = yes
3459then
Victor Stinner14d098d2011-09-07 22:29:43 +02003460 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
Victor Stinner14d098d2011-09-07 22:29:43 +02003462$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003463
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003464
3465 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3466 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3467 # several APIs are not declared. Since this is also needed in some
3468 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003469
Matthias Kloseb9621712010-04-24 17:59:49 +00003470$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003471
3472
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003473
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003474$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003475
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003476fi
3477
Christian Heimes647cd872013-12-07 23:39:33 +01003478# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3479case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003480 hp*|HP*)
3481 define_stdc_a1=yes;;
3482 *)
3483 define_stdc_a1=no;;
3484esac
3485
3486if test $define_stdc_a1 = yes
3487then
Christian Heimes647cd872013-12-07 23:39:33 +01003488
3489$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3490
Christian Heimesb02bcae2013-12-08 15:21:08 +01003491fi
Christian Heimes647cd872013-12-07 23:39:33 +01003492
Jack Jansen6b08a402004-06-03 12:41:45 +00003493# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3494# it may influence the way we can build extensions, so distutils
3495# needs to check it
3496
Thomas Wouters477c8d52006-05-27 19:21:47 +00003497
Jack Jansen6b08a402004-06-03 12:41:45 +00003498CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003499EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003500
Guido van Rossum627b2d71993-12-24 10:39:16 +00003501# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003502
3503# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3504# for debug/optimization stuff. BASECFLAGS is for flags that are required
3505# just to get things to compile and link. Users are free to override OPT
3506# when running configure or make. The build should not break if they do.
3507# BASECFLAGS should generally not be messed with, however.
3508
Guido van Rossum8b131c51995-03-09 14:10:13 +00003509# If the user switches compilers, we can't believe the cache
3510if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3511then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003512 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003513(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003514fi
3515
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003516# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3517# when the compiler supports them, but we don't always want -O2, and
3518# we set -g later.
3519if test -z "$CFLAGS"; then
3520 CFLAGS=
3521fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003522
3523if test "$ac_sys_system" = "Darwin"
3524then
3525 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003526 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003527 # information
3528 if test -z "${CC}"
3529 then
3530 found_gcc=
3531 found_clang=
3532 as_save_IFS=$IFS; IFS=:
3533 for as_dir in $PATH
3534 do
3535 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003536 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003537 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003538 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003539 fi
3540 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003541 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003542 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003543 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003544 fi
3545 fi
3546 done
3547 IFS=$as_save_IFS
3548
3549 if test -n "$found_gcc" -a -n "$found_clang"
3550 then
3551 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3552 then
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3554$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3555 CC="$found_clang"
3556 CXX="$found_clang++"
3557 fi
3558
3559
3560 elif test -z "$found_gcc" -a -n "$found_clang"
3561 then
3562 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3563$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3564 CC="$found_clang"
3565 CXX="$found_clang++"
3566
3567 elif test -z "$found_gcc" -a -z "$found_clang"
3568 then
3569 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3570 if test -n "${found_clang}"
3571 then
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3573$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3574 CC="${found_clang}"
3575 CXX="`/usr/bin/xcrun -find clang++`"
3576
3577 # else: use default behaviour
3578 fi
3579 fi
3580 fi
3581fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003582ac_ext=c
3583ac_cpp='$CPP $CPPFLAGS'
3584ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3585ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3586ac_compiler_gnu=$ac_cv_c_compiler_gnu
3587if test -n "$ac_tool_prefix"; then
3588 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3589set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3591$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003592if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003594else
3595 if test -n "$CC"; then
3596 ac_cv_prog_CC="$CC" # Let the user override the test.
3597else
Martin v. Löwis11437992002-04-12 09:54:03 +00003598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3599for as_dir in $PATH
3600do
3601 IFS=$as_save_IFS
3602 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 break 2
3608 fi
3609done
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003612
Jack Jansendd19cf82001-12-06 22:36:17 +00003613fi
3614fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003616if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3618$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003619else
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3621$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003622fi
3623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003624
Martin v. Löwis11437992002-04-12 09:54:03 +00003625fi
3626if test -z "$ac_cv_prog_CC"; then
3627 ac_ct_CC=$CC
3628 # Extract the first word of "gcc", so it can be a program name with args.
3629set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3631$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003632if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003634else
3635 if test -n "$ac_ct_CC"; then
3636 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3637else
3638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641 IFS=$as_save_IFS
3642 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 break 2
3648 fi
3649done
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003652
3653fi
3654fi
3655ac_ct_CC=$ac_cv_prog_ac_ct_CC
3656if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3658$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3661$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664 if test "x$ac_ct_CC" = x; then
3665 CC=""
3666 else
3667 case $cross_compiling:$ac_tool_warned in
3668yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671ac_tool_warned=yes ;;
3672esac
3673 CC=$ac_ct_CC
3674 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003675else
3676 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003677fi
3678
Jack Jansendd19cf82001-12-06 22:36:17 +00003679if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 if test -n "$ac_tool_prefix"; then
3681 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003682set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3684$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003685if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003687else
3688 if test -n "$CC"; then
3689 ac_cv_prog_CC="$CC" # Let the user override the test.
3690else
Martin v. Löwis11437992002-04-12 09:54:03 +00003691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3692for as_dir in $PATH
3693do
3694 IFS=$as_save_IFS
3695 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 break 2
3701 fi
3702done
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003705
3706fi
3707fi
3708CC=$ac_cv_prog_CC
3709if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3711$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003712else
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3714$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003719fi
3720if test -z "$CC"; then
3721 # Extract the first word of "cc", so it can be a program name with args.
3722set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3724$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003725if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003727else
3728 if test -n "$CC"; then
3729 ac_cv_prog_CC="$CC" # Let the user override the test.
3730else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3733for as_dir in $PATH
3734do
3735 IFS=$as_save_IFS
3736 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3740 ac_prog_rejected=yes
3741 continue
3742 fi
3743 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 break 2
3746 fi
3747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751if test $ac_prog_rejected = yes; then
3752 # We found a bogon in the path, so make sure we never use it.
3753 set dummy $ac_cv_prog_CC
3754 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756 # We chose a different compiler from the bogus one.
3757 # However, it has the same basename, so the bogon will be chosen
3758 # first if we set CC to just the basename; use the full file name.
3759 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003760 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761 fi
3762fi
3763fi
3764fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3768$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769else
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3771$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772fi
3773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774
Martin v. Löwis11437992002-04-12 09:54:03 +00003775fi
3776if test -z "$CC"; then
3777 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 do
3780 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3781set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3783$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003784if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003786else
3787 if test -n "$CC"; then
3788 ac_cv_prog_CC="$CC" # Let the user override the test.
3789else
Martin v. Löwis11437992002-04-12 09:54:03 +00003790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791for as_dir in $PATH
3792do
3793 IFS=$as_save_IFS
3794 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801done
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003804
3805fi
3806fi
3807CC=$ac_cv_prog_CC
3808if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3810$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003811else
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3813$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003814fi
3815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 test -n "$CC" && break
3818 done
3819fi
3820if test -z "$CC"; then
3821 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003823do
3824 # Extract the first word of "$ac_prog", so it can be a program name with args.
3825set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3827$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003828if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003830else
3831 if test -n "$ac_ct_CC"; then
3832 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3833else
3834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3835for as_dir in $PATH
3836do
3837 IFS=$as_save_IFS
3838 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003843 break 2
3844 fi
3845done
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850fi
3851ac_ct_CC=$ac_cv_prog_ac_ct_CC
3852if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3854$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003855else
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 test -n "$ac_ct_CC" && break
3862done
Michael W. Hudson54241132001-12-07 15:38:26 +00003863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864 if test "x$ac_ct_CC" = x; then
3865 CC=""
3866 else
3867 case $cross_compiling:$ac_tool_warned in
3868yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871ac_tool_warned=yes ;;
3872esac
3873 CC=$ac_ct_CC
3874 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003875fi
3876
3877fi
3878
3879
Matthias Kloseb9621712010-04-24 17:59:49 +00003880test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003882as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003883See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003884
3885# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003886$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3887set X $ac_compile
3888ac_compiler=$2
3889for ac_option in --version -v -V -qversion; do
3890 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891case "(($ac_try" in
3892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893 *) ac_try_echo=$ac_try;;
3894esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3896$as_echo "$ac_try_echo"; } >&5
3897 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 if test -s conftest.err; then
3900 sed '10a\
3901... rest of stderr output deleted ...
3902 10q' conftest.err >conftest.er1
3903 cat conftest.er1 >&5
3904 fi
3905 rm -f conftest.er1 conftest.err
3906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3907 test $ac_status = 0; }
3908done
Martin v. Löwis11437992002-04-12 09:54:03 +00003909
Matthias Kloseb9621712010-04-24 17:59:49 +00003910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003911/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003912
Martin v. Löwis11437992002-04-12 09:54:03 +00003913int
3914main ()
3915{
3916
3917 ;
3918 return 0;
3919}
3920_ACEOF
3921ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003922ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003923# Try to create an executable without -o first, disregard a.out.
3924# It will help us diagnose broken compilers, and finding out an intuition
3925# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3927$as_echo_n "checking whether the C compiler works... " >&6; }
3928ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3929
3930# The possible output files:
3931ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933ac_rmfiles=
3934for ac_file in $ac_files
3935do
3936 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3939 esac
3940done
3941rm -f $ac_rmfiles
3942
Matthias Kloseb9621712010-04-24 17:59:49 +00003943if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944case "(($ac_try" in
3945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3946 *) ac_try_echo=$ac_try;;
3947esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3949$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3953 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3955# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3956# in a Makefile. We should not override ac_cv_exeext if it was cached,
3957# so that the user can short-circuit this test for compilers unknown to
3958# Autoconf.
3959for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003960do
3961 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003964 ;;
3965 [ab].out )
3966 # We found the default executable, but exeext='' is most
3967 # certainly right.
3968 break;;
3969 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 then :; else
3972 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973 fi
3974 # We set ac_cv_exeext here because the later test for it is not
3975 # safe: cross compilers may not add the suffix if given an `-o'
3976 # argument, so we may need to know it at that point already.
3977 # Even if this section looks crufty: it has the advantage of
3978 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003979 break;;
3980 * )
3981 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 esac
3983done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984test "$ac_cv_exeext" = no && ac_cv_exeext=
3985
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003986else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 ac_file=''
3988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003989if test -z "$ac_file"; then :
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3991$as_echo "no" >&6; }
3992$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003993sed 's/^/| /' conftest.$ac_ext >&5
3994
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003997as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003998See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003999else
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4001$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4004$as_echo_n "checking for C compiler default output file name... " >&6; }
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4006$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008
Matthias Kloseb9621712010-04-24 17:59:49 +00004009rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4012$as_echo_n "checking for suffix of executables... " >&6; }
4013if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014case "(($ac_try" in
4015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4016 *) ac_try_echo=$ac_try;;
4017esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4019$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4023 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004024 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4025# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4026# work properly (i.e., refer to `conftest.exe'), while it won't with
4027# `rm'.
4028for ac_file in conftest.exe conftest conftest.*; do
4029 test -f "$ac_file" || continue
4030 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4033 break;;
4034 * ) break;;
4035 esac
4036done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004037else
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004040as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004041See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004043rm -f conftest conftest$ac_cv_exeext
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4045$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004046
4047rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004048EXEEXT=$ac_cv_exeext
4049ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4051/* end confdefs.h. */
4052#include <stdio.h>
4053int
4054main ()
4055{
4056FILE *f = fopen ("conftest.out", "w");
4057 return ferror (f) || fclose (f) != 0;
4058
4059 ;
4060 return 0;
4061}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004063ac_clean_files="$ac_clean_files conftest.out"
4064# Check that the compiler produces executables we can run. If not, either
4065# the compiler is broken, or we cross compile.
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4067$as_echo_n "checking whether we are cross compiling... " >&6; }
4068if test "$cross_compiling" != yes; then
4069 { { ac_try="$ac_link"
4070case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073esac
4074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
4076 (eval "$ac_link") 2>&5
4077 ac_status=$?
4078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }
4080 if { ac_try='./conftest$ac_cv_exeext'
4081 { { case "(($ac_try" in
4082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083 *) ac_try_echo=$ac_try;;
4084esac
4085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4086$as_echo "$ac_try_echo"; } >&5
4087 (eval "$ac_try") 2>&5
4088 ac_status=$?
4089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4090 test $ac_status = 0; }; }; then
4091 cross_compiling=no
4092 else
4093 if test "$cross_compiling" = maybe; then
4094 cross_compiling=yes
4095 else
4096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004098as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004099If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004100See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 fi
4102 fi
4103fi
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4105$as_echo "$cross_compiling" >&6; }
4106
4107rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4108ac_clean_files=$ac_clean_files_save
4109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4110$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004111if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo_n "(cached) " >&6
4113else
4114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004115/* end confdefs.h. */
4116
4117int
4118main ()
4119{
4120
4121 ;
4122 return 0;
4123}
4124_ACEOF
4125rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004126if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004127case "(($ac_try" in
4128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4129 *) ac_try_echo=$ac_try;;
4130esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004131eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4132$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4136 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137 for ac_file in conftest.o conftest.obj conftest.*; do
4138 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4142 break;;
4143 esac
4144done
4145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004147sed 's/^/| /' conftest.$ac_ext >&5
4148
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004151as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004152See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004153fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004154rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4157$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004158OBJEXT=$ac_cv_objext
4159ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4161$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004162if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004164else
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004167
Martin v. Löwis11437992002-04-12 09:54:03 +00004168int
4169main ()
4170{
4171#ifndef __GNUC__
4172 choke me
4173#endif
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004179if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004180 ac_compiler_gnu=yes
4181else
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004185ac_cv_c_compiler_gnu=$ac_compiler_gnu
4186
4187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4189$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4190if test $ac_compiler_gnu = yes; then
4191 GCC=yes
4192else
4193 GCC=
4194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004195ac_test_CFLAGS=${CFLAGS+set}
4196ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4198$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004199if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004201else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202 ac_save_c_werror_flag=$ac_c_werror_flag
4203 ac_c_werror_flag=yes
4204 ac_cv_prog_cc_g=no
4205 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004208
Martin v. Löwis11437992002-04-12 09:54:03 +00004209int
4210main ()
4211{
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004218 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004219else
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 CFLAGS=""
4221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004222/* end confdefs.h. */
4223
4224int
4225main ()
4226{
4227
4228 ;
4229 return 0;
4230}
4231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004232if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233
Matthias Kloseb9621712010-04-24 17:59:49 +00004234else
4235 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238/* end confdefs.h. */
4239
4240int
4241main ()
4242{
4243
4244 ;
4245 return 0;
4246}
4247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004248if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_c_werror_flag=$ac_save_c_werror_flag
4257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4259$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262elif test $ac_cv_prog_cc_g = yes; then
4263 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004264 CFLAGS="-g -O2"
4265 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004266 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267 fi
4268else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004269 if test "$GCC" = yes; then
4270 CFLAGS="-O2"
4271 else
4272 CFLAGS=
4273 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4276$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004277if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004279else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004281ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004283/* end confdefs.h. */
4284#include <stdarg.h>
4285#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004286struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004287/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4288struct buf { int x; };
4289FILE * (*rcsopen) (struct buf *, struct stat *, int);
4290static char *e (p, i)
4291 char **p;
4292 int i;
4293{
4294 return p[i];
4295}
4296static char *f (char * (*g) (char **, int), char **p, ...)
4297{
4298 char *s;
4299 va_list v;
4300 va_start (v,p);
4301 s = g (p, va_arg (v,int));
4302 va_end (v);
4303 return s;
4304}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305
4306/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4307 function prototypes and stuff, but not '\xHH' hex character constants.
4308 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004310 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4311 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4316 inside strings and character constants. */
4317#define FOO(x) 'x'
4318int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4319
Skip Montanaro6dead952003-09-25 14:50:04 +00004320int test (int i, double x);
4321struct s1 {int (*f) (int a);};
4322struct s2 {int (*f) (double a);};
4323int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4324int argc;
4325char **argv;
4326int
4327main ()
4328{
4329return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4330 ;
4331 return 0;
4332}
4333_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4335 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004336do
4337 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341rm -f core conftest.err conftest.$ac_objext
4342 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004343done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004345CC=$ac_save_CC
4346
4347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348# AC_CACHE_VAL
4349case "x$ac_cv_prog_cc_c89" in
4350 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4352$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4355$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004356 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4359$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004360esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004361if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004362
Matthias Kloseb9621712010-04-24 17:59:49 +00004363fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004364
Martin v. Löwis11437992002-04-12 09:54:03 +00004365ac_ext=c
4366ac_cpp='$CPP $CPPFLAGS'
4367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004371ac_ext=c
4372ac_cpp='$CPP $CPPFLAGS'
4373ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4374ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4375ac_compiler_gnu=$ac_cv_c_compiler_gnu
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4377$as_echo_n "checking how to run the C preprocessor... " >&6; }
4378# On Suns, sometimes $CPP names a directory.
4379if test -n "$CPP" && test -d "$CPP"; then
4380 CPP=
4381fi
4382if test -z "$CPP"; then
4383 if ${ac_cv_prog_CPP+:} false; then :
4384 $as_echo_n "(cached) " >&6
4385else
4386 # Double quotes because CPP needs to be expanded
4387 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4388 do
4389 ac_preproc_ok=false
4390for ac_c_preproc_warn_flag in '' yes
4391do
4392 # Use a header file that comes with gcc, so configuring glibc
4393 # with a fresh cross-compiler works.
4394 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4395 # <limits.h> exists even on freestanding compilers.
4396 # On the NeXT, cc -E runs the code through the compiler's parser,
4397 # not just through cpp. "Syntax error" is here to catch this case.
4398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4399/* end confdefs.h. */
4400#ifdef __STDC__
4401# include <limits.h>
4402#else
4403# include <assert.h>
4404#endif
4405 Syntax error
4406_ACEOF
4407if ac_fn_c_try_cpp "$LINENO"; then :
4408
4409else
4410 # Broken: fails on valid input.
4411continue
4412fi
4413rm -f conftest.err conftest.i conftest.$ac_ext
4414
4415 # OK, works on sane cases. Now check whether nonexistent headers
4416 # can be detected and how.
4417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4418/* end confdefs.h. */
4419#include <ac_nonexistent.h>
4420_ACEOF
4421if ac_fn_c_try_cpp "$LINENO"; then :
4422 # Broken: success on invalid input.
4423continue
4424else
4425 # Passes both tests.
4426ac_preproc_ok=:
4427break
4428fi
4429rm -f conftest.err conftest.i conftest.$ac_ext
4430
4431done
4432# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4433rm -f conftest.i conftest.err conftest.$ac_ext
4434if $ac_preproc_ok; then :
4435 break
4436fi
4437
4438 done
4439 ac_cv_prog_CPP=$CPP
4440
4441fi
4442 CPP=$ac_cv_prog_CPP
4443else
4444 ac_cv_prog_CPP=$CPP
4445fi
4446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4447$as_echo "$CPP" >&6; }
4448ac_preproc_ok=false
4449for ac_c_preproc_warn_flag in '' yes
4450do
4451 # Use a header file that comes with gcc, so configuring glibc
4452 # with a fresh cross-compiler works.
4453 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4454 # <limits.h> exists even on freestanding compilers.
4455 # On the NeXT, cc -E runs the code through the compiler's parser,
4456 # not just through cpp. "Syntax error" is here to catch this case.
4457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4458/* end confdefs.h. */
4459#ifdef __STDC__
4460# include <limits.h>
4461#else
4462# include <assert.h>
4463#endif
4464 Syntax error
4465_ACEOF
4466if ac_fn_c_try_cpp "$LINENO"; then :
4467
4468else
4469 # Broken: fails on valid input.
4470continue
4471fi
4472rm -f conftest.err conftest.i conftest.$ac_ext
4473
4474 # OK, works on sane cases. Now check whether nonexistent headers
4475 # can be detected and how.
4476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4477/* end confdefs.h. */
4478#include <ac_nonexistent.h>
4479_ACEOF
4480if ac_fn_c_try_cpp "$LINENO"; then :
4481 # Broken: success on invalid input.
4482continue
4483else
4484 # Passes both tests.
4485ac_preproc_ok=:
4486break
4487fi
4488rm -f conftest.err conftest.i conftest.$ac_ext
4489
4490done
4491# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4492rm -f conftest.i conftest.err conftest.$ac_ext
4493if $ac_preproc_ok; then :
4494
4495else
4496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4498as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4499See \`config.log' for more details" "$LINENO" 5; }
4500fi
4501
4502ac_ext=c
4503ac_cpp='$CPP $CPPFLAGS'
4504ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4505ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4506ac_compiler_gnu=$ac_cv_c_compiler_gnu
4507
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4509$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4510if ${ac_cv_path_GREP+:} false; then :
4511 $as_echo_n "(cached) " >&6
4512else
4513 if test -z "$GREP"; then
4514 ac_path_GREP_found=false
4515 # Loop through the user's path and test for each of PROGNAME-LIST
4516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4518do
4519 IFS=$as_save_IFS
4520 test -z "$as_dir" && as_dir=.
4521 for ac_prog in grep ggrep; do
4522 for ac_exec_ext in '' $ac_executable_extensions; do
4523 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4524 as_fn_executable_p "$ac_path_GREP" || continue
4525# Check for GNU ac_path_GREP and select it if it is found.
4526 # Check for GNU $ac_path_GREP
4527case `"$ac_path_GREP" --version 2>&1` in
4528*GNU*)
4529 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4530*)
4531 ac_count=0
4532 $as_echo_n 0123456789 >"conftest.in"
4533 while :
4534 do
4535 cat "conftest.in" "conftest.in" >"conftest.tmp"
4536 mv "conftest.tmp" "conftest.in"
4537 cp "conftest.in" "conftest.nl"
4538 $as_echo 'GREP' >> "conftest.nl"
4539 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4540 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4541 as_fn_arith $ac_count + 1 && ac_count=$as_val
4542 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4543 # Best one so far, save it but keep looking for a better one
4544 ac_cv_path_GREP="$ac_path_GREP"
4545 ac_path_GREP_max=$ac_count
4546 fi
4547 # 10*(2^10) chars as input seems more than enough
4548 test $ac_count -gt 10 && break
4549 done
4550 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4551esac
4552
4553 $ac_path_GREP_found && break 3
4554 done
4555 done
4556 done
4557IFS=$as_save_IFS
4558 if test -z "$ac_cv_path_GREP"; then
4559 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4560 fi
4561else
4562 ac_cv_path_GREP=$GREP
4563fi
4564
4565fi
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4567$as_echo "$ac_cv_path_GREP" >&6; }
4568 GREP="$ac_cv_path_GREP"
4569
4570
Łukasz Langaa785c872016-09-09 17:37:37 -07004571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4572$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4573if ${ac_cv_path_SED+:} false; then :
4574 $as_echo_n "(cached) " >&6
4575else
4576 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4577 for ac_i in 1 2 3 4 5 6 7; do
4578 ac_script="$ac_script$as_nl$ac_script"
4579 done
4580 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4581 { ac_script=; unset ac_script;}
4582 if test -z "$SED"; then
4583 ac_path_SED_found=false
4584 # Loop through the user's path and test for each of PROGNAME-LIST
4585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4586for as_dir in $PATH
4587do
4588 IFS=$as_save_IFS
4589 test -z "$as_dir" && as_dir=.
4590 for ac_prog in sed gsed; do
4591 for ac_exec_ext in '' $ac_executable_extensions; do
4592 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4593 as_fn_executable_p "$ac_path_SED" || continue
4594# Check for GNU ac_path_SED and select it if it is found.
4595 # Check for GNU $ac_path_SED
4596case `"$ac_path_SED" --version 2>&1` in
4597*GNU*)
4598 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4599*)
4600 ac_count=0
4601 $as_echo_n 0123456789 >"conftest.in"
4602 while :
4603 do
4604 cat "conftest.in" "conftest.in" >"conftest.tmp"
4605 mv "conftest.tmp" "conftest.in"
4606 cp "conftest.in" "conftest.nl"
4607 $as_echo '' >> "conftest.nl"
4608 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4609 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4610 as_fn_arith $ac_count + 1 && ac_count=$as_val
4611 if test $ac_count -gt ${ac_path_SED_max-0}; then
4612 # Best one so far, save it but keep looking for a better one
4613 ac_cv_path_SED="$ac_path_SED"
4614 ac_path_SED_max=$ac_count
4615 fi
4616 # 10*(2^10) chars as input seems more than enough
4617 test $ac_count -gt 10 && break
4618 done
4619 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4620esac
4621
4622 $ac_path_SED_found && break 3
4623 done
4624 done
4625 done
4626IFS=$as_save_IFS
4627 if test -z "$ac_cv_path_SED"; then
4628 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4629 fi
4630else
4631 ac_cv_path_SED=$SED
4632fi
4633
4634fi
4635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4636$as_echo "$ac_cv_path_SED" >&6; }
4637 SED="$ac_cv_path_SED"
4638 rm -f conftest.sed
4639
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004640
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641
4642
Matthias Kloseb9621712010-04-24 17:59:49 +00004643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4644$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004646# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004647if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004648 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004649
4650 case $withval in
4651 no) with_cxx_main=no
4652 MAINCC='$(CC)';;
4653 yes) with_cxx_main=yes
4654 MAINCC='$(CXX)';;
4655 *) with_cxx_main=yes
4656 MAINCC=$withval
4657 if test -z "$CXX"
4658 then
4659 CXX=$withval
4660 fi;;
4661 esac
4662else
4663
4664 with_cxx_main=no
4665 MAINCC='$(CC)'
4666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004667fi
4668
Matthias Kloseb9621712010-04-24 17:59:49 +00004669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4670$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004671
4672preset_cxx="$CXX"
4673if test -z "$CXX"
4674then
4675 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004676 gcc) if test -n "$ac_tool_prefix"; then
4677 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4678set dummy ${ac_tool_prefix}g++; ac_word=$2
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680$as_echo_n "checking for $ac_word... " >&6; }
4681if ${ac_cv_path_CXX+:} false; then :
4682 $as_echo_n "(cached) " >&6
4683else
4684 case $CXX in
4685 [\\/]* | ?:[\\/]*)
4686 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4687 ;;
4688 *)
4689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690for as_dir in notfound
4691do
4692 IFS=$as_save_IFS
4693 test -z "$as_dir" && as_dir=.
4694 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004696 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4697 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698 break 2
4699 fi
4700done
4701 done
4702IFS=$as_save_IFS
4703
4704 ;;
4705esac
4706fi
4707CXX=$ac_cv_path_CXX
4708if test -n "$CXX"; then
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4710$as_echo "$CXX" >&6; }
4711else
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713$as_echo "no" >&6; }
4714fi
4715
4716
4717fi
4718if test -z "$ac_cv_path_CXX"; then
4719 ac_pt_CXX=$CXX
4720 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4723$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004724if ${ac_cv_path_ac_pt_CXX+:} false; then :
4725 $as_echo_n "(cached) " >&6
4726else
4727 case $ac_pt_CXX in
4728 [\\/]* | ?:[\\/]*)
4729 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4730 ;;
4731 *)
4732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4733for as_dir in notfound
4734do
4735 IFS=$as_save_IFS
4736 test -z "$as_dir" && as_dir=.
4737 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004739 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4741 break 2
4742 fi
4743done
4744 done
4745IFS=$as_save_IFS
4746
4747 ;;
4748esac
4749fi
4750ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4751if test -n "$ac_pt_CXX"; then
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4753$as_echo "$ac_pt_CXX" >&6; }
4754else
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4756$as_echo "no" >&6; }
4757fi
4758
4759 if test "x$ac_pt_CXX" = x; then
4760 CXX="g++"
4761 else
4762 case $cross_compiling:$ac_tool_warned in
4763yes:)
4764{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4765$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4766ac_tool_warned=yes ;;
4767esac
4768 CXX=$ac_pt_CXX
4769 fi
4770else
4771 CXX="$ac_cv_path_CXX"
4772fi
4773 ;;
4774 cc) if test -n "$ac_tool_prefix"; then
4775 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4776set dummy ${ac_tool_prefix}c++; ac_word=$2
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004779if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781else
4782 case $CXX in
4783 [\\/]* | ?:[\\/]*)
4784 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4785 ;;
4786 *)
4787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in notfound
4789do
4790 IFS=$as_save_IFS
4791 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 break 2
4797 fi
4798done
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802 ;;
4803esac
4804fi
4805CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004806if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4808$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004809else
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004813
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814
4815fi
4816if test -z "$ac_cv_path_CXX"; then
4817 ac_pt_CXX=$CXX
4818 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4821$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004823 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004827 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 ;;
4829 *)
4830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4831for as_dir in notfound
4832do
4833 IFS=$as_save_IFS
4834 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004835 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839 break 2
4840 fi
4841done
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004843IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845 ;;
4846esac
4847fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4849if test -n "$ac_pt_CXX"; then
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4851$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004852else
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4854$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004856
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004857 if test "x$ac_pt_CXX" = x; then
4858 CXX="c++"
4859 else
4860 case $cross_compiling:$ac_tool_warned in
4861yes:)
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4864ac_tool_warned=yes ;;
4865esac
4866 CXX=$ac_pt_CXX
4867 fi
4868else
4869 CXX="$ac_cv_path_CXX"
4870fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004871 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004872 clang|*/clang) if test -n "$ac_tool_prefix"; then
4873 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4874set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if ${ac_cv_path_CXX+:} false; then :
4878 $as_echo_n "(cached) " >&6
4879else
4880 case $CXX in
4881 [\\/]* | ?:[\\/]*)
4882 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4883 ;;
4884 *)
4885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in notfound
4887do
4888 IFS=$as_save_IFS
4889 test -z "$as_dir" && as_dir=.
4890 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004892 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4894 break 2
4895 fi
4896done
4897 done
4898IFS=$as_save_IFS
4899
Ned Deilycbfb9a52012-06-23 16:02:19 -07004900 ;;
4901esac
4902fi
4903CXX=$ac_cv_path_CXX
4904if test -n "$CXX"; then
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4906$as_echo "$CXX" >&6; }
4907else
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004912
4913fi
4914if test -z "$ac_cv_path_CXX"; then
4915 ac_pt_CXX=$CXX
4916 # Extract the first word of "clang++", so it can be a program name with args.
4917set dummy clang++; ac_word=$2
4918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4919$as_echo_n "checking for $ac_word... " >&6; }
4920if ${ac_cv_path_ac_pt_CXX+:} false; then :
4921 $as_echo_n "(cached) " >&6
4922else
4923 case $ac_pt_CXX in
4924 [\\/]* | ?:[\\/]*)
4925 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4926 ;;
4927 *)
4928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4929for as_dir in notfound
4930do
4931 IFS=$as_save_IFS
4932 test -z "$as_dir" && as_dir=.
4933 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004935 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4937 break 2
4938 fi
4939done
4940 done
4941IFS=$as_save_IFS
4942
4943 ;;
4944esac
4945fi
4946ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4947if test -n "$ac_pt_CXX"; then
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4949$as_echo "$ac_pt_CXX" >&6; }
4950else
4951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4952$as_echo "no" >&6; }
4953fi
4954
4955 if test "x$ac_pt_CXX" = x; then
4956 CXX="clang++"
4957 else
4958 case $cross_compiling:$ac_tool_warned in
4959yes:)
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4961$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4962ac_tool_warned=yes ;;
4963esac
4964 CXX=$ac_pt_CXX
4965 fi
4966else
4967 CXX="$ac_cv_path_CXX"
4968fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004969 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004970 icc|*/icc) if test -n "$ac_tool_prefix"; then
4971 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4972set dummy ${ac_tool_prefix}icpc; ac_word=$2
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974$as_echo_n "checking for $ac_word... " >&6; }
4975if ${ac_cv_path_CXX+:} false; then :
4976 $as_echo_n "(cached) " >&6
4977else
4978 case $CXX in
4979 [\\/]* | ?:[\\/]*)
4980 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4981 ;;
4982 *)
4983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4984for as_dir in notfound
4985do
4986 IFS=$as_save_IFS
4987 test -z "$as_dir" && as_dir=.
4988 for ac_exec_ext in '' $ac_executable_extensions; do
4989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4990 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4992 break 2
4993 fi
4994done
4995 done
4996IFS=$as_save_IFS
4997
4998 ;;
4999esac
5000fi
5001CXX=$ac_cv_path_CXX
5002if test -n "$CXX"; then
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5004$as_echo "$CXX" >&6; }
5005else
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5007$as_echo "no" >&6; }
5008fi
5009
5010
5011fi
5012if test -z "$ac_cv_path_CXX"; then
5013 ac_pt_CXX=$CXX
5014 # Extract the first word of "icpc", so it can be a program name with args.
5015set dummy icpc; ac_word=$2
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5017$as_echo_n "checking for $ac_word... " >&6; }
5018if ${ac_cv_path_ac_pt_CXX+:} false; then :
5019 $as_echo_n "(cached) " >&6
5020else
5021 case $ac_pt_CXX in
5022 [\\/]* | ?:[\\/]*)
5023 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5024 ;;
5025 *)
5026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5027for as_dir in notfound
5028do
5029 IFS=$as_save_IFS
5030 test -z "$as_dir" && as_dir=.
5031 for ac_exec_ext in '' $ac_executable_extensions; do
5032 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5033 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5035 break 2
5036 fi
5037done
5038 done
5039IFS=$as_save_IFS
5040
5041 ;;
5042esac
5043fi
5044ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5045if test -n "$ac_pt_CXX"; then
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5047$as_echo "$ac_pt_CXX" >&6; }
5048else
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5050$as_echo "no" >&6; }
5051fi
5052
5053 if test "x$ac_pt_CXX" = x; then
5054 CXX="icpc"
5055 else
5056 case $cross_compiling:$ac_tool_warned in
5057yes:)
5058{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5059$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5060ac_tool_warned=yes ;;
5061esac
5062 CXX=$ac_pt_CXX
5063 fi
5064else
5065 CXX="$ac_cv_path_CXX"
5066fi
5067 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005068 esac
5069 if test "$CXX" = "notfound"
5070 then
5071 CXX=""
5072 fi
5073fi
5074if test -z "$CXX"
5075then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005076 if test -n "$ac_tool_prefix"; then
5077 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5078 do
5079 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5080set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5082$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005083if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005085else
5086 if test -n "$CXX"; then
5087 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5088else
5089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5090for as_dir in $PATH
5091do
5092 IFS=$as_save_IFS
5093 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005096 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005098 break 2
5099 fi
5100done
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005103
5104fi
5105fi
5106CXX=$ac_cv_prog_CXX
5107if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5109$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005110else
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5112$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113fi
5114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005115
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005116 test -n "$CXX" && break
5117 done
5118fi
5119if test -z "$CXX"; then
5120 ac_ct_CXX=$CXX
5121 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5122do
5123 # Extract the first word of "$ac_prog", so it can be a program name with args.
5124set dummy $ac_prog; ac_word=$2
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
5127if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5128 $as_echo_n "(cached) " >&6
5129else
5130 if test -n "$ac_ct_CXX"; then
5131 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5132else
5133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136 IFS=$as_save_IFS
5137 test -z "$as_dir" && as_dir=.
5138 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005140 ac_cv_prog_ac_ct_CXX="$ac_prog"
5141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142 break 2
5143 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005144done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005145 done
5146IFS=$as_save_IFS
5147
5148fi
5149fi
5150ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5151if test -n "$ac_ct_CXX"; then
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5153$as_echo "$ac_ct_CXX" >&6; }
5154else
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156$as_echo "no" >&6; }
5157fi
5158
5159
5160 test -n "$ac_ct_CXX" && break
5161done
5162
5163 if test "x$ac_ct_CXX" = x; then
5164 CXX="notfound"
5165 else
5166 case $cross_compiling:$ac_tool_warned in
5167yes:)
5168{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5169$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5170ac_tool_warned=yes ;;
5171esac
5172 CXX=$ac_ct_CXX
5173 fi
5174fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005175
5176 if test "$CXX" = "notfound"
5177 then
5178 CXX=""
5179 fi
5180fi
5181if test "$preset_cxx" != "$CXX"
5182then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005183 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005184
5185 By default, distutils will build C++ extension modules with \"$CXX\".
5186 If this is not intended, then set CXX on the configure command line.
5187 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005188$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005189
5190 By default, distutils will build C++ extension modules with \"$CXX\".
5191 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005192 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193fi
5194
5195
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5197
5198
5199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5200$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5201cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005202#undef bfin
5203#undef cris
5204#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005205#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005206#undef hppa
5207#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005209#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005210#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005211#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005212#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005213#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005214 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005215#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005216# if defined(__x86_64__) && defined(__LP64__)
5217 x86_64-linux-gnu
5218# elif defined(__x86_64__) && defined(__ILP32__)
5219 x86_64-linux-gnux32
5220# elif defined(__i386__)
5221 i386-linux-gnu
5222# elif defined(__aarch64__) && defined(__AARCH64EL__)
5223# if defined(__ILP32__)
5224 aarch64_ilp32-linux-gnu
5225# else
5226 aarch64-linux-gnu
5227# endif
5228# elif defined(__aarch64__) && defined(__AARCH64EB__)
5229# if defined(__ILP32__)
5230 aarch64_be_ilp32-linux-gnu
5231# else
5232 aarch64_be-linux-gnu
5233# endif
5234# elif defined(__alpha__)
5235 alpha-linux-gnu
5236# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5237# if defined(__ARMEL__)
5238 arm-linux-gnueabihf
5239# else
5240 armeb-linux-gnueabihf
5241# endif
5242# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5243# if defined(__ARMEL__)
5244 arm-linux-gnueabi
5245# else
5246 armeb-linux-gnueabi
5247# endif
5248# elif defined(__hppa__)
5249 hppa-linux-gnu
5250# elif defined(__ia64__)
5251 ia64-linux-gnu
5252# elif defined(__m68k__) && !defined(__mcoldfire__)
5253 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005254# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5255# if _MIPS_SIM == _ABIO32
5256 mipsisa32r6el-linux-gnu
5257# elif _MIPS_SIM == _ABIN32
5258 mipsisa64r6el-linux-gnuabin32
5259# elif _MIPS_SIM == _ABI64
5260 mipsisa64r6el-linux-gnuabi64
5261# else
5262# error unknown platform triplet
5263# endif
5264# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5265# if _MIPS_SIM == _ABIO32
5266 mipsisa32r6-linux-gnu
5267# elif _MIPS_SIM == _ABIN32
5268 mipsisa64r6-linux-gnuabin32
5269# elif _MIPS_SIM == _ABI64
5270 mipsisa64r6-linux-gnuabi64
5271# else
5272# error unknown platform triplet
5273# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005274# elif defined(__mips_hard_float) && defined(_MIPSEL)
5275# if _MIPS_SIM == _ABIO32
5276 mipsel-linux-gnu
5277# elif _MIPS_SIM == _ABIN32
5278 mips64el-linux-gnuabin32
5279# elif _MIPS_SIM == _ABI64
5280 mips64el-linux-gnuabi64
5281# else
5282# error unknown platform triplet
5283# endif
5284# elif defined(__mips_hard_float)
5285# if _MIPS_SIM == _ABIO32
5286 mips-linux-gnu
5287# elif _MIPS_SIM == _ABIN32
5288 mips64-linux-gnuabin32
5289# elif _MIPS_SIM == _ABI64
5290 mips64-linux-gnuabi64
5291# else
5292# error unknown platform triplet
5293# endif
5294# elif defined(__or1k__)
5295 or1k-linux-gnu
5296# elif defined(__powerpc__) && defined(__SPE__)
5297 powerpc-linux-gnuspe
5298# elif defined(__powerpc64__)
5299# if defined(__LITTLE_ENDIAN__)
5300 powerpc64le-linux-gnu
5301# else
5302 powerpc64-linux-gnu
5303# endif
5304# elif defined(__powerpc__)
5305 powerpc-linux-gnu
5306# elif defined(__s390x__)
5307 s390x-linux-gnu
5308# elif defined(__s390__)
5309 s390-linux-gnu
5310# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5311 sh4-linux-gnu
5312# elif defined(__sparc__) && defined(__arch64__)
5313 sparc64-linux-gnu
5314# elif defined(__sparc__)
5315 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005316# elif defined(__riscv)
5317# if __riscv_xlen == 32
5318 riscv32-linux-gnu
5319# elif __riscv_xlen == 64
5320 riscv64-linux-gnu
5321# else
5322# error unknown platform triplet
5323# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005324# else
5325# error unknown platform triplet
5326# endif
5327#elif defined(__FreeBSD_kernel__)
5328# if defined(__LP64__)
5329 x86_64-kfreebsd-gnu
5330# elif defined(__i386__)
5331 i386-kfreebsd-gnu
5332# else
5333# error unknown platform triplet
5334# endif
5335#elif defined(__gnu_hurd__)
5336 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005337#elif defined(__APPLE__)
5338 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005339#elif defined(__VXWORKS__)
5340 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005341#else
5342# error unknown platform triplet
5343#endif
5344
5345EOF
5346
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005347if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005348 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5350$as_echo "$PLATFORM_TRIPLET" >&6; }
5351else
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5353$as_echo "none" >&6; }
5354fi
5355rm -f conftest.c conftest.out
5356
5357if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5358 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5359 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5360 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005361elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5362 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005363fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005364
doko@ubuntu.com55532312016-06-14 08:55:19 +02005365if test x$MULTIARCH != x; then
5366 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5367fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005368
5369
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5371$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5372save_LDFLAGS="$LDFLAGS"
5373LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005374
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5376/* end confdefs.h. */
5377
5378int
5379main ()
5380{
5381
5382 ;
5383 return 0;
5384}
5385_ACEOF
5386if ac_fn_c_try_link "$LINENO"; then :
5387 NO_AS_NEEDED="-Wl,--no-as-needed"
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5389$as_echo "yes" >&6; }
5390else
5391 NO_AS_NEEDED=""
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395rm -f core conftest.err conftest.$ac_objext \
5396 conftest$ac_exeext conftest.$ac_ext
5397LDFLAGS="$save_LDFLAGS"
5398
5399
5400
5401# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5404$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005405if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407else
5408 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5409 then ac_cv_path_EGREP="$GREP -E"
5410 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 # Loop through the user's path and test for each of PROGNAME-LIST
5414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5416do
5417 IFS=$as_save_IFS
5418 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 for ac_prog in egrep; do
5420 for ac_exec_ext in '' $ac_executable_extensions; do
5421 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005422 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005423# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 # Check for GNU $ac_path_EGREP
5425case `"$ac_path_EGREP" --version 2>&1` in
5426*GNU*)
5427 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5428*)
5429 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 while :
5432 do
5433 cat "conftest.in" "conftest.in" >"conftest.tmp"
5434 mv "conftest.tmp" "conftest.in"
5435 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5438 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005439 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005440 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5441 # Best one so far, save it but keep looking for a better one
5442 ac_cv_path_EGREP="$ac_path_EGREP"
5443 ac_path_EGREP_max=$ac_count
5444 fi
5445 # 10*(2^10) chars as input seems more than enough
5446 test $ac_count -gt 10 && break
5447 done
5448 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5449esac
5450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 $ac_path_EGREP_found && break 3
5452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005457 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459else
5460 ac_cv_path_EGREP=$EGREP
5461fi
5462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005463 fi
5464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5466$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005467 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005468
5469
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5471$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005472if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 $as_echo_n "(cached) " >&6
5474else
5475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005476/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005477#include <stdlib.h>
5478#include <stdarg.h>
5479#include <string.h>
5480#include <float.h>
5481
5482int
5483main ()
5484{
5485
5486 ;
5487 return 0;
5488}
5489_ACEOF
5490if ac_fn_c_try_compile "$LINENO"; then :
5491 ac_cv_header_stdc=yes
5492else
5493 ac_cv_header_stdc=no
5494fi
5495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5496
5497if test $ac_cv_header_stdc = yes; then
5498 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5500/* end confdefs.h. */
5501#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005502
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005503_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005505 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005507else
Matthias Kloseb9621712010-04-24 17:59:49 +00005508 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005509fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005510rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511
Matthias Kloseb9621712010-04-24 17:59:49 +00005512fi
5513
5514if test $ac_cv_header_stdc = yes; then
5515 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517/* end confdefs.h. */
5518#include <stdlib.h>
5519
5520_ACEOF
5521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5522 $EGREP "free" >/dev/null 2>&1; then :
5523
5524else
5525 ac_cv_header_stdc=no
5526fi
5527rm -f conftest*
5528
5529fi
5530
5531if test $ac_cv_header_stdc = yes; then
5532 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5533 if test "$cross_compiling" = yes; then :
5534 :
5535else
5536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5537/* end confdefs.h. */
5538#include <ctype.h>
5539#include <stdlib.h>
5540#if ((' ' & 0x0FF) == 0x020)
5541# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5542# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5543#else
5544# define ISLOWER(c) \
5545 (('a' <= (c) && (c) <= 'i') \
5546 || ('j' <= (c) && (c) <= 'r') \
5547 || ('s' <= (c) && (c) <= 'z'))
5548# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5549#endif
5550
5551#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5552int
5553main ()
5554{
5555 int i;
5556 for (i = 0; i < 256; i++)
5557 if (XOR (islower (i), ISLOWER (i))
5558 || toupper (i) != TOUPPER (i))
5559 return 2;
5560 return 0;
5561}
5562_ACEOF
5563if ac_fn_c_try_run "$LINENO"; then :
5564
5565else
5566 ac_cv_header_stdc=no
5567fi
5568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5569 conftest.$ac_objext conftest.beam conftest.$ac_ext
5570fi
5571
5572fi
5573fi
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5575$as_echo "$ac_cv_header_stdc" >&6; }
5576if test $ac_cv_header_stdc = yes; then
5577
5578$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5579
5580fi
5581
5582# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5583for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5584 inttypes.h stdint.h unistd.h
5585do :
5586 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5587ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5588"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005589if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005590 cat >>confdefs.h <<_ACEOF
5591#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5592_ACEOF
5593
5594fi
5595
5596done
5597
5598
5599
5600 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005601if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005602 MINIX=yes
5603else
5604 MINIX=
5605fi
5606
5607
5608 if test "$MINIX" = yes; then
5609
5610$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5611
5612
5613$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5614
5615
5616$as_echo "#define _MINIX 1" >>confdefs.h
5617
5618 fi
5619
5620
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5622$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005623if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005624 $as_echo_n "(cached) " >&6
5625else
5626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5627/* end confdefs.h. */
5628
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005629# define __EXTENSIONS__ 1
5630 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005631int
5632main ()
5633{
5634
5635 ;
5636 return 0;
5637}
5638_ACEOF
5639if ac_fn_c_try_compile "$LINENO"; then :
5640 ac_cv_safe_to_define___extensions__=yes
5641else
5642 ac_cv_safe_to_define___extensions__=no
5643fi
5644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5645fi
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5647$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5648 test $ac_cv_safe_to_define___extensions__ = yes &&
5649 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5650
5651 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5652
5653 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5654
5655 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5656
5657 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5658
5659
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660
Xavier de Gaye95750b12016-07-09 11:05:42 +02005661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5662$as_echo_n "checking for the Android API level... " >&6; }
5663cat >> conftest.c <<EOF
5664#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005665android_api = __ANDROID_API__
5666arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005667#else
5668#error not Android
5669#endif
5670EOF
5671
5672if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005673 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5674 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5676$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005677 if test -z "$ANDROID_API_LEVEL"; then
5678 echo 'Fatal: you must define __ANDROID_API__'
5679 exit 1
5680 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005681
5682cat >>confdefs.h <<_ACEOF
5683#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5684_ACEOF
5685
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005686
5687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5688$as_echo_n "checking for the Android arm ABI... " >&6; }
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5690$as_echo "$_arm_arch" >&6; }
5691 if test "$_arm_arch" = 7; then
5692 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5693 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5694 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005695else
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5697$as_echo "not Android" >&6; }
5698fi
5699rm -f conftest.c conftest.out
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701# Check for unsupported systems
5702case $ac_sys_system/$ac_sys_release in
5703atheos*|Linux*/1*)
5704 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5705 echo See README for details.
5706 exit 1;;
5707esac
5708
5709
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5711$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
5713# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005714if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715 withval=$with_suffix;
5716 case $withval in
5717 no) EXEEXT=;;
5718 yes) EXEEXT=.exe;;
5719 *) EXEEXT=$withval;;
5720 esac
5721fi
5722
Matthias Kloseb9621712010-04-24 17:59:49 +00005723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5724$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
5726# Test whether we're running on a non-case-sensitive system, in which
5727# case we give a warning if no ext is given
5728
Matthias Kloseb9621712010-04-24 17:59:49 +00005729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5730$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731if test ! -d CaseSensitiveTestDir; then
5732mkdir CaseSensitiveTestDir
5733fi
5734
5735if test -d casesensitivetestdir
5736then
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5738$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739 BUILDEXEEXT=.exe
5740else
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5742$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 BUILDEXEEXT=$EXEEXT
5744fi
5745rmdir CaseSensitiveTestDir
5746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747case $ac_sys_system in
5748hp*|HP*)
5749 case $CC in
5750 cc|*/cc) CC="$CC -Ae";;
5751 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752esac
5753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
Matthias Kloseb9621712010-04-24 17:59:49 +00005755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5756$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757if test -z "$LIBRARY"
5758then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005759 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5762$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763
5764# LDLIBRARY is the name of the library to link against (as opposed to the
5765# name of the library into which to insert object files). BLDLIBRARY is also
5766# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5767# is blank as the main program is not linked directly against LDLIBRARY.
5768# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5769# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5770# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5771# DLLLIBRARY is the shared (i.e., DLL) library.
5772#
5773# RUNSHARED is used to run shared python without installed libraries
5774#
5775# INSTSONAME is the name of the shared library that will be use to install
5776# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005777#
5778# LDVERSION is the shared library version number, normally the Python version
5779# with the ABI build flags appended.
5780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782
5783
5784
5785
5786
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788LDLIBRARY="$LIBRARY"
5789BLDLIBRARY='$(LDLIBRARY)'
5790INSTSONAME='$(LDLIBRARY)'
5791DLLLIBRARY=''
5792LDLIBRARYDIR=''
5793RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005794LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795
5796# LINKCC is the command that links the python executable -- default is $(CC).
5797# If CXX is set, and if it is needed to link a main function that was
5798# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5799# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5802$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803if test -z "$LINKCC"
5804then
5805 LINKCC='$(PURIFY) $(MAINCC)'
5806 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 QNX*)
5808 # qcc must be used because the other compilers do not
5809 # support -N.
5810 LINKCC=qcc;;
5811 esac
5812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5814$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815
Miss Islington (bot)88b86a92020-08-29 09:36:40 -07005816# EXPORTSYMS holds the list of exported symbols for AIX.
5817# EXPORTSFROM holds the module name exporting symbols on AIX.
5818EXPORTSYMS=
5819EXPORTSFROM=
5820
5821
5822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5823$as_echo_n "checking EXPORTSYMS... " >&6; }
5824case $ac_sys_system in
5825AIX*)
5826 EXPORTSYMS="Modules/python.exp"
5827 if test $ac_sys_release -ge 5 -o \
5828 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5829 EXPORTSFROM=. # the main executable
5830 fi
5831 ;;
5832esac
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5834$as_echo "$EXPORTSYMS" >&6; }
5835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5837# make sure we default having it set to "no": this is used by
5838# distutils.unixccompiler to know if it should add --enable-new-dtags
5839# to linker command lines, and failing to detect GNU ld simply results
5840# in the same bahaviour as before.
5841
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5843$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844ac_prog=ld
5845if test "$GCC" = yes; then
5846 ac_prog=`$CC -print-prog-name=ld`
5847fi
5848case `"$ac_prog" -V 2>&1 < /dev/null` in
5849 *GNU*)
5850 GNULD=yes;;
5851 *)
5852 GNULD=no;;
5853esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5855$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5858$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005860if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861 enableval=$enable_shared;
5862fi
5863
5864
5865if test -z "$enable_shared"
5866then
5867 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005868 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869 enable_shared="yes";;
5870 *)
5871 enable_shared="no";;
5872 esac
5873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5875$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876
Matthias Kloseb9621712010-04-24 17:59:49 +00005877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5878$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005880if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881 enableval=$enable_profiling;
5882fi
5883
5884if test "x$enable_profiling" = xyes; then
5885 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005886 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888/* end confdefs.h. */
5889int main() { return 0; }
5890_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005891if ac_fn_c_try_link "$LINENO"; then :
5892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005894 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005896rm -f core conftest.err conftest.$ac_objext \
5897 conftest$ac_exeext conftest.$ac_ext
5898 CC="$ac_save_cc"
5899else
5900 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5903$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904
doko@ubuntu.comba015832012-06-30 16:52:05 +02005905if test "x$enable_profiling" = xyes; then
5906 BASECFLAGS="-pg $BASECFLAGS"
5907 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908fi
5909
Matthias Kloseb9621712010-04-24 17:59:49 +00005910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5911$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912
5913# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5914# library that we build, but we do not want to link against it (we
5915# will find it with a -framework option). For this reason there is an
5916# extra variable BLDLIBRARY against which Python and the extension
5917# modules are linked, BLDLIBRARY. This is normally the same as
5918# LDLIBRARY, but empty for MacOSX framework builds.
5919if test "$enable_framework"
5920then
5921 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 BLDLIBRARY=''
5924else
5925 BLDLIBRARY='$(LDLIBRARY)'
5926fi
5927
5928# Other platforms follow
5929if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005930 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931
Matthias Kloseb9621712010-04-24 17:59:49 +00005932$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
5934 case $ac_sys_system in
5935 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).dll.a'
5937 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
5939 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).so'
5941 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005942 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005944 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005945 then
5946 PY3LIBRARY=libpython3.so
5947 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005949 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).so'
5951 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005952 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005954 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005955 then
5956 PY3LIBRARY=libpython3.so
5957 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 ;;
5959 hp*|HP*)
5960 case `uname -m` in
5961 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ;;
5964 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005965 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
5967 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005969 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 LDLIBRARY='libpython$(LDVERSION).dylib'
5973 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005974 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005976 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005977 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005978 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005979 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980
5981 esac
5982else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005983 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 case $ac_sys_system in
5985 CYGWIN*)
5986 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005987 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 ;;
5989 esac
5990fi
5991
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005992if test "$cross_compiling" = yes; then
5993 RUNSHARED=
5994fi
5995
Matthias Kloseb9621712010-04-24 17:59:49 +00005996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5997$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006000if test -n "$ac_tool_prefix"; then
6001 for ac_prog in ar aal
6002 do
6003 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6004set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6006$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006007if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009else
6010 if test -n "$AR"; then
6011 ac_cv_prog_AR="$AR" # Let the user override the test.
6012else
6013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014for as_dir in $PATH
6015do
6016 IFS=$as_save_IFS
6017 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006020 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022 break 2
6023 fi
6024done
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026IFS=$as_save_IFS
6027
6028fi
6029fi
6030AR=$ac_cv_prog_AR
6031if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6033$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034else
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6036$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037fi
6038
6039
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006040 test -n "$AR" && break
6041 done
6042fi
6043if test -z "$AR"; then
6044 ac_ct_AR=$AR
6045 for ac_prog in ar aal
6046do
6047 # Extract the first word of "$ac_prog", so it can be a program name with args.
6048set dummy $ac_prog; ac_word=$2
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6050$as_echo_n "checking for $ac_word... " >&6; }
6051if ${ac_cv_prog_ac_ct_AR+:} false; then :
6052 $as_echo_n "(cached) " >&6
6053else
6054 if test -n "$ac_ct_AR"; then
6055 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6056else
6057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060 IFS=$as_save_IFS
6061 test -z "$as_dir" && as_dir=.
6062 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006064 ac_cv_prog_ac_ct_AR="$ac_prog"
6065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6066 break 2
6067 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006069 done
6070IFS=$as_save_IFS
6071
6072fi
6073fi
6074ac_ct_AR=$ac_cv_prog_ac_ct_AR
6075if test -n "$ac_ct_AR"; then
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6077$as_echo "$ac_ct_AR" >&6; }
6078else
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
6081fi
6082
6083
6084 test -n "$ac_ct_AR" && break
6085done
6086
6087 if test "x$ac_ct_AR" = x; then
6088 AR="ar"
6089 else
6090 case $cross_compiling:$ac_tool_warned in
6091yes:)
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6093$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6094ac_tool_warned=yes ;;
6095esac
6096 AR=$ac_ct_AR
6097 fi
6098fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099
6100
6101# tweak ARFLAGS only if the user didn't set it on the command line
6102
6103if test -z "$ARFLAGS"
6104then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006105 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106fi
6107
doko@ubuntu.com58844492012-06-30 18:25:32 +02006108if test -n "$ac_tool_prefix"; then
6109 for ac_prog in readelf
6110 do
6111 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6112set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6114$as_echo_n "checking for $ac_word... " >&6; }
6115if ${ac_cv_prog_READELF+:} false; then :
6116 $as_echo_n "(cached) " >&6
6117else
6118 if test -n "$READELF"; then
6119 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6120else
6121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6122for as_dir in $PATH
6123do
6124 IFS=$as_save_IFS
6125 test -z "$as_dir" && as_dir=.
6126 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006127 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006128 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6130 break 2
6131 fi
6132done
6133 done
6134IFS=$as_save_IFS
6135
6136fi
6137fi
6138READELF=$ac_cv_prog_READELF
6139if test -n "$READELF"; then
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6141$as_echo "$READELF" >&6; }
6142else
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6144$as_echo "no" >&6; }
6145fi
6146
6147
6148 test -n "$READELF" && break
6149 done
6150fi
6151if test -z "$READELF"; then
6152 ac_ct_READELF=$READELF
6153 for ac_prog in readelf
6154do
6155 # Extract the first word of "$ac_prog", so it can be a program name with args.
6156set dummy $ac_prog; ac_word=$2
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6158$as_echo_n "checking for $ac_word... " >&6; }
6159if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6160 $as_echo_n "(cached) " >&6
6161else
6162 if test -n "$ac_ct_READELF"; then
6163 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6164else
6165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH
6167do
6168 IFS=$as_save_IFS
6169 test -z "$as_dir" && as_dir=.
6170 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006172 ac_cv_prog_ac_ct_READELF="$ac_prog"
6173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6174 break 2
6175 fi
6176done
6177 done
6178IFS=$as_save_IFS
6179
6180fi
6181fi
6182ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6183if test -n "$ac_ct_READELF"; then
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6185$as_echo "$ac_ct_READELF" >&6; }
6186else
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6188$as_echo "no" >&6; }
6189fi
6190
6191
6192 test -n "$ac_ct_READELF" && break
6193done
6194
6195 if test "x$ac_ct_READELF" = x; then
6196 READELF=":"
6197 else
6198 case $cross_compiling:$ac_tool_warned in
6199yes:)
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6201$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6202ac_tool_warned=yes ;;
6203esac
6204 READELF=$ac_ct_READELF
6205 fi
6206fi
6207
6208if test "$cross_compiling" = yes; then
6209 case "$READELF" in
6210 readelf|:)
6211 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6212 ;;
6213 esac
6214fi
6215
6216
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006219hp*|HP*)
6220 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221 if test -z "$INSTALL"
6222 then
6223 INSTALL="${srcdir}/install-sh -c"
6224 fi
6225esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226# Find a good install program. We prefer a C program (faster),
6227# so one script is as good as another. But avoid the broken or
6228# incompatible versions:
6229# SysV /etc/install, /usr/sbin/install
6230# SunOS /usr/etc/install
6231# IRIX /sbin/install
6232# AIX /bin/install
6233# AmigaOS /C/install, which installs bootblocks on floppy discs
6234# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6235# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6236# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6237# OS/2's system install, which has a completely different semantic
6238# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006239# Reject install programs that cannot install multiple files.
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6241$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006243if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006244 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245else
6246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247for as_dir in $PATH
6248do
6249 IFS=$as_save_IFS
6250 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006251 # Account for people who put trailing slashes in PATH elements.
6252case $as_dir/ in #((
6253 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006254 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006255 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256 /usr/ucb/* ) ;;
6257 *)
6258 # OSF1 and SCO ODT 3.0 have their own names for install.
6259 # Don't use installbsd from OSF since it installs stuff as root
6260 # by default.
6261 for ac_prog in ginstall scoinst install; do
6262 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006263 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264 if test $ac_prog = install &&
6265 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6266 # AIX install. It has an incompatible calling convention.
6267 :
6268 elif test $ac_prog = install &&
6269 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6270 # program-specific install script used by HP pwplus--don't use.
6271 :
6272 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006273 rm -rf conftest.one conftest.two conftest.dir
6274 echo one > conftest.one
6275 echo two > conftest.two
6276 mkdir conftest.dir
6277 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6278 test -s conftest.one && test -s conftest.two &&
6279 test -s conftest.dir/conftest.one &&
6280 test -s conftest.dir/conftest.two
6281 then
6282 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6283 break 3
6284 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285 fi
6286 fi
6287 done
6288 done
6289 ;;
6290esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006291
6292 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293IFS=$as_save_IFS
6294
Matthias Kloseb9621712010-04-24 17:59:49 +00006295rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296
6297fi
6298 if test "${ac_cv_path_install+set}" = set; then
6299 INSTALL=$ac_cv_path_install
6300 else
6301 # As a last resort, use the slow shell script. Don't cache a
6302 # value for INSTALL within a source directory, because that will
6303 # break other packages using the cache if that directory is
6304 # removed, or if the value is a relative name.
6305 INSTALL=$ac_install_sh
6306 fi
6307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6309$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310
6311# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6312# It thinks the first close brace ends the variable substitution.
6313test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6314
6315test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6316
6317test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6318
Matthias Klose93a0ef12012-03-15 18:08:34 +01006319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6320$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6321if test -z "$MKDIR_P"; then
6322 if ${ac_cv_path_mkdir+:} false; then :
6323 $as_echo_n "(cached) " >&6
6324else
6325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6327do
6328 IFS=$as_save_IFS
6329 test -z "$as_dir" && as_dir=.
6330 for ac_prog in mkdir gmkdir; do
6331 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006332 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006333 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6334 'mkdir (GNU coreutils) '* | \
6335 'mkdir (coreutils) '* | \
6336 'mkdir (fileutils) '4.1*)
6337 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6338 break 3;;
6339 esac
6340 done
6341 done
6342 done
6343IFS=$as_save_IFS
6344
6345fi
6346
6347 test -d ./--version && rmdir ./--version
6348 if test "${ac_cv_path_mkdir+set}" = set; then
6349 MKDIR_P="$ac_cv_path_mkdir -p"
6350 else
6351 # As a last resort, use the slow shell script. Don't cache a
6352 # value for MKDIR_P within a source directory, because that will
6353 # break other packages using the cache if that directory is
6354 # removed, or if the value is a relative name.
6355 MKDIR_P="$ac_install_sh -d"
6356 fi
6357fi
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6359$as_echo "$MKDIR_P" >&6; }
6360
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361
6362# Not every filesystem supports hard links
6363
6364if test -z "$LN" ; then
6365 case $ac_sys_system in
6366 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367 *) LN=ln;;
6368 esac
6369fi
6370
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006371# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006372
6373ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006374
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6377$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378
6379# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006380if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381 withval=$with_pydebug;
6382if test "$withval" != no
6383then
6384
Matthias Kloseb9621712010-04-24 17:59:49 +00006385$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
Matthias Kloseb9621712010-04-24 17:59:49 +00006387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6388$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006389 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006390 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006391else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393fi
6394else
Matthias Kloseb9621712010-04-24 17:59:49 +00006395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006397fi
6398
6399
Victor Stinnerf4e47032019-04-25 00:56:28 +02006400# Check for --with-trace-refs
6401# --with-trace-refs
6402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6403$as_echo_n "checking for --with-trace-refs... " >&6; }
6404
6405# Check whether --with-trace-refs was given.
6406if test "${with_trace_refs+set}" = set; then :
6407 withval=$with_trace_refs;
6408else
6409 with_trace_refs=no
6410fi
6411
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6413$as_echo "$with_trace_refs" >&6; }
6414
6415if test "$with_trace_refs" = "yes"
6416then
6417
6418$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6419
6420fi
6421
6422# Check for --with-assertions.
6423# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006424assertions='false'
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6426$as_echo_n "checking for --with-assertions... " >&6; }
6427
6428# Check whether --with-assertions was given.
6429if test "${with_assertions+set}" = set; then :
6430 withval=$with_assertions;
6431if test "$withval" != no
6432then
6433 assertions='true'
6434fi
6435fi
6436
6437if test "$assertions" = 'true'; then
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6439$as_echo "yes" >&6; }
6440elif test "$Py_DEBUG" = 'true'; then
6441 assertions='true'
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6443$as_echo "implied by --with-pydebug" >&6; }
6444else
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6446$as_echo "no" >&6; }
6447fi
6448
Brett Cannon63d98bc2016-09-06 17:12:40 -07006449# Enable optimization flags
6450
6451
6452Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6454$as_echo_n "checking for --enable-optimizations... " >&6; }
6455# Check whether --enable-optimizations was given.
6456if test "${enable_optimizations+set}" = set; then :
6457 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006458if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006459then
6460 Py_OPT='true'
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6462$as_echo "yes" >&6; };
6463else
6464 Py_OPT='false'
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; };
6467fi
6468else
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; }
6471fi
6472
6473if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006474 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6475 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006476 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006477 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006478 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006479 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006480 DEF_MAKE_RULE="build_all"
6481else
6482 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006484 DEF_MAKE_RULE="all"
6485fi
6486
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006487
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6489$as_echo_n "checking PROFILE_TASK... " >&6; }
6490if test -z "$PROFILE_TASK"
6491then
6492 PROFILE_TASK='-m test --pgo'
6493fi
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6495$as_echo "$PROFILE_TASK" >&6; }
6496
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006497# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6498# normal names in the default $PATH (ie: Ubuntu). They exist under the
6499# non-suffixed name in their versioned llvm directory.
6500
6501llvm_bin_dir=''
6502llvm_path="${PATH}"
6503if test "${CC}" = "clang"
6504then
6505 clang_bin=`which clang`
6506 # Some systems install clang elsewhere as a symlink to the real path
6507 # which is where the related llvm tools are located.
6508 if test -L "${clang_bin}"
6509 then
6510 clang_dir=`dirname "${clang_bin}"`
6511 clang_bin=`readlink "${clang_bin}"`
6512 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6513 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6514 fi
6515fi
6516
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006517# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6519$as_echo_n "checking for --with-lto... " >&6; }
6520
6521# Check whether --with-lto was given.
6522if test "${with_lto+set}" = set; then :
6523 withval=$with_lto;
6524if test "$withval" != no
6525then
6526 Py_LTO='true'
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6528$as_echo "yes" >&6; };
6529else
6530 Py_LTO='false'
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6532$as_echo "no" >&6; };
6533fi
6534else
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539if test "$Py_LTO" = 'true' ; then
6540 case $CC in
6541 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006542
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006543 if test -n "$ac_tool_prefix"; then
6544 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6545set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6547$as_echo_n "checking for $ac_word... " >&6; }
6548if ${ac_cv_path_LLVM_AR+:} false; then :
6549 $as_echo_n "(cached) " >&6
6550else
6551 case $LLVM_AR in
6552 [\\/]* | ?:[\\/]*)
6553 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6554 ;;
6555 *)
6556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6557for as_dir in ${llvm_path}
6558do
6559 IFS=$as_save_IFS
6560 test -z "$as_dir" && as_dir=.
6561 for ac_exec_ext in '' $ac_executable_extensions; do
6562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6563 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6565 break 2
6566 fi
6567done
6568 done
6569IFS=$as_save_IFS
6570
6571 ;;
6572esac
6573fi
6574LLVM_AR=$ac_cv_path_LLVM_AR
6575if test -n "$LLVM_AR"; then
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6577$as_echo "$LLVM_AR" >&6; }
6578else
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6580$as_echo "no" >&6; }
6581fi
6582
6583
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006584fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006585if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006586 ac_pt_LLVM_AR=$LLVM_AR
6587 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006588set dummy llvm-ar; ac_word=$2
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590$as_echo_n "checking for $ac_word... " >&6; }
6591if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6592 $as_echo_n "(cached) " >&6
6593else
6594 case $ac_pt_LLVM_AR in
6595 [\\/]* | ?:[\\/]*)
6596 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6597 ;;
6598 *)
6599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6600for as_dir in ${llvm_path}
6601do
6602 IFS=$as_save_IFS
6603 test -z "$as_dir" && as_dir=.
6604 for ac_exec_ext in '' $ac_executable_extensions; do
6605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6606 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6608 break 2
6609 fi
6610done
6611 done
6612IFS=$as_save_IFS
6613
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006614 ;;
6615esac
6616fi
6617ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6618if test -n "$ac_pt_LLVM_AR"; then
6619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6620$as_echo "$ac_pt_LLVM_AR" >&6; }
6621else
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623$as_echo "no" >&6; }
6624fi
6625
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006626 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006627 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006628 else
6629 case $cross_compiling:$ac_tool_warned in
6630yes:)
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6632$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6633ac_tool_warned=yes ;;
6634esac
6635 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006636 fi
6637else
6638 LLVM_AR="$ac_cv_path_LLVM_AR"
6639fi
6640
6641
6642 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6643 then
6644 LLVM_AR_FOUND="found"
6645 else
6646 LLVM_AR_FOUND="not-found"
6647 fi
6648 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6649 then
6650 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6651 if test -n "${found_llvm_ar}"
6652 then
6653 LLVM_AR='/usr/bin/xcrun llvm-ar'
6654 LLVM_AR_FOUND=found
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6656$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6657 fi
6658 fi
6659 if test $LLVM_AR_FOUND = not-found
6660 then
6661 LLVM_PROFR_ERR=yes
6662 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6663 else
6664 LLVM_AR_ERR=no
6665 fi
6666 AR="${LLVM_AR}"
6667 case $ac_sys_system in
6668 Darwin*)
6669 # Any changes made here should be reflected in the GCC+Darwin case below
6670 LTOFLAGS="-flto -Wl,-export_dynamic"
6671 ;;
6672 *)
6673 LTOFLAGS="-flto"
6674 ;;
6675 esac
6676 ;;
6677 *gcc*)
6678 case $ac_sys_system in
6679 Darwin*)
6680 LTOFLAGS="-flto -Wl,-export_dynamic"
6681 ;;
6682 *)
6683 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6684 ;;
6685 esac
6686 ;;
6687 esac
6688
6689 if test "$ac_cv_prog_cc_g" = "yes"
6690 then
6691 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6692 # to get debug symbols.
6693 LTOFLAGS="$LTOFLAGS -g"
6694 fi
6695
stratakisf92c7aa2018-12-04 15:54:01 +01006696 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006697 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006698fi
6699
6700# Enable PGO flags.
6701
6702
6703
6704
6705
6706
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006707if test -n "$ac_tool_prefix"; then
6708 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6709set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711$as_echo_n "checking for $ac_word... " >&6; }
6712if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6713 $as_echo_n "(cached) " >&6
6714else
6715 case $LLVM_PROFDATA in
6716 [\\/]* | ?:[\\/]*)
6717 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6718 ;;
6719 *)
6720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6721for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006722do
6723 IFS=$as_save_IFS
6724 test -z "$as_dir" && as_dir=.
6725 for ac_exec_ext in '' $ac_executable_extensions; do
6726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006727 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6729 break 2
6730 fi
6731done
6732 done
6733IFS=$as_save_IFS
6734
Gregory P. Smith799520c2016-09-07 16:10:00 -07006735 ;;
6736esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006737fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006738LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6739if test -n "$LLVM_PROFDATA"; then
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6741$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006742else
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744$as_echo "no" >&6; }
6745fi
6746
6747
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006748fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006749if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006750 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6751 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006752set dummy llvm-profdata; ac_word=$2
6753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6754$as_echo_n "checking for $ac_word... " >&6; }
6755if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6756 $as_echo_n "(cached) " >&6
6757else
6758 case $ac_pt_LLVM_PROFDATA in
6759 [\\/]* | ?:[\\/]*)
6760 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6761 ;;
6762 *)
6763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6764for as_dir in ${llvm_path}
6765do
6766 IFS=$as_save_IFS
6767 test -z "$as_dir" && as_dir=.
6768 for ac_exec_ext in '' $ac_executable_extensions; do
6769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6770 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6772 break 2
6773 fi
6774done
6775 done
6776IFS=$as_save_IFS
6777
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 ;;
6779esac
6780fi
6781ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6782if test -n "$ac_pt_LLVM_PROFDATA"; then
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6784$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6785else
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6787$as_echo "no" >&6; }
6788fi
6789
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006790 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006791 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006792 else
6793 case $cross_compiling:$ac_tool_warned in
6794yes:)
6795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6797ac_tool_warned=yes ;;
6798esac
6799 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800 fi
6801else
6802 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6803fi
6804
6805
6806if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6807then
6808 LLVM_PROF_FOUND="found"
6809else
6810 LLVM_PROF_FOUND="not-found"
6811fi
6812if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6813then
6814 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6815 if test -n "${found_llvm_profdata}"
6816 then
6817 # llvm-profdata isn't directly in $PATH in some cases.
6818 # https://apple.stackexchange.com/questions/197053/
6819 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6820 LLVM_PROF_FOUND=found
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6822$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6823 fi
6824fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825LLVM_PROF_ERR=no
6826case $CC in
6827 *clang*)
6828 # Any changes made here should be reflected in the GCC+Darwin case below
6829 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6830 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006831 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006832 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6833 if test $LLVM_PROF_FOUND = not-found
6834 then
6835 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006836 if test "${REQUIRE_PGO}" = "yes"
6837 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006838 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006839 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006840 fi
6841 ;;
6842 *gcc*)
6843 case $ac_sys_system in
6844 Darwin*)
6845 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6846 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006847 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006848 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006849 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006850 then
6851 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006852 if test "${REQUIRE_PGO}" = "yes"
6853 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006854 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006855 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006856 fi
6857 ;;
6858 *)
6859 PGO_PROF_GEN_FLAG="-fprofile-generate"
6860 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6861 LLVM_PROF_MERGER="true"
6862 LLVM_PROF_FILE=""
6863 ;;
6864 esac
6865 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006866 *icc*)
6867 PGO_PROF_GEN_FLAG="-prof-gen"
6868 PGO_PROF_USE_FLAG="-prof-use"
6869 LLVM_PROF_MERGER="true"
6870 LLVM_PROF_FILE=""
6871 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006872esac
6873
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6875# merged with this chunk of code?
6876
6877# Optimizer/debugger flags
6878# ------------------------
6879# (The following bit of code is complicated enough - please keep things
6880# indented properly. Just pretend you're editing Python code. ;-)
6881
6882# There are two parallel sets of case statements below, one that checks to
6883# see if OPT was set and one that does BASECFLAGS setting based upon
6884# compiler and platform. BASECFLAGS tweaks need to be made even if the
6885# user set OPT.
6886
Victor Stinner23a683a2019-04-12 21:27:37 +02006887case $CC in
6888 *clang*)
6889 cc_is_clang=1
6890 ;;
6891 *)
6892 if $CC --version 2>&1 | grep -q clang
6893 then
6894 cc_is_clang=1
6895 else
6896 cc_is_clang=
6897 fi
6898esac
6899
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900# tweak OPT based on compiler and platform, only if the user didn't set
6901# it on the command line
6902
Victor Stinner9ed34a82017-05-02 22:35:58 +02006903
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006904if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905then
6906 case $GCC in
6907 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6909 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6910 WRAP="-fwrapv"
6911 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006912
Victor Stinner35f3d242017-04-21 12:35:24 +02006913 if test -n "${cc_is_clang}"
6914 then
6915 # Clang also needs -fwrapv
6916 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006917 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6918 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006919 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006920 fi
6921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922 case $ac_cv_prog_cc_g in
6923 yes)
6924 if test "$Py_DEBUG" = 'true' ; then
6925 # Optimization messes up debuggers, so turn it off for
6926 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006927 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006928 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006929 else
Victor Stinner28205b22017-04-21 11:24:34 +02006930 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932 else
Victor Stinner28205b22017-04-21 11:24:34 +02006933 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934 fi
6935 ;;
6936 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006937 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938 ;;
6939 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006940
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006941 case $ac_sys_system in
6942 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6943 ;;
6944 esac
6945 ;;
6946
6947 *)
6948 OPT="-O"
6949 ;;
6950 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951fi
6952
6953
6954
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006955
stratakiscf10a752018-12-19 18:19:01 +01006956
Ronald Oussorene8b1c032020-11-22 11:18:40 +01006957# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006958UNIVERSAL_ARCH_FLAGS=
6959
6960
6961# tweak BASECFLAGS based on compiler and platform
6962case $GCC in
6963yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006964 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006965
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6967$as_echo_n "checking for -Wextra... " >&6; }
6968 ac_save_cc="$CC"
6969 CC="$CC -Wextra -Werror"
6970 if ${ac_cv_extra_warnings+:} false; then :
6971 $as_echo_n "(cached) " >&6
6972else
6973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6974/* end confdefs.h. */
6975
6976
6977int
6978main ()
6979{
6980
6981 ;
6982 return 0;
6983}
6984
6985_ACEOF
6986if ac_fn_c_try_compile "$LINENO"; then :
6987
6988 ac_cv_extra_warnings=yes
6989
6990else
6991
6992 ac_cv_extra_warnings=no
6993
6994fi
6995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6996fi
6997
6998 CC="$ac_save_cc"
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7000$as_echo "$ac_cv_extra_warnings" >&6; }
7001
7002 if test $ac_cv_extra_warnings = yes
7003 then
7004 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7005 fi
7006
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007007 # Python doesn't violate C99 aliasing rules, but older versions of
7008 # GCC produce warnings for legal Python code. Enable
7009 # -fno-strict-aliasing on versions of GCC that support but produce
7010 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7012$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007013 ac_save_cc="$CC"
7014 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007016 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007018else
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007020/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007021
Matthias Kloseb159a552010-04-25 21:00:44 +00007022
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007023int
7024main ()
7025{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007026
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007027 ;
7028 return 0;
7029}
Matthias Kloseb159a552010-04-25 21:00:44 +00007030
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007032if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007033
7034 CC="$ac_save_cc -fstrict-aliasing"
7035 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007037/* end confdefs.h. */
7038
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007039 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007040int
7041main ()
7042{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007043double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007044 ;
7045 return 0;
7046}
Matthias Kloseb159a552010-04-25 21:00:44 +00007047
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007049if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007050
7051 ac_cv_no_strict_aliasing=no
7052
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007053else
Matthias Kloseb159a552010-04-25 21:00:44 +00007054
7055 ac_cv_no_strict_aliasing=yes
7056
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007057fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007059
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007060else
Matthias Kloseb159a552010-04-25 21:00:44 +00007061
7062 ac_cv_no_strict_aliasing=no
7063
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007064fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007066fi
7067
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007068 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007069 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7071$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007072 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007073 then
7074 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7075 fi
7076
Zachary Ware5af85642015-12-21 12:09:17 -06007077 # ICC doesn't recognize the option, but only emits a warning
7078 ## XXX does it emit an unused result warning and can it be disabled?
7079 case "$CC" in
7080 *icc*)
7081 ac_cv_disable_unused_result_warning=no
7082 ;;
7083 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7085$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7086 ac_save_cc="$CC"
7087 CC="$CC -Wunused-result -Werror"
7088 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007089 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007090 $as_echo_n "(cached) " >&6
7091else
7092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7093/* end confdefs.h. */
7094
7095
7096int
7097main ()
7098{
7099
7100 ;
7101 return 0;
7102}
7103
7104_ACEOF
7105if ac_fn_c_try_compile "$LINENO"; then :
7106
7107 ac_cv_disable_unused_result_warning=yes
7108
7109else
7110
7111 ac_cv_disable_unused_result_warning=no
7112
7113fi
7114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7115fi
7116
7117 CFLAGS="$save_CFLAGS"
7118 CC="$ac_save_cc"
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7120$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007121 ;;
7122 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007123
7124 if test $ac_cv_disable_unused_result_warning = yes
7125 then
7126 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007127 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7128 fi
7129
7130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7131$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7132 ac_save_cc="$CC"
7133 CC="$CC -Wunused-parameter -Werror"
7134 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7135 $as_echo_n "(cached) " >&6
7136else
7137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7138/* end confdefs.h. */
7139
7140
7141int
7142main ()
7143{
7144
7145 ;
7146 return 0;
7147}
7148
7149_ACEOF
7150if ac_fn_c_try_compile "$LINENO"; then :
7151
7152 ac_cv_disable_unused_parameter_warning=yes
7153
7154else
7155
7156 ac_cv_disable_unused_parameter_warning=no
7157
7158fi
7159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7160fi
7161
7162 CC="$ac_save_cc"
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7164$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7165
7166 if test $ac_cv_disable_unused_parameter_warning = yes
7167 then
7168 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7169 fi
7170
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7172$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7173 ac_save_cc="$CC"
7174 CC="$CC -Wmissing-field-initializers -Werror"
7175 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7176 $as_echo_n "(cached) " >&6
7177else
7178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7179/* end confdefs.h. */
7180
7181
7182int
7183main ()
7184{
7185
7186 ;
7187 return 0;
7188}
7189
7190_ACEOF
7191if ac_fn_c_try_compile "$LINENO"; then :
7192
7193 ac_cv_disable_missing_field_initializers=yes
7194
7195else
7196
7197 ac_cv_disable_missing_field_initializers=no
7198
7199fi
7200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7201fi
7202
7203 CC="$ac_save_cc"
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7205$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7206
7207 if test $ac_cv_disable_missing_field_initializers = yes
7208 then
7209 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007210 fi
7211
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7213$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7214 ac_save_cc="$CC"
7215 CC="$CC -Wsign-compare"
7216 save_CFLAGS="$CFLAGS"
7217 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7218 $as_echo_n "(cached) " >&6
7219else
7220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7221/* end confdefs.h. */
7222
7223
7224int
7225main ()
7226{
7227
7228 ;
7229 return 0;
7230}
7231
7232_ACEOF
7233if ac_fn_c_try_compile "$LINENO"; then :
7234
7235 ac_cv_enable_sign_compare_warning=yes
7236
7237else
7238
7239 ac_cv_enable_sign_compare_warning=no
7240
7241fi
7242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7243fi
7244
7245 CFLAGS="$save_CFLAGS"
7246 CC="$ac_save_cc"
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7248$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7249
7250 if test $ac_cv_enable_sign_compare_warning = yes
7251 then
7252 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7253 fi
7254
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7256$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7257 ac_save_cc="$CC"
7258 CC="$CC -Wunreachable-code"
7259 save_CFLAGS="$CFLAGS"
7260 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7261 $as_echo_n "(cached) " >&6
7262else
7263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7264/* end confdefs.h. */
7265
7266
7267int
7268main ()
7269{
7270
7271 ;
7272 return 0;
7273}
7274
7275_ACEOF
7276if ac_fn_c_try_compile "$LINENO"; then :
7277
7278 ac_cv_enable_unreachable_code_warning=yes
7279
7280else
7281
7282 ac_cv_enable_unreachable_code_warning=no
7283
7284fi
7285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7286fi
7287
7288 CFLAGS="$save_CFLAGS"
7289 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007290
7291 # Don't enable unreachable code warning in debug mode, since it usually
7292 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007293 # Issue #24324: Unfortunately, the unreachable code warning does not work
7294 # correctly on gcc and has been silently removed from the compiler.
7295 # It is supported on clang but on OS X systems gcc may be an alias
7296 # for clang. Try to determine if the compiler is not really gcc and,
7297 # if so, only then enable the warning.
7298 if test $ac_cv_enable_unreachable_code_warning = yes && \
7299 test "$Py_DEBUG" != "true" && \
7300 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007301 then
7302 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007303 else
7304 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007305 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7307$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007308
INADA Naokie3364842018-06-05 20:40:53 +09007309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7310$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7311 ac_save_cc="$CC"
7312 CC="$CC -Werror -Wstrict-prototypes"
7313 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7314 $as_echo_n "(cached) " >&6
7315else
7316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7317/* end confdefs.h. */
7318
7319
7320int
7321main ()
7322{
7323
7324 ;
7325 return 0;
7326}
7327
7328_ACEOF
7329if ac_fn_c_try_compile "$LINENO"; then :
7330
7331 ac_cv_enable_strict_prototypes_warning=yes
7332
7333else
7334
7335 ac_cv_enable_strict_prototypes_warning=no
7336
7337fi
7338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7339fi
7340
7341 CC="$ac_save_cc"
7342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7343$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7344
7345 if test $ac_cv_enable_strict_prototypes_warning = yes
7346 then
7347 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7348 fi
7349
Victor Stinner193ee0a2017-02-06 14:24:00 +01007350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7351$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7352 ac_save_cc="$CC"
7353 CC="$CC -Werror=implicit-function-declaration"
7354 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7355 $as_echo_n "(cached) " >&6
7356else
7357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7358/* end confdefs.h. */
7359
7360
7361int
7362main ()
7363{
7364
7365 ;
7366 return 0;
7367}
7368
7369_ACEOF
7370if ac_fn_c_try_compile "$LINENO"; then :
7371
7372 ac_cv_enable_implicit_function_declaration_error=yes
7373
7374else
7375
7376 ac_cv_enable_implicit_function_declaration_error=no
7377
7378fi
7379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7380fi
7381
7382 CC="$ac_save_cc"
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7384$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7385
7386 if test $ac_cv_enable_implicit_function_declaration_error = yes
7387 then
7388 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7389 fi
7390
Vinay Sajip0b60f642019-10-15 08:26:12 +01007391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7392$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7393 ac_save_cc="$CC"
7394 CC="$CC -fvisibility=hidden"
7395 if ${ac_cv_enable_visibility+:} false; then :
7396 $as_echo_n "(cached) " >&6
7397else
7398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7399/* end confdefs.h. */
7400
7401
7402int
7403main ()
7404{
7405
7406 ;
7407 return 0;
7408}
7409
7410_ACEOF
7411if ac_fn_c_try_compile "$LINENO"; then :
7412
7413 ac_cv_enable_visibility=yes
7414
7415else
7416
7417 ac_cv_enable_visibility=no
7418
7419fi
7420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7421fi
7422
7423 CC="$ac_save_cc"
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7425$as_echo "$ac_cv_enable_visibility" >&6; }
7426
7427 if test $ac_cv_enable_visibility = yes
7428 then
7429 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7430 fi
7431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7433 # support. Without this, treatment of subnormals doesn't follow
7434 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007435 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436 alpha*)
7437 BASECFLAGS="$BASECFLAGS -mieee"
7438 ;;
7439 esac
7440
7441 case $ac_sys_system in
7442 SCO_SV*)
7443 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7444 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007445
Ned Deily87adb6e2013-10-18 21:09:56 -07007446 Darwin*)
7447 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7448 # used to be here, but non-Apple gcc doesn't accept them.
7449 if test "${CC}" = gcc
7450 then
7451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007452$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007453 case "${UNIVERSALSDK}" in
7454 */MacOSX10.4u.sdk)
7455 # Build using 10.4 SDK, force usage of gcc when the
7456 # compiler is gcc, otherwise the user will get very
7457 # confusing error messages when building on OSX 10.6
7458 CC=gcc-4.0
7459 CPP=cpp-4.0
7460 ;;
7461 esac
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007463$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007464 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465
Ned Deily87adb6e2013-10-18 21:09:56 -07007466 if test "${enable_universalsdk}"
7467 then
7468 case "$UNIVERSAL_ARCHS" in
7469 32-bit)
7470 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7471 LIPO_32BIT_FLAGS=""
7472 ARCH_RUN_32BIT=""
7473 ;;
7474 64-bit)
7475 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7476 LIPO_32BIT_FLAGS=""
7477 ARCH_RUN_32BIT="true"
7478 ;;
7479 all)
7480 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7481 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7482 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7483 ;;
Ronald Oussorene8b1c032020-11-22 11:18:40 +01007484 universal2)
7485 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7486 LIPO_32BIT_FLAGS=""
7487 ARCH_RUN_32BIT="true"
7488 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007489 intel)
7490 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7491 LIPO_32BIT_FLAGS="-extract i386"
7492 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7493 ;;
7494 intel-32)
7495 UNIVERSAL_ARCH_FLAGS="-arch i386"
7496 LIPO_32BIT_FLAGS=""
7497 ARCH_RUN_32BIT=""
7498 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007499 intel-64)
7500 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7501 LIPO_32BIT_FLAGS=""
7502 ARCH_RUN_32BIT="true"
7503 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007504 3-way)
7505 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7506 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7507 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7508 ;;
7509 *)
Ronald Oussorene8b1c032020-11-22 11:18:40 +01007510 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 -07007511 ;;
7512 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513
Ned Deily87adb6e2013-10-18 21:09:56 -07007514 if test "${UNIVERSALSDK}" != "/"
7515 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007516 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7517 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007518 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007519 else
7520 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7521 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007522 fi
7523 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524
Ned Deily87adb6e2013-10-18 21:09:56 -07007525 # Calculate an appropriate deployment target for this build:
7526 # The deployment target value is used explicitly to enable certain
7527 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007528 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007529 # component of the string returned by distutils.get_platform().
7530 #
7531 # Use the value from:
7532 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7533 # 2. the operating system version of the build machine if >= 10.6
7534 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7535 # below to pick either 10.3, 10.4, or 10.5 as the target.
7536 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537
Ned Deily87adb6e2013-10-18 21:09:56 -07007538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7539$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007540 cur_target_major=`sw_vers -productVersion | \
7541 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7542 cur_target_minor=`sw_vers -productVersion | \
7543 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7544 cur_target="${cur_target_major}.${cur_target_minor}"
7545 if test ${cur_target_major} -eq 10 && \
7546 test ${cur_target_minor} -ge 3 && \
7547 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007548 then
Ned Deily36820b62014-06-25 13:44:22 -07007549 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007550 cur_target=10.3
7551 if test ${enable_universalsdk}
7552 then
7553 case "$UNIVERSAL_ARCHS" in
7554 all|3-way|intel|64-bit)
7555 # These configurations were first supported in 10.5
7556 cur_target='10.5'
7557 ;;
7558 esac
7559 else
7560 if test `/usr/bin/arch` = "i386"
7561 then
7562 # 10.4 was the first release to support Intel archs
7563 cur_target="10.4"
7564 fi
7565 fi
7566 fi
7567 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007568
Ned Deily87adb6e2013-10-18 21:09:56 -07007569 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7570 # environment with a value that is the same as what we'll use
7571 # in the Makefile to ensure that we'll get the same compiler
7572 # environment during configure and build time.
7573 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7574 export MACOSX_DEPLOYMENT_TARGET
7575 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7577$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007578
Miss Islington (bot)748d38b2020-11-21 17:45:21 -08007579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7580$as_echo_n "checking if specified universal architectures work... " >&6; }
7581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7582/* end confdefs.h. */
7583#include <stdio.h>
7584int
7585main ()
7586{
7587printf("%d", 42);
7588 ;
7589 return 0;
7590}
7591_ACEOF
7592if ac_fn_c_try_link "$LINENO"; then :
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7594$as_echo "yes" >&6; }
7595else
7596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7597$as_echo "no" >&6; }
7598 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7599
7600fi
7601rm -f core conftest.err conftest.$ac_objext \
7602 conftest$ac_exeext conftest.$ac_ext
7603
Ned Deily87adb6e2013-10-18 21:09:56 -07007604 # end of Darwin* tests
7605 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606 esac
7607 ;;
7608
7609*)
7610 case $ac_sys_system in
7611 OpenUNIX*|UnixWare*)
7612 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7613 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614 SCO_SV*)
7615 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7616 ;;
7617 esac
7618 ;;
7619esac
7620
Zachary Ware5af85642015-12-21 12:09:17 -06007621case "$CC" in
7622*icc*)
Miss Islington (bot)fb050d02020-09-04 14:02:57 -07007623 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007624 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7625 ;;
Miss Islington (bot)fb050d02020-09-04 14:02:57 -07007626*xlc*)
7627 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7628 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007629esac
7630
T. Woutersddbfa2c2017-05-23 01:30:49 +02007631if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632 :
7633else
7634 OPT="-DNDEBUG $OPT"
7635fi
7636
7637if test "$ac_arch_flags"
7638then
7639 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7640fi
7641
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642# On some compilers, pthreads are available without further options
7643# (e.g. MacOS X). On some of these systems, the compiler will not
7644# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7645# So we have to see first whether pthreads are available without
7646# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7648$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007649if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651else
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653 ac_cv_pthread_is_default=no
7654else
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656/* end confdefs.h. */
7657
Stefan Krah7dba5942012-11-22 22:49:11 +01007658#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659#include <pthread.h>
7660
7661void* routine(void* p){return NULL;}
7662
7663int main(){
7664 pthread_t p;
7665 if(pthread_create(&p,NULL,routine,NULL)!=0)
7666 return 1;
7667 (void)pthread_detach(p);
7668 return 0;
7669}
7670
7671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007672if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673
7674 ac_cv_pthread_is_default=yes
7675 ac_cv_kthread=no
7676 ac_cv_pthread=no
7677
7678else
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7682 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683fi
7684
7685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
7687
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7689$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690
7691
7692if test $ac_cv_pthread_is_default = yes
7693then
7694 ac_cv_kpthread=no
7695else
7696# -Kpthread, if available, provides the right #defines
7697# and linker options to make pthread_create available
7698# Some compilers won't report that they do not support -Kpthread,
7699# so we need to run a program to see whether it really made the
7700# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7702$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007703if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705else
7706 ac_save_cc="$CC"
7707CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007708if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709 ac_cv_kpthread=no
7710else
Matthias Kloseb9621712010-04-24 17:59:49 +00007711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712/* end confdefs.h. */
7713
Stefan Krah7dba5942012-11-22 22:49:11 +01007714#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715#include <pthread.h>
7716
7717void* routine(void* p){return NULL;}
7718
7719int main(){
7720 pthread_t p;
7721 if(pthread_create(&p,NULL,routine,NULL)!=0)
7722 return 1;
7723 (void)pthread_detach(p);
7724 return 0;
7725}
7726
7727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007728if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729 ac_cv_kpthread=yes
7730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735fi
7736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737CC="$ac_save_cc"
7738fi
7739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7741$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742fi
7743
7744if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7745then
7746# -Kthread, if available, provides the right #defines
7747# and linker options to make pthread_create available
7748# Some compilers won't report that they do not support -Kthread,
7749# so we need to run a program to see whether it really made the
7750# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7752$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007753if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755else
7756 ac_save_cc="$CC"
7757CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007758if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759 ac_cv_kthread=no
7760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762/* end confdefs.h. */
7763
Stefan Krah7dba5942012-11-22 22:49:11 +01007764#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765#include <pthread.h>
7766
7767void* routine(void* p){return NULL;}
7768
7769int main(){
7770 pthread_t p;
7771 if(pthread_create(&p,NULL,routine,NULL)!=0)
7772 return 1;
7773 (void)pthread_detach(p);
7774 return 0;
7775}
7776
7777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007778if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779 ac_cv_kthread=yes
7780else
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007785fi
7786
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787CC="$ac_save_cc"
7788fi
7789
Matthias Kloseb9621712010-04-24 17:59:49 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7791$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792fi
7793
7794if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7795then
7796# -pthread, if available, provides the right #defines
7797# and linker options to make pthread_create available
7798# Some compilers won't report that they do not support -pthread,
7799# so we need to run a program to see whether it really made the
7800# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7802$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007803if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805else
7806 ac_save_cc="$CC"
7807CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007808if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809 ac_cv_pthread=no
7810else
Matthias Kloseb9621712010-04-24 17:59:49 +00007811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007812/* end confdefs.h. */
7813
Stefan Krah7dba5942012-11-22 22:49:11 +01007814#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007815#include <pthread.h>
7816
7817void* routine(void* p){return NULL;}
7818
7819int main(){
7820 pthread_t p;
7821 if(pthread_create(&p,NULL,routine,NULL)!=0)
7822 return 1;
7823 (void)pthread_detach(p);
7824 return 0;
7825}
7826
7827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007828if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007829 ac_cv_pthread=yes
7830else
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7834 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835fi
7836
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007837CC="$ac_save_cc"
7838fi
7839
Matthias Kloseb9621712010-04-24 17:59:49 +00007840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7841$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842fi
7843
7844# If we have set a CC compiler flag for thread support then
7845# check if it works for CXX, too.
7846ac_cv_cxx_thread=no
7847if test ! -z "$CXX"
7848then
Matthias Kloseb9621712010-04-24 17:59:49 +00007849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7850$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851ac_save_cxx="$CXX"
7852
7853if test "$ac_cv_kpthread" = "yes"
7854then
7855 CXX="$CXX -Kpthread"
7856 ac_cv_cxx_thread=yes
7857elif test "$ac_cv_kthread" = "yes"
7858then
7859 CXX="$CXX -Kthread"
7860 ac_cv_cxx_thread=yes
7861elif test "$ac_cv_pthread" = "yes"
7862then
7863 CXX="$CXX -pthread"
7864 ac_cv_cxx_thread=yes
7865fi
7866
7867if test $ac_cv_cxx_thread = yes
7868then
7869 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7870 $CXX -c conftest.$ac_ext 2>&5
7871 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7872 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7873 then
7874 ac_cv_cxx_thread=yes
7875 else
7876 ac_cv_cxx_thread=no
7877 fi
7878 rm -fr conftest*
7879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7881$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007882fi
7883CXX="$ac_save_cxx"
7884
7885
7886# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7888$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007889if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893/* end confdefs.h. */
7894#include <stdlib.h>
7895#include <stdarg.h>
7896#include <string.h>
7897#include <float.h>
7898
7899int
7900main ()
7901{
7902
7903 ;
7904 return 0;
7905}
7906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007907if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007908 ac_cv_header_stdc=yes
7909else
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007911fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7913
7914if test $ac_cv_header_stdc = yes; then
7915 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007917/* end confdefs.h. */
7918#include <string.h>
7919
7920_ACEOF
7921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 $EGREP "memchr" >/dev/null 2>&1; then :
7923
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007924else
7925 ac_cv_header_stdc=no
7926fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007927rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007928
7929fi
7930
7931if test $ac_cv_header_stdc = yes; then
7932 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007934/* end confdefs.h. */
7935#include <stdlib.h>
7936
7937_ACEOF
7938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 $EGREP "free" >/dev/null 2>&1; then :
7940
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007941else
7942 ac_cv_header_stdc=no
7943fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007944rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007945
7946fi
7947
7948if test $ac_cv_header_stdc = yes; then
7949 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007951 :
7952else
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007954/* end confdefs.h. */
7955#include <ctype.h>
7956#include <stdlib.h>
7957#if ((' ' & 0x0FF) == 0x020)
7958# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7959# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7960#else
7961# define ISLOWER(c) \
7962 (('a' <= (c) && (c) <= 'i') \
7963 || ('j' <= (c) && (c) <= 'r') \
7964 || ('s' <= (c) && (c) <= 'z'))
7965# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7966#endif
7967
7968#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7969int
7970main ()
7971{
7972 int i;
7973 for (i = 0; i < 256; i++)
7974 if (XOR (islower (i), ISLOWER (i))
7975 || toupper (i) != TOUPPER (i))
7976 return 2;
7977 return 0;
7978}
7979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007980if ac_fn_c_try_run "$LINENO"; then :
7981
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007982else
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007987fi
7988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007989fi
7990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7992$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007993if test $ac_cv_header_stdc = yes; then
7994
Matthias Kloseb9621712010-04-24 17:59:49 +00007995$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007996
7997fi
7998
stratakise768c862018-01-23 16:11:24 +01007999for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008000fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02008001ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07008002sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07008003utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01008004poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01008005sys/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 +01008006sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08008007sys/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 +01008008sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00008009sys/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 -07008010libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008011linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08008012sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008013do :
8014 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8015ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008016if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008018#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008019_ACEOF
8020
8021fi
8022
Guido van Rossum627b2d71993-12-24 10:39:16 +00008023done
8024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008025ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008026for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8029$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008030if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00008032else
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008034/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008035#include <sys/types.h>
8036#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008037
Martin v. Löwis11437992002-04-12 09:54:03 +00008038int
8039main ()
8040{
8041if ((DIR *) 0)
8042return 0;
8043 ;
8044 return 0;
8045}
8046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008049else
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054eval ac_res=\$$as_ac_Header
8055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8056$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008057if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008058 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008059#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008060_ACEOF
8061
8062ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008065done
8066# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8067if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8069$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008070if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008072else
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077/* Override any GCC internal prototype to avoid an error.
8078 Use char because int might match the return type of a GCC
8079 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008080#ifdef __cplusplus
8081extern "C"
8082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008083char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008084int
8085main ()
8086{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ;
8089 return 0;
8090}
8091_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092for ac_lib in '' dir; do
8093 if test -z "$ac_lib"; then
8094 ac_res="none required"
8095 else
8096 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008097 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008102rm -f core conftest.err conftest.$ac_objext \
8103 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008104 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107done
Victor Stinnere0be4232011-10-25 13:06:09 +02008108if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110else
8111 ac_cv_search_opendir=no
8112fi
8113rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008114LIBS=$ac_func_search_save_LIBS
8115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8117$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008119if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008120 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008121
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
Michael W. Hudson54241132001-12-07 15:38:26 +00008124else
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8126$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008127if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008128 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008129else
8130 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008134/* Override any GCC internal prototype to avoid an error.
8135 Use char because int might match the return type of a GCC
8136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008137#ifdef __cplusplus
8138extern "C"
8139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008140char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008141int
8142main ()
8143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008145 ;
8146 return 0;
8147}
8148_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149for ac_lib in '' x; do
8150 if test -z "$ac_lib"; then
8151 ac_res="none required"
8152 else
8153 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008154 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008159rm -f core conftest.err conftest.$ac_objext \
8160 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008161 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164done
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167else
8168 ac_cv_search_opendir=no
8169fi
8170rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008171LIBS=$ac_func_search_save_LIBS
8172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8174$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008175ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008176if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008177 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008179fi
8180
8181fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8184$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008185if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008187else
Matthias Kloseb9621712010-04-24 17:59:49 +00008188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008189/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008190#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008191int
8192main ()
8193{
8194return makedev(0, 0);
8195 ;
8196 return 0;
8197}
8198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008199if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008200 ac_cv_header_sys_types_h_makedev=yes
8201else
Matthias Kloseb9621712010-04-24 17:59:49 +00008202 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008204rm -f core conftest.err conftest.$ac_objext \
8205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008206
8207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8209$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008210
8211if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008212ac_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 +02008213if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008214
Matthias Kloseb9621712010-04-24 17:59:49 +00008215$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008216
8217fi
8218
8219
8220
8221 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 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 +02008223if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008226
8227fi
8228
8229
8230 fi
8231fi
8232
Michael W. Hudson54241132001-12-07 15:38:26 +00008233
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008234# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8235# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8236SAVE_CFLAGS=$CFLAGS
8237CFLAGS="-std=c99 $CFLAGS"
8238for ac_header in bluetooth/bluetooth.h
8239do :
8240 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8241if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8242 cat >>confdefs.h <<_ACEOF
8243#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8244_ACEOF
8245
8246fi
8247
8248done
8249
8250CFLAGS=$SAVE_CFLAGS
8251
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008252# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8253for ac_header in net/if.h
8254do :
8255 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8256#ifdef STDC_HEADERS
8257# include <stdlib.h>
8258# include <stddef.h>
8259#else
8260# ifdef HAVE_STDLIB_H
8261# include <stdlib.h>
8262# endif
8263#endif
8264#ifdef HAVE_SYS_SOCKET_H
8265# include <sys/socket.h>
8266#endif
8267
8268"
Victor Stinnere0be4232011-10-25 13:06:09 +02008269if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008270 cat >>confdefs.h <<_ACEOF
8271#define HAVE_NET_IF_H 1
8272_ACEOF
8273
8274fi
8275
8276done
8277
8278
Martin v. Löwis11017b12006-01-14 18:12:57 +00008279# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008280for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008281do :
8282 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 +00008283#ifdef HAVE_ASM_TYPES_H
8284#include <asm/types.h>
8285#endif
8286#ifdef HAVE_SYS_SOCKET_H
8287#include <sys/socket.h>
8288#endif
8289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290"
Victor Stinnere0be4232011-10-25 13:06:09 +02008291if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008292 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008293#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008294_ACEOF
8295
8296fi
8297
8298done
8299
8300
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008301# On Linux, qrtr.h requires asm/types.h
8302for ac_header in linux/qrtr.h
8303do :
8304 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8305#ifdef HAVE_ASM_TYPES_H
8306#include <asm/types.h>
8307#endif
8308#ifdef HAVE_SYS_SOCKET_H
8309#include <sys/socket.h>
8310#endif
8311
8312"
8313if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8314 cat >>confdefs.h <<_ACEOF
8315#define HAVE_LINUX_QRTR_H 1
8316_ACEOF
8317
8318fi
8319
8320done
8321
8322
caaveryeffc12f2017-09-06 18:18:10 -04008323for ac_header in linux/vm_sockets.h
8324do :
8325 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8326#ifdef HAVE_SYS_SOCKET_H
8327#include <sys/socket.h>
8328#endif
8329
8330"
8331if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8332 cat >>confdefs.h <<_ACEOF
8333#define HAVE_LINUX_VM_SOCKETS_H 1
8334_ACEOF
8335
8336fi
8337
8338done
8339
8340
karl ding360371f2020-04-29 15:31:19 -07008341# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8342for 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 +02008343do :
8344 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8345ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8346#ifdef HAVE_SYS_SOCKET_H
8347#include <sys/socket.h>
8348#endif
8349
8350"
8351if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8352 cat >>confdefs.h <<_ACEOF
8353#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8354_ACEOF
8355
8356fi
8357
8358done
8359
8360
Guido van Rossum627b2d71993-12-24 10:39:16 +00008361# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008362was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8364$as_echo_n "checking for clock_t in time.h... " >&6; }
8365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008366/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008367#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
8369_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008370if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008372 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008373else
Martin v. Löwis11437992002-04-12 09:54:03 +00008374
8375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008377
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008378
Guido van Rossum627b2d71993-12-24 10:39:16 +00008379fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008380rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008381
Matthias Kloseb9621712010-04-24 17:59:49 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8383$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8386$as_echo_n "checking for makedev... " >&6; }
8387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008388/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008389
Jesus Cea740f53a2010-04-28 11:35:30 +00008390#if defined(MAJOR_IN_MKDEV)
8391#include <sys/mkdev.h>
8392#elif defined(MAJOR_IN_SYSMACROS)
8393#include <sys/sysmacros.h>
8394#else
8395#include <sys/types.h>
8396#endif
8397
Neal Norwitz11690112002-07-30 01:08:28 +00008398int
8399main ()
8400{
Jesus Cea740f53a2010-04-28 11:35:30 +00008401
8402 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008403 ;
8404 return 0;
8405}
Matthias Kloseb159a552010-04-25 21:00:44 +00008406
Neal Norwitz11690112002-07-30 01:08:28 +00008407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008408if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008409 ac_cv_has_makedev=yes
8410else
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413rm -f core conftest.err conftest.$ac_objext \
8414 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8416$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008417if test "$ac_cv_has_makedev" = "yes"; then
8418
Matthias Kloseb9621712010-04-24 17:59:49 +00008419$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008420
8421fi
8422
Christian Heimes985ecdc2013-11-20 11:46:18 +01008423# byte swapping
8424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8425$as_echo_n "checking for le64toh... " >&6; }
8426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8427/* end confdefs.h. */
8428
8429#ifdef HAVE_ENDIAN_H
8430#include <endian.h>
8431#elif defined(HAVE_SYS_ENDIAN_H)
8432#include <sys/endian.h>
8433#endif
8434
8435int
8436main ()
8437{
8438
8439 le64toh(1)
8440 ;
8441 return 0;
8442}
8443
8444_ACEOF
8445if ac_fn_c_try_link "$LINENO"; then :
8446 ac_cv_has_le64toh=yes
8447else
8448 ac_cv_has_le64toh=no
8449fi
8450rm -f core conftest.err conftest.$ac_objext \
8451 conftest$ac_exeext conftest.$ac_ext
8452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8453$as_echo "$ac_cv_has_le64toh" >&6; }
8454if test "$ac_cv_has_le64toh" = "yes"; then
8455
8456$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8457
8458fi
8459
Martin v. Löwis399a6892002-10-04 10:22:02 +00008460use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008461# Don't use largefile support for GNU/Hurd
8462case $ac_sys_system in GNU*)
8463 use_lfs=no
8464esac
8465
Martin v. Löwis399a6892002-10-04 10:22:02 +00008466if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008467# Two defines needed to enable largefile support on various platforms
8468# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008469case $ac_sys_system/$ac_sys_release in
8470AIX*)
8471
8472$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8473
8474 ;;
8475esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008476
Matthias Kloseb9621712010-04-24 17:59:49 +00008477$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
8479
Matthias Kloseb9621712010-04-24 17:59:49 +00008480$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008481
Martin v. Löwis399a6892002-10-04 10:22:02 +00008482fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008483
Guido van Rossum84e7b241996-08-19 21:59:00 +00008484# Add some code to confdefs.h so that the test for off_t works on SCO
8485cat >> confdefs.h <<\EOF
8486#if defined(SCO_DS)
8487#undef _OFF_T
8488#endif
8489EOF
8490
Guido van Rossumef2255b2000-03-10 22:30:29 +00008491# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008492ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008493if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008494
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008495else
Martin v. Löwis11437992002-04-12 09:54:03 +00008496
8497cat >>confdefs.h <<_ACEOF
8498#define mode_t int
8499_ACEOF
8500
8501fi
8502
Matthias Kloseb9621712010-04-24 17:59:49 +00008503ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008504if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008506else
Martin v. Löwis11437992002-04-12 09:54:03 +00008507
8508cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008510_ACEOF
8511
8512fi
8513
Matthias Kloseb9621712010-04-24 17:59:49 +00008514ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008515if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008516
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008517else
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
8519cat >>confdefs.h <<_ACEOF
8520#define pid_t int
8521_ACEOF
8522
8523fi
8524
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008525
Martin v. Löwis11437992002-04-12 09:54:03 +00008526cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008527#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008528_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008529
Matthias Kloseb9621712010-04-24 17:59:49 +00008530ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008531if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008532
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008533else
Martin v. Löwis11437992002-04-12 09:54:03 +00008534
8535cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008537_ACEOF
8538
8539fi
8540
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8542$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008543if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008545else
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008547/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008548#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008549
8550_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008553 ac_cv_type_uid_t=yes
8554else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008555 ac_cv_type_uid_t=no
8556fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008557rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008558
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8561$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008562if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008563
Matthias Kloseb9621712010-04-24 17:59:49 +00008564$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008565
8566
Matthias Kloseb9621712010-04-24 17:59:49 +00008567$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008568
8569fi
8570
Mark Dickinson983bc162012-12-02 12:11:38 +00008571
Matthias Kloseb9621712010-04-24 17:59:49 +00008572ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008573if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574
Matthias Kloseb9621712010-04-24 17:59:49 +00008575$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008576
8577fi
8578
Stefan Krah1919b7e2012-03-21 18:25:23 +01008579ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8580if test "x$ac_cv_type___uint128_t" = xyes; then :
8581
8582$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8583
8584fi
8585
Jack Jansendd19cf82001-12-06 22:36:17 +00008586
Michael W. Hudson54241132001-12-07 15:38:26 +00008587# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008588# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8594$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 if test "$ac_cv_type_int" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008604as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008605See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 else
8607 ac_cv_sizeof_int=0
8608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8613$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614
8615
8616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008618#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008620
8621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8627$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008628if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 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 +00008632
Martin v. Löwis11437992002-04-12 09:54:03 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 if test "$ac_cv_type_long" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008637as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008638See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639 else
8640 ac_cv_sizeof_long=0
8641 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643
Martin v. Löwis11437992002-04-12 09:54:03 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8646$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647
8648
8649
Martin v. Löwis11437992002-04-12 09:54:03 +00008650cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008651#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008652_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008653
8654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655# The cast to long int works around a bug in the HP C Compiler
8656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8658# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8660$as_echo_n "checking size of long long... " >&6; }
8661if ${ac_cv_sizeof_long_long+:} false; then :
8662 $as_echo_n "(cached) " >&6
8663else
8664 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8665
8666else
8667 if test "$ac_cv_type_long_long" = yes; then
8668 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8670as_fn_error 77 "cannot compute sizeof (long long)
8671See \`config.log' for more details" "$LINENO" 5; }
8672 else
8673 ac_cv_sizeof_long_long=0
8674 fi
8675fi
8676
8677fi
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8679$as_echo "$ac_cv_sizeof_long_long" >&6; }
8680
8681
8682
8683cat >>confdefs.h <<_ACEOF
8684#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8685_ACEOF
8686
8687
8688# The cast to long int works around a bug in the HP C Compiler
8689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8691# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8693$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008694if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008696else
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008698
Martin v. Löwis11437992002-04-12 09:54:03 +00008699else
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 if test "$ac_cv_type_void_p" = yes; then
8701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008703as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008704See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705 else
8706 ac_cv_sizeof_void_p=0
8707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8712$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713
8714
8715
Martin v. Löwis11437992002-04-12 09:54:03 +00008716cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008717#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008718_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008719
8720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721# The cast to long int works around a bug in the HP C Compiler
8722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8726$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008727if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008729else
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732else
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 if test "$ac_cv_type_short" = yes; then
8734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008736as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008737See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738 else
8739 ac_cv_sizeof_short=0
8740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8745$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746
8747
8748
Martin v. Löwis11437992002-04-12 09:54:03 +00008749cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008750#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008751_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008752
8753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754# The cast to long int works around a bug in the HP C Compiler
8755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8759$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008760if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008764
Martin v. Löwis11437992002-04-12 09:54:03 +00008765else
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 if test "$ac_cv_type_float" = yes; then
8767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008769as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008770See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771 else
8772 ac_cv_sizeof_float=0
8773 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775
Martin v. Löwis11437992002-04-12 09:54:03 +00008776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8778$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779
8780
8781
Martin v. Löwis11437992002-04-12 09:54:03 +00008782cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008783#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008784_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008785
8786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787# The cast to long int works around a bug in the HP C Compiler
8788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8790# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8792$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008793if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008795else
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Martin v. Löwis11437992002-04-12 09:54:03 +00008798else
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 if test "$ac_cv_type_double" = yes; then
8800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008802as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008803See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008804 else
8805 ac_cv_sizeof_double=0
8806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008808
Martin v. Löwis11437992002-04-12 09:54:03 +00008809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8811$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812
8813
8814
Martin v. Löwis11437992002-04-12 09:54:03 +00008815cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008816#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008817_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008818
8819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820# The cast to long int works around a bug in the HP C Compiler
8821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8823# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8825$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008826if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008828else
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 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 +00008830
Martin v. Löwis11437992002-04-12 09:54:03 +00008831else
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 if test "$ac_cv_type_fpos_t" = yes; then
8833 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8834$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008835as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008836See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008837 else
8838 ac_cv_sizeof_fpos_t=0
8839 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841
Martin v. Löwis11437992002-04-12 09:54:03 +00008842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8844$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845
8846
8847
Martin v. Löwis11437992002-04-12 09:54:03 +00008848cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008849#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008850_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008851
Michael W. Hudson54241132001-12-07 15:38:26 +00008852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853# The cast to long int works around a bug in the HP C Compiler
8854# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8855# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8856# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8858$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008859if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008861else
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 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 +00008863
Martin v. Löwis18e16552006-02-15 17:27:45 +00008864else
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 if test "$ac_cv_type_size_t" = yes; then
8866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008868as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008869See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870 else
8871 ac_cv_sizeof_size_t=0
8872 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008874
Martin v. Löwis18e16552006-02-15 17:27:45 +00008875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8877$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878
8879
8880
Martin v. Löwis18e16552006-02-15 17:27:45 +00008881cat >>confdefs.h <<_ACEOF
8882#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8883_ACEOF
8884
8885
Christian Heimes400adb02008-02-01 08:12:03 +00008886# The cast to long int works around a bug in the HP C Compiler
8887# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8888# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8889# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8891$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008892if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008894else
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 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 +00008896
Christian Heimes400adb02008-02-01 08:12:03 +00008897else
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 if test "$ac_cv_type_pid_t" = yes; then
8899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008901as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008902See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008903 else
8904 ac_cv_sizeof_pid_t=0
8905 fi
8906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008907
Christian Heimes400adb02008-02-01 08:12:03 +00008908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8910$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008911
8912
8913
8914cat >>confdefs.h <<_ACEOF
8915#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8916_ACEOF
8917
8918
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008919# The cast to long int works around a bug in the HP C Compiler
8920# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8921# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8922# This bug is HP SR number 8606223364.
8923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8924$as_echo_n "checking size of uintptr_t... " >&6; }
8925if ${ac_cv_sizeof_uintptr_t+:} false; then :
8926 $as_echo_n "(cached) " >&6
8927else
8928 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8929
8930else
8931 if test "$ac_cv_type_uintptr_t" = yes; then
8932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8934as_fn_error 77 "cannot compute sizeof (uintptr_t)
8935See \`config.log' for more details" "$LINENO" 5; }
8936 else
8937 ac_cv_sizeof_uintptr_t=0
8938 fi
8939fi
8940
8941fi
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8943$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8944
8945
8946
8947cat >>confdefs.h <<_ACEOF
8948#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8949_ACEOF
8950
8951
Michael W. Hudson54241132001-12-07 15:38:26 +00008952
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008953
Eitan Adler3055c942018-05-15 22:58:09 -07008954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8955$as_echo_n "checking for long double... " >&6; }
8956if ${ac_cv_type_long_double+:} false; then :
8957 $as_echo_n "(cached) " >&6
8958else
8959 if test "$GCC" = yes; then
8960 ac_cv_type_long_double=yes
8961 else
8962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8963/* end confdefs.h. */
8964/* The Stardent Vistra knows sizeof (long double), but does
8965 not support it. */
8966 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008967int
8968main ()
8969{
Eitan Adler3055c942018-05-15 22:58:09 -07008970static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8971 sizeof (double) <= sizeof (long double))];
8972test_array [0] = 0;
8973return test_array [0];
8974
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008975 ;
8976 return 0;
8977}
8978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008979if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008980 ac_cv_type_long_double=yes
8981else
8982 ac_cv_type_long_double=no
8983fi
8984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8985 fi
8986fi
8987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8988$as_echo "$ac_cv_type_long_double" >&6; }
8989 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008990
Matthias Kloseb9621712010-04-24 17:59:49 +00008991$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008992
Eitan Adler3055c942018-05-15 22:58:09 -07008993 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008994
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008995# The cast to long int works around a bug in the HP C Compiler
8996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8998# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9000$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009001if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009003else
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 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 +00009005
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009006else
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 if test "$ac_cv_type_long_double" = yes; then
9008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009010as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009011See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009012 else
9013 ac_cv_sizeof_long_double=0
9014 fi
9015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009016
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9019$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009020
9021
9022
9023cat >>confdefs.h <<_ACEOF
9024#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9025_ACEOF
9026
9027
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029# The cast to long int works around a bug in the HP C Compiler
9030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9032# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9034$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009035if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00009037else
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 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 +00009039
Thomas Woutersb2137042007-02-01 18:02:27 +00009040else
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 if test "$ac_cv_type__Bool" = yes; then
9042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009044as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009045See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046 else
9047 ac_cv_sizeof__Bool=0
9048 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009050
Thomas Woutersb2137042007-02-01 18:02:27 +00009051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9053$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054
9055
9056
Thomas Woutersb2137042007-02-01 18:02:27 +00009057cat >>confdefs.h <<_ACEOF
9058#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9059_ACEOF
9060
9061
Thomas Woutersb2137042007-02-01 18:02:27 +00009062
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009063# The cast to long int works around a bug in the HP C Compiler
9064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9066# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9068$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009069if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009071else
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009073#ifdef HAVE_SYS_TYPES_H
9074#include <sys/types.h>
9075#endif
9076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009078
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009079else
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 if test "$ac_cv_type_off_t" = 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 (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009084See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009085 else
9086 ac_cv_sizeof_off_t=0
9087 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009089
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9092$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009093
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009094
9095
Martin v. Löwis11437992002-04-12 09:54:03 +00009096cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009097#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009098_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009099
Michael W. Hudson54241132001-12-07 15:38:26 +00009100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9103$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009104if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009105 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009106
Matthias Kloseb9621712010-04-24 17:59:49 +00009107$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009108
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9110$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009111else
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9113$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009114fi
9115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009116# The cast to long int works around a bug in the HP C Compiler
9117# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9118# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9119# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9121$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009122if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009123 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009124else
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009126#ifdef HAVE_SYS_TYPES_H
9127#include <sys/types.h>
9128#endif
9129#ifdef HAVE_TIME_H
9130#include <time.h>
9131#endif
9132
Matthias Kloseb9621712010-04-24 17:59:49 +00009133"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009135else
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 if test "$ac_cv_type_time_t" = yes; then
9137 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009139as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009140See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009141 else
9142 ac_cv_sizeof_time_t=0
9143 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009145
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9148$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009150
9151
Martin v. Löwis11437992002-04-12 09:54:03 +00009152cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009153#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009154_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009155
Michael W. Hudson54241132001-12-07 15:38:26 +00009156
9157
Trent Mick635f6fb2000-08-23 21:33:05 +00009158# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009159ac_save_cc="$CC"
9160if test "$ac_cv_kpthread" = "yes"
9161then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009162elif test "$ac_cv_kthread" = "yes"
9163then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009164elif test "$ac_cv_pthread" = "yes"
9165then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009166fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009167
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9169$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009170have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009172/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009173
9174 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009175int
9176main ()
9177{
Guido van Rossum12580492000-09-24 16:47:19 +00009178pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 ;
9180 return 0;
9181}
Matthias Kloseb159a552010-04-25 21:00:44 +00009182
Martin v. Löwis11437992002-04-12 09:54:03 +00009183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009184if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009185 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9189$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009190if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009192# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9193# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9194# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9196$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009197if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009198 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009199else
Matthias Kloseb9621712010-04-24 17:59:49 +00009200 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009201#ifdef HAVE_PTHREAD_H
9202#include <pthread.h>
9203#endif
9204
Matthias Kloseb9621712010-04-24 17:59:49 +00009205"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009206
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009207else
Matthias Kloseb9621712010-04-24 17:59:49 +00009208 if test "$ac_cv_type_pthread_t" = yes; then
9209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9210$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009211as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009212See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009213 else
9214 ac_cv_sizeof_pthread_t=0
9215 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009217
Trent Mick635f6fb2000-08-23 21:33:05 +00009218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9220$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009221
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009222
9223
Martin v. Löwis11437992002-04-12 09:54:03 +00009224cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009225#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009226_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009227
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009228
Trent Mick635f6fb2000-08-23 21:33:05 +00009229fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009230
9231# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9232# This checking will be unnecessary after removing deprecated TLS API.
9233# The cast to long int works around a bug in the HP C Compiler
9234# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9235# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9236# This bug is HP SR number 8606223364.
9237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9238$as_echo_n "checking size of pthread_key_t... " >&6; }
9239if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9240 $as_echo_n "(cached) " >&6
9241else
9242 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9243"; then :
9244
9245else
9246 if test "$ac_cv_type_pthread_key_t" = yes; then
9247 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9248$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9249as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9250See \`config.log' for more details" "$LINENO" 5; }
9251 else
9252 ac_cv_sizeof_pthread_key_t=0
9253 fi
9254fi
9255
9256fi
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9258$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9259
9260
9261
9262cat >>confdefs.h <<_ACEOF
9263#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9264_ACEOF
9265
9266
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9268$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9269if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9271/* end confdefs.h. */
9272#include <pthread.h>
9273int
9274main ()
9275{
9276pthread_key_t k; k * 1;
9277 ;
9278 return 0;
9279}
9280_ACEOF
9281if ac_fn_c_try_compile "$LINENO"; then :
9282 ac_pthread_key_t_is_arithmetic_type=yes
9283else
9284 ac_pthread_key_t_is_arithmetic_type=no
9285
9286fi
9287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9289$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9290 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9291
9292$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9293
9294 fi
9295else
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9297$as_echo "no" >&6; }
9298fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009299CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009300
Michael W. Hudson54241132001-12-07 15:38:26 +00009301
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009302case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009303 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009304 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9305 ;;
9306 Darwin/*)
9307 OTHER_LIBTOOL_OPT=""
9308 ;;
9309esac
9310
9311
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009312
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009313case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009314 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009315 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9316 if test "${enable_universalsdk}"; then
9317 :
9318 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009319 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009320 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009321 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009322 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009323 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009324 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009325 if test ${gcc_version} '<' 4.0
9326 then
9327 LIBTOOL_CRUFT="-lcc_dynamic"
9328 else
9329 LIBTOOL_CRUFT=""
9330 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009331 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009332 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009333else
Matthias Kloseb9621712010-04-24 17:59:49 +00009334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009335/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009336
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009337 #include <unistd.h>
9338 int main(int argc, char*argv[])
9339 {
9340 if (sizeof(long) == 4) {
9341 return 0;
9342 } else {
9343 return 1;
9344 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009345 }
9346
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009348if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009349 ac_osx_32bit=yes
9350else
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9354 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009355fi
9356
9357
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009358 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009359 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009360 i386)
9361 MACOSX_DEFAULT_ARCH="i386"
9362 ;;
9363 ppc)
9364 MACOSX_DEFAULT_ARCH="ppc"
9365 ;;
9366 *)
Ronald Oussorene8b1c032020-11-22 11:18:40 +01009367 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009368 ;;
9369 esac
9370 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009371 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009372 i386)
9373 MACOSX_DEFAULT_ARCH="x86_64"
9374 ;;
9375 ppc)
9376 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussorene8b1c032020-11-22 11:18:40 +01009377 ;;
9378 arm64)
9379 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009380 ;;
9381 *)
Ronald Oussorene8b1c032020-11-22 11:18:40 +01009382 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009383 ;;
9384 esac
9385
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009386 fi
9387
9388 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009389 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009390 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009391esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9393$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009394if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009395then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009396 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009398 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009399
Matthias Kloseb9621712010-04-24 17:59:49 +00009400$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9403$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009404 if test $enable_shared = "yes"
9405 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009406 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 +00009407 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009408else
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009411fi
9412
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9414$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009415case $ac_sys_system/$ac_sys_release in
9416 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009417
Matthias Kloseb9621712010-04-24 17:59:49 +00009418$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009419
Matthias Kloseb9621712010-04-24 17:59:49 +00009420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9421$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009422 ;;
9423 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009426 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009427esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009428
Guido van Rossum0a516c91994-09-12 10:58:40 +00009429# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009430
Michael W. Hudson54241132001-12-07 15:38:26 +00009431
9432
9433
9434
Benjamin Peterson99f03762010-04-11 22:15:28 +00009435
Thomas Wouters477c8d52006-05-27 19:21:47 +00009436
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009437# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9438# -- usually .so, .sl on HP-UX, .dll on Cygwin
9439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9440$as_echo_n "checking the extension of shared libraries... " >&6; }
9441if test -z "$SHLIB_SUFFIX"; then
9442 case $ac_sys_system in
9443 hp*|HP*)
9444 case `uname -m` in
9445 ia64) SHLIB_SUFFIX=.so;;
9446 *) SHLIB_SUFFIX=.sl;;
9447 esac
9448 ;;
9449 CYGWIN*) SHLIB_SUFFIX=.dll;;
9450 *) SHLIB_SUFFIX=.so;;
9451 esac
9452fi
9453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9454$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009455
Guido van Rossum0a516c91994-09-12 10:58:40 +00009456# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009457# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009458# (Shared libraries in this instance are shared modules to be loaded into
9459# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9461$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009462if test -z "$LDSHARED"
9463then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009464 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009465 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009466 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009467 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009468 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009470 if test "$GCC" = "yes" ; then
9471 LDSHARED='$(CC) -shared'
9472 LDCXXSHARED='$(CXX) -shared'
9473 else
9474 LDSHARED='$(CC) -G'
9475 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009476 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009477 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009478 if test "$GCC" = "yes" ; then
9479 LDSHARED='$(CC) -shared'
9480 LDCXXSHARED='$(CXX) -shared'
9481 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009482 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009483 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009484 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009485 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009486 LDSHARED='$(CC) -bundle'
9487 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009488 if test "$enable_framework" ; then
9489 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009490 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9491 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009492 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009493 else
9494 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009495 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009496 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009497 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009498 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009499 LDSHARED='$(CC) -bundle'
9500 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009501 if test "$enable_framework" ; then
9502 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009503 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9504 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009505 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009506 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009507 # No framework, use the Python app as bundle-loader
9508 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009509 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009510 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009511 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009512 Darwin/*)
9513 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9514 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009515
Ned Deily36820b62014-06-25 13:44:22 -07009516 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9517 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9518 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9519 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9520 if test ${dep_target_major} -eq 10 && \
9521 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009522 then
Ned Deily36820b62014-06-25 13:44:22 -07009523 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009524 LDSHARED='$(CC) -bundle'
9525 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009526 if test "$enable_framework" ; then
9527 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009528 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9529 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009530 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009531 else
9532 # No framework, use the Python app as bundle-loader
9533 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9534 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009535 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009536 fi
Ned Deily36820b62014-06-25 13:44:22 -07009537 else
9538 # building for OS X 10.3 and later
9539 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9540 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9541 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009542 fi
9543 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009544 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009545 LDSHARED='$(CC) -shared'
9546 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009547 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009548 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009549 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009550 LDSHARED='$(CC) -shared'
9551 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009552 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009553 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009554 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009555 OpenBSD*)
9556 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9557 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009558 LDSHARED='$(CC) -shared $(CCSHARED)'
9559 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009560 else
9561 case `uname -r` in
9562 [01].* | 2.[0-7] | 2.[0-7].*)
9563 LDSHARED="ld -Bshareable ${LDFLAGS}"
9564 ;;
9565 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009566 LDSHARED='$(CC) -shared $(CCSHARED)'
9567 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009568 ;;
9569 esac
9570 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009571 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009572 LDSHARED='$(CC) -shared'
9573 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009574 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009575 if test "$GCC" = "yes" ; then
9576 LDSHARED='$(CC) -shared'
9577 LDCXXSHARED='$(CXX) -shared'
9578 else
9579 LDSHARED='$(CC) -G'
9580 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009581 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009582 SCO_SV*)
9583 LDSHARED='$(CC) -Wl,-G,-Bexport'
9584 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9585 CYGWIN*)
9586 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9587 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009588 *) LDSHARED="ld";;
9589 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9592$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009593LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009594BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009595# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009596# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9598$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009599if test -z "$CCSHARED"
9600then
Guido van Rossum07397971997-04-29 21:49:50 +00009601 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009602 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009603 then CCSHARED="-fPIC";
9604 elif test `uname -p` = sparc;
9605 then CCSHARED="-xcode=pic32";
9606 else CCSHARED="-Kpic";
9607 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009608 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009609 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009610 else CCSHARED="+z";
9611 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009612 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009613 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009614 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009615 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009616 if test "$GCC" = "yes"
9617 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009618 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009619 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009620 SCO_SV*)
9621 if test "$GCC" = "yes"
9622 then CCSHARED="-fPIC"
9623 else CCSHARED="-Kpic -belf"
9624 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009625 VxWorks*)
9626 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009627 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9630$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009631# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009632# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9634$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009635if test -z "$LINKFORSHARED"
9636then
Guido van Rossum07397971997-04-29 21:49:50 +00009637 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009638 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009639 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009640 LINKFORSHARED="-Wl,-E -Wl,+s";;
9641# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009642 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009643 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009644 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009646 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009647
9648 # Issue #18075: the default maximum stack size (8MBytes) is too
9649 # small for the default recursion limit. Increase the stack size
9650 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009651 # Note: This matches the value of THREAD_STACK_SIZE in
9652 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009653 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9654
Jack Jansene578a632001-08-15 01:27:14 +00009655 if test "$enable_framework"
9656 then
Jack Jansenda49e192005-01-07 13:08:22 +00009657 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009658 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009659 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009660 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009661 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009662 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009663 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009664 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9665 then
9666 LINKFORSHARED="-Wl,--export-dynamic"
9667 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009668 SunOS/5*) case $CC in
9669 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009670 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009671 then
9672 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009673 fi;;
9674 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009675 CYGWIN*)
9676 if test $enable_shared = "no"
9677 then
9678 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9679 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009680 QNX*)
9681 # -Wl,-E causes the symbols to be added to the dynamic
9682 # symbol table so that they can be found when a module
9683 # is loaded. -N 2048K causes the stack size to be set
9684 # to 2048 kilobytes so that the stack doesn't overflow
9685 # when running test_compile.py.
9686 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009687 VxWorks*)
9688 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009689 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9692$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009693
Michael W. Hudson54241132001-12-07 15:38:26 +00009694
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009695
Matthias Kloseb9621712010-04-24 17:59:49 +00009696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9697$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009698if test ! "$LIBRARY" = "$LDLIBRARY"
9699then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009700 case $ac_sys_system in
9701 CYGWIN*)
9702 # Cygwin needs CCSHARED when building extension DLLs
9703 # but not when building the interpreter DLL.
9704 CFLAGSFORSHARED='';;
9705 *)
9706 CFLAGSFORSHARED='$(CCSHARED)'
9707 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9710$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009711
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009712# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9713# library (with --enable-shared).
9714# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009715# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9716# if it is not required, since it creates a dependency of the shared library
9717# to LIBS. This, in turn, means that applications linking the shared libpython
9718# don't need to link LIBS explicitly. The default should be only changed
9719# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009720
Matthias Kloseb9621712010-04-24 17:59:49 +00009721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9722$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009723case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009724 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009725 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009726esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9728$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009729
9730
Guido van Rossum627b2d71993-12-24 10:39:16 +00009731# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9733$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009734if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009735 $as_echo_n "(cached) " >&6
9736else
9737 ac_check_lib_save_LIBS=$LIBS
9738LIBS="-lsendfile $LIBS"
9739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9740/* end confdefs.h. */
9741
9742/* Override any GCC internal prototype to avoid an error.
9743 Use char because int might match the return type of a GCC
9744 builtin and then its argument prototype would still apply. */
9745#ifdef __cplusplus
9746extern "C"
9747#endif
9748char sendfile ();
9749int
9750main ()
9751{
9752return sendfile ();
9753 ;
9754 return 0;
9755}
9756_ACEOF
9757if ac_fn_c_try_link "$LINENO"; then :
9758 ac_cv_lib_sendfile_sendfile=yes
9759else
9760 ac_cv_lib_sendfile_sendfile=no
9761fi
9762rm -f core conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
9764LIBS=$ac_check_lib_save_LIBS
9765fi
9766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9767$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009768if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009769 cat >>confdefs.h <<_ACEOF
9770#define HAVE_LIBSENDFILE 1
9771_ACEOF
9772
9773 LIBS="-lsendfile $LIBS"
9774
9775fi
9776
Matthias Kloseb9621712010-04-24 17:59:49 +00009777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9778$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009779if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009781else
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009783LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787/* Override any GCC internal prototype to avoid an error.
9788 Use char because int might match the return type of a GCC
9789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009790#ifdef __cplusplus
9791extern "C"
9792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009793char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009794int
9795main ()
9796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 ;
9799 return 0;
9800}
9801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009802if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009804else
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009807rm -f core conftest.err conftest.$ac_objext \
9808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009809LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9812$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009813if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 cat >>confdefs.h <<_ACEOF
9815#define HAVE_LIBDL 1
9816_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009817
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009818 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009819
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009820fi
9821 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9823$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009824if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009826else
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009828LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832/* Override any GCC internal prototype to avoid an error.
9833 Use char because int might match the return type of a GCC
9834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009835#ifdef __cplusplus
9836extern "C"
9837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009838char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009839int
9840main ()
9841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009843 ;
9844 return 0;
9845}
9846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009849else
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009852rm -f core conftest.err conftest.$ac_objext \
9853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009854LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9857$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009858if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 cat >>confdefs.h <<_ACEOF
9860#define HAVE_LIBDLD 1
9861_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009862
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009863 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009864
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009865fi
9866 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009867
Michael Felt0d3ccb42017-12-30 22:39:20 +01009868# checks for uuid.h location
9869for ac_header in uuid/uuid.h uuid.h
9870do :
9871 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9872ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9873if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9874 cat >>confdefs.h <<_ACEOF
9875#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9876_ACEOF
9877
9878fi
9879
9880done
9881
9882
Berker Peksag9a10ff42017-11-08 23:09:16 +03009883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9884$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9886/* end confdefs.h. */
9887#include <uuid/uuid.h>
9888int
9889main ()
9890{
9891
9892#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009893void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009894#endif
9895
9896 ;
9897 return 0;
9898}
9899_ACEOF
9900if ac_fn_c_try_compile "$LINENO"; then :
9901
9902$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9903
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9905$as_echo "yes" >&6; }
9906else
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9908$as_echo "no" >&6; }
9909
9910fi
9911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9912
Michael Felt0d3ccb42017-12-30 22:39:20 +01009913# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009914# FreeBSD and OpenBSD provides support as well
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9916$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9918/* end confdefs.h. */
9919#include <uuid.h>
9920int
9921main ()
9922{
9923
9924#ifndef uuid_create
9925void *x = uuid_create
9926#endif
9927
9928 ;
9929 return 0;
9930}
9931_ACEOF
9932if ac_fn_c_try_compile "$LINENO"; then :
9933
9934$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9935
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9937$as_echo "yes" >&6; }
9938else
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9940$as_echo "no" >&6; }
9941
9942fi
9943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9944
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009945# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9946# stream in big-endian byte-order
9947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9948$as_echo_n "checking for uuid_enc_be... " >&6; }
9949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9950/* end confdefs.h. */
9951#include <uuid.h>
9952int
9953main ()
9954{
9955
9956#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009957void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009958#endif
9959
9960 ;
9961 return 0;
9962}
9963_ACEOF
9964if ac_fn_c_try_compile "$LINENO"; then :
9965
9966$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9967
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9969$as_echo "yes" >&6; }
9970else
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972$as_echo "no" >&6; }
9973
9974fi
9975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9976
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009977# 'Real Time' functions on Solaris
9978# posix4 on Solaris 2.6
9979# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009981$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009982if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009984else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009985 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009989/* Override any GCC internal prototype to avoid an error.
9990 Use char because int might match the return type of a GCC
9991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009995char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009996int
9997main ()
9998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 ;
10001 return 0;
10002}
10003_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004for ac_lib in '' pthread rt posix4; do
10005 if test -z "$ac_lib"; then
10006 ac_res="none required"
10007 else
10008 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010009 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010010 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010014rm -f core conftest.err conftest.$ac_objext \
10015 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +020010016 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019done
Victor Stinnere0be4232011-10-25 13:06:09 +020010020if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022else
10023 ac_cv_search_sem_init=no
10024fi
10025rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010026LIBS=$ac_func_search_save_LIBS
10027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10029$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +000010031if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010033
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010034fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010035
Martin v. Löwis519adae2003-09-20 10:47:47 +000010036
Martin v. Löwis19d17342003-06-14 21:03:05 +000010037# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +000010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10039$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010040if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010041 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000010042else
10043 ac_check_lib_save_LIBS=$LIBS
10044LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048/* Override any GCC internal prototype to avoid an error.
10049 Use char because int might match the return type of a GCC
10050 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010051#ifdef __cplusplus
10052extern "C"
10053#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010054char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010055int
10056main ()
10057{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010059 ;
10060 return 0;
10061}
10062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010063if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010064 ac_cv_lib_intl_textdomain=yes
10065else
Matthias Kloseb9621712010-04-24 17:59:49 +000010066 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010068rm -f core conftest.err conftest.$ac_objext \
10069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010070LIBS=$ac_check_lib_save_LIBS
10071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10073$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010074if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010075
Matthias Kloseb9621712010-04-24 17:59:49 +000010076$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010077
Brett Cannonc6d936e2009-06-07 20:09:53 +000010078 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010079fi
10080
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010081
10082# checks for system dependent C++ extensions support
10083case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010084 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10085$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010087/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010088
Georg Brandl59e87bd2011-02-15 19:48:59 +000010089 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010090int
10091main ()
10092{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010093loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 ;
10095 return 0;
10096}
Matthias Kloseb159a552010-04-25 21:00:44 +000010097
Martin v. Löwis11437992002-04-12 09:54:03 +000010098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010099if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010100
Matthias Kloseb159a552010-04-25 21:00:44 +000010101
Matthias Kloseb9621712010-04-24 17:59:49 +000010102$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010103
Matthias Kloseb159a552010-04-25 21:00:44 +000010104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010105$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010106
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010107else
Matthias Kloseb159a552010-04-25 21:00:44 +000010108
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010110$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010111
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010113rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010114 conftest$ac_exeext conftest.$ac_ext
10115# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10116# of the AIX system used to build/package Python executable. This tag serves
10117# as a baseline for bdist module packages
10118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10119$as_echo_n "checking for the system builddate... " >&6; }
10120 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10121
10122cat >>confdefs.h <<_ACEOF
10123#define AIX_BUILDDATE $AIX_BUILDDATE
10124_ACEOF
10125
10126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10127$as_echo "$AIX_BUILDDATE" >&6; }
10128 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010129 *) ;;
10130esac
10131
Christian Heimes985ecdc2013-11-20 11:46:18 +010010132# check for systems that require aligned memory access
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10134$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010135if ${ac_cv_aligned_required+:} false; then :
10136 $as_echo_n "(cached) " >&6
10137else
10138 if test "$cross_compiling" = yes; then :
10139 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010140else
10141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10142/* end confdefs.h. */
10143
10144int main()
10145{
10146 char s[16];
10147 int i, *p1, *p2;
10148 for (i=0; i < 16; i++)
10149 s[i] = i;
10150 p1 = (int*)(s+1);
10151 p2 = (int*)(s+2);
10152 if (*p1 == *p2)
10153 return 1;
10154 return 0;
10155}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010156_ACEOF
10157if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010158 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010159else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010160 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010161fi
10162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10163 conftest.$ac_objext conftest.beam conftest.$ac_ext
10164fi
10165
10166
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010167fi
10168
10169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10170$as_echo "$ac_cv_aligned_required" >&6; }
10171if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010172
10173$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10174
10175fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010176
10177# str, bytes and memoryview hash algorithm
10178
10179
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10181$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10182
10183# Check whether --with-hash_algorithm was given.
10184if test "${with_hash_algorithm+set}" = set; then :
10185 withval=$with_hash_algorithm;
10186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10187$as_echo "$withval" >&6; }
10188case "$withval" in
10189 siphash24)
10190 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10191
10192 ;;
10193 fnv)
10194 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10195
10196 ;;
10197 *)
10198 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10199 ;;
10200esac
10201
10202else
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10204$as_echo "default" >&6; }
10205fi
10206
10207
Paul Ganssle62972d92020-05-16 04:20:06 -040010208validate_tzpath() {
10209 # Checks that each element of hte path is an absolute path
10210 if test -z "$1"; then
10211 # Empty string is allowed: it indicates no system TZPATH
10212 return 0
10213 fi
10214
10215 # Bad paths are those that don't start with /
10216 if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
10217 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10218 return 1;
10219 fi
10220}
10221
10222TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10224$as_echo_n "checking for --with-tzpath... " >&6; }
10225
10226# Check whether --with-tzpath was given.
10227if test "${with_tzpath+set}" = set; then :
10228 withval=$with_tzpath;
10229case "$withval" in
10230 yes)
10231 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10232 ;;
10233 *)
10234 validate_tzpath "$withval"
10235 TZPATH="$withval"
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10237$as_echo "\"$withval\"" >&6; }
10238 ;;
10239esac
10240
10241else
10242 validate_tzpath "$TZPATH"
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10244$as_echo "\"$TZPATH\"" >&6; }
10245fi
10246
10247
10248
Charles-François Natalid30b0222014-05-08 23:08:51 +010010249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10250$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10251
10252# Check whether --with-address_sanitizer was given.
10253if test "${with_address_sanitizer+set}" = set; then :
10254 withval=$with_address_sanitizer;
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10256$as_echo "$withval" >&6; }
10257BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10258LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010259# ASan works by controlling memory allocation, our own malloc interferes.
10260with_pymalloc="no"
10261
10262else
10263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10264$as_echo "no" >&6; }
10265fi
10266
10267
10268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10269$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10270
10271# Check whether --with-memory_sanitizer was given.
10272if test "${with_memory_sanitizer+set}" = set; then :
10273 withval=$with_memory_sanitizer;
10274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10275$as_echo "$withval" >&6; }
10276BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10277LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10278# MSan works by controlling memory allocation, our own malloc interferes.
10279with_pymalloc="no"
10280
10281else
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286
10287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10288$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10289
10290# Check whether --with-undefined_behavior_sanitizer was given.
10291if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10292 withval=$with_undefined_behavior_sanitizer;
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10294$as_echo "$withval" >&6; }
10295BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10296LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010297
10298else
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300$as_echo "no" >&6; }
10301fi
10302
10303
Guido van Rossum70c7f481998-03-26 18:44:10 +000010304# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10306$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010307if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010309else
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010311LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315/* Override any GCC internal prototype to avoid an error.
10316 Use char because int might match the return type of a GCC
10317 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010318#ifdef __cplusplus
10319extern "C"
10320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010321char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010322int
10323main ()
10324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010325return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010332else
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010335rm -f core conftest.err conftest.$ac_objext \
10336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010337LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10340$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010341if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010342 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010343fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010344 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10346$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010347if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010349else
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010351LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355/* Override any GCC internal prototype to avoid an error.
10356 Use char because int might match the return type of a GCC
10357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010358#ifdef __cplusplus
10359extern "C"
10360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010361char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010362int
10363main ()
10364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010365return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 ;
10367 return 0;
10368}
10369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010370if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010372else
Matthias Kloseb9621712010-04-24 17:59:49 +000010373 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010375rm -f core conftest.err conftest.$ac_objext \
10376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010377LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10380$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010381if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010382 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010383fi
10384 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010385
Matthias Kloseb9621712010-04-24 17:59:49 +000010386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10387$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010390if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10393$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010394LIBS="$withval $LIBS"
10395
10396else
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399fi
10400
Guido van Rossum7f43da71994-08-01 12:15:30 +000010401
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010402
10403
10404
10405
10406
10407
Victor Stinnerb477d192020-01-22 22:48:16 +010010408
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010409if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10410 if test -n "$ac_tool_prefix"; then
10411 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10412set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10414$as_echo_n "checking for $ac_word... " >&6; }
10415if ${ac_cv_path_PKG_CONFIG+:} false; then :
10416 $as_echo_n "(cached) " >&6
10417else
10418 case $PKG_CONFIG in
10419 [\\/]* | ?:[\\/]*)
10420 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10421 ;;
10422 *)
10423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10424for as_dir in $PATH
10425do
10426 IFS=$as_save_IFS
10427 test -z "$as_dir" && as_dir=.
10428 for ac_exec_ext in '' $ac_executable_extensions; do
10429 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10430 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10431 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10432 break 2
10433 fi
10434done
10435 done
10436IFS=$as_save_IFS
10437
10438 ;;
10439esac
10440fi
10441PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10442if test -n "$PKG_CONFIG"; then
10443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10444$as_echo "$PKG_CONFIG" >&6; }
10445else
10446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
10448fi
10449
10450
10451fi
10452if test -z "$ac_cv_path_PKG_CONFIG"; then
10453 ac_pt_PKG_CONFIG=$PKG_CONFIG
10454 # Extract the first word of "pkg-config", so it can be a program name with args.
10455set dummy pkg-config; ac_word=$2
10456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10457$as_echo_n "checking for $ac_word... " >&6; }
10458if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10459 $as_echo_n "(cached) " >&6
10460else
10461 case $ac_pt_PKG_CONFIG in
10462 [\\/]* | ?:[\\/]*)
10463 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10464 ;;
10465 *)
10466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10467for as_dir in $PATH
10468do
10469 IFS=$as_save_IFS
10470 test -z "$as_dir" && as_dir=.
10471 for ac_exec_ext in '' $ac_executable_extensions; do
10472 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10473 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10474 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10475 break 2
10476 fi
10477done
10478 done
10479IFS=$as_save_IFS
10480
10481 ;;
10482esac
10483fi
10484ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10485if test -n "$ac_pt_PKG_CONFIG"; then
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10487$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10488else
10489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10490$as_echo "no" >&6; }
10491fi
10492
10493 if test "x$ac_pt_PKG_CONFIG" = x; then
10494 PKG_CONFIG=""
10495 else
10496 case $cross_compiling:$ac_tool_warned in
10497yes:)
10498{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10499$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10500ac_tool_warned=yes ;;
10501esac
10502 PKG_CONFIG=$ac_pt_PKG_CONFIG
10503 fi
10504else
10505 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10506fi
10507
10508fi
10509if test -n "$PKG_CONFIG"; then
10510 _pkg_min_version=0.9.0
10511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10512$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10513 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10515$as_echo "yes" >&6; }
10516 else
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10518$as_echo "no" >&6; }
10519 PKG_CONFIG=""
10520 fi
10521fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010522
10523# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10525$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010526
10527# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010528if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010529 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010530else
10531 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010532fi
10533
10534
Matthias Kloseb9621712010-04-24 17:59:49 +000010535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10536$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010537
10538# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10540$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010541
10542# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010543if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010544 withval=$with_system_ffi;
10545fi
10546
10547
Zachary Waref40d4dd2016-09-17 01:25:24 -050010548if test "$ac_sys_system" = "Darwin"
10549then
10550 case "$with_system_ffi" in
10551 "")
10552 with_system_ffi="no"
10553 ;;
10554 yes|no)
10555 ;;
10556 *)
10557 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10558 ;;
10559 esac
10560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10561$as_echo "$with_system_ffi" >&6; }
10562else
10563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10564$as_echo "yes" >&6; }
10565 if test "$with_system_ffi" != ""
10566 then
10567 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10568$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10569 fi
10570 with_system_ffi="yes"
10571fi
Zachary Ware935043d2016-09-09 17:01:21 -070010572
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010573if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010574 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10575else
10576 LIBFFI_INCLUDEDIR=""
10577fi
10578
10579
Stefan Krah60187b52012-03-23 19:06:27 +010010580# Check for use of the system libmpdec library
10581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10582$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10583
10584# Check whether --with-system_libmpdec was given.
10585if test "${with_system_libmpdec+set}" = set; then :
10586 withval=$with_system_libmpdec;
10587else
10588 with_system_libmpdec="no"
10589fi
10590
10591
10592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10593$as_echo "$with_system_libmpdec" >&6; }
10594
Stefan Krah815280e2020-02-29 19:43:42 +010010595# Check whether _decimal should use a coroutine-local or thread-local context
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10597$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10598
10599# Check whether --with-decimal_contextvar was given.
10600if test "${with_decimal_contextvar+set}" = set; then :
10601 withval=$with_decimal_contextvar;
10602else
10603 with_decimal_contextvar="yes"
10604fi
10605
10606
10607if test "$with_decimal_contextvar" != "no"
10608then
10609
10610$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10611
10612fi
10613
10614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10615$as_echo "$with_decimal_contextvar" >&6; }
10616
Benjamin Peterson076ed002010-10-31 17:11:02 +000010617# Check for support for loadable sqlite extensions
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10619$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10620# Check whether --enable-loadable-sqlite-extensions was given.
10621if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10622 enableval=$enable_loadable_sqlite_extensions;
10623else
10624 enable_loadable_sqlite_extensions="no"
10625fi
10626
10627
10628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10629$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10630
Ned Deilyd819b932013-09-06 01:07:05 -070010631# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10632
10633
10634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10635$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10636
10637# Check whether --with-tcltk-includes was given.
10638if test "${with_tcltk_includes+set}" = set; then :
10639 withval=$with_tcltk_includes;
10640else
10641 with_tcltk_includes="default"
10642fi
10643
10644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10645$as_echo "$with_tcltk_includes" >&6; }
10646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10647$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10648
10649# Check whether --with-tcltk-libs was given.
10650if test "${with_tcltk_libs+set}" = set; then :
10651 withval=$with_tcltk_libs;
10652else
10653 with_tcltk_libs="default"
10654fi
10655
10656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10657$as_echo "$with_tcltk_libs" >&6; }
10658if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10659then
10660 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10661 then
10662 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10663 fi
10664 TCLTK_INCLUDES=""
10665 TCLTK_LIBS=""
10666else
10667 TCLTK_INCLUDES="$with_tcltk_includes"
10668 TCLTK_LIBS="$with_tcltk_libs"
10669fi
10670
Matthias Klose55708cc2009-04-30 08:06:49 +000010671# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10673$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010674
10675# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010676if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010677 withval=$with_dbmliborder;
10678if test x$with_dbmliborder = xyes
10679then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010680as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010681else
10682 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10683 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10684 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010685 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010686 fi
10687 done
10688fi
10689fi
10690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10692$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010693
Martin v. Löwis11437992002-04-12 09:54:03 +000010694# Templates for things AC_DEFINEd more than once.
10695# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010696
10697
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010698if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010699then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010700 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010702
10703 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010704 if test "$ac_sys_system" = "SunOS"; then
10705 CFLAGS="$CFLAGS -D_REENTRANT"
10706 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010707elif test "$ac_cv_kpthread" = "yes"
10708then
10709 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010710 if test "$ac_cv_cxx_thread" = "yes"; then
10711 CXX="$CXX -Kpthread"
10712 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010713 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010714elif test "$ac_cv_kthread" = "yes"
10715then
10716 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010717 if test "$ac_cv_cxx_thread" = "yes"; then
10718 CXX="$CXX -Kthread"
10719 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010720 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010721elif test "$ac_cv_pthread" = "yes"
10722then
10723 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010724 if test "$ac_cv_cxx_thread" = "yes"; then
10725 CXX="$CXX -pthread"
10726 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010727 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010728else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010729 if test ! -z "$withval" -a -d "$withval"
10730 then LDFLAGS="$LDFLAGS -L$withval"
10731 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010732
10733 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010734 # define _POSIX_THREADS in unistd.h. Some apparently don't
10735 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10737$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010739/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010740
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010741#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010742#ifdef _POSIX_THREADS
10743yes
10744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010745
10746_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010749 unistd_defines_pthreads=yes
10750else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010751 unistd_defines_pthreads=no
10752fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010753rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10756$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010759
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010760 # Just looking for pthread_create in libpthread is not enough:
10761 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10762 # So we really have to include pthread.h, and then link.
10763 _libs=$LIBS
10764 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10766$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010768/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010769
10770#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010771#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010772
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010773void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010774int
10775main ()
10776{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010777
10778pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 ;
10780 return 0;
10781}
10782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010783if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10786$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010787 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010788
Guido van Rossum02a1c402000-02-25 19:26:31 +000010789else
Martin v. Löwis11437992002-04-12 09:54:03 +000010790
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010791 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010793if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010794
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010795 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010796
Guido van Rossumad678af1998-10-02 14:42:15 +000010797else
Guido van Rossumad678af1998-10-02 14:42:15 +000010798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10800$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010801if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010803else
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010805LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809/* Override any GCC internal prototype to avoid an error.
10810 Use char because int might match the return type of a GCC
10811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010812#ifdef __cplusplus
10813extern "C"
10814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010815char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010816int
10817main ()
10818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010819return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010820 ;
10821 return 0;
10822}
10823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010824if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010826else
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010829rm -f core conftest.err conftest.$ac_objext \
10830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010831LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10834$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010835if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010836
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010837 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010838 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010839
Greg Steinadf63d62000-07-05 10:38:09 +000010840else
Greg Steinadf63d62000-07-05 10:38:09 +000010841
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10843$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010844if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010846else
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010848LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010852/* Override any GCC internal prototype to avoid an error.
10853 Use char because int might match the return type of a GCC
10854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010855#ifdef __cplusplus
10856extern "C"
10857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010858char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010859int
10860main ()
10861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010863 ;
10864 return 0;
10865}
10866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010867if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010869else
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010872rm -f core conftest.err conftest.$ac_objext \
10873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010874LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10877$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010878if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010879
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010880 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010881 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010882
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010883else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010884
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10886$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010887if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010889else
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010891LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010895/* Override any GCC internal prototype to avoid an error.
10896 Use char because int might match the return type of a GCC
10897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010898#ifdef __cplusplus
10899extern "C"
10900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010901char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010902int
10903main ()
10904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010906 ;
10907 return 0;
10908}
10909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010910if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010911 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010912else
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010915rm -f core conftest.err conftest.$ac_objext \
10916 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010917LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10920$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010921if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010922
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010923 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010924 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010925
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010926else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10929$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010930if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010932else
Martin v. Löwis11437992002-04-12 09:54:03 +000010933 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010934LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010938/* Override any GCC internal prototype to avoid an error.
10939 Use char because int might match the return type of a GCC
10940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010941#ifdef __cplusplus
10942extern "C"
10943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010944char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010945int
10946main ()
10947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010949 ;
10950 return 0;
10951}
10952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010953if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010954 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010955else
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010958rm -f core conftest.err conftest.$ac_objext \
10959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010960LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10963$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010964if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010965
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010966 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010967 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010968
Guido van Rossumb93a8621998-05-07 13:27:32 +000010969else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010970
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010971 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10972
Guido van Rossum2d38f911996-06-26 19:47:01 +000010973fi
10974
Guido van Rossum627b2d71993-12-24 10:39:16 +000010975
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010976fi
10977
Guido van Rossum0be3e491997-05-22 20:33:33 +000010978fi
10979
Guido van Rossum49545951997-12-02 19:28:29 +000010980fi
10981
Guido van Rossumb93a8621998-05-07 13:27:32 +000010982fi
10983
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010985rm -f core conftest.err conftest.$ac_objext \
10986 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10989$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010990if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010992else
Martin v. Löwis11437992002-04-12 09:54:03 +000010993 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010994LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998/* Override any GCC internal prototype to avoid an error.
10999 Use char because int might match the return type of a GCC
11000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011001#ifdef __cplusplus
11002extern "C"
11003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011004char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011005int
11006main ()
11007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011009 ;
11010 return 0;
11011}
11012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011015else
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011018rm -f core conftest.err conftest.$ac_objext \
11019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011020LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11023$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011024if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011025
Martin v. Löwis130fb172001-07-19 11:00:41 +000011026 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011027
Guido van Rossum627b2d71993-12-24 10:39:16 +000011028fi
11029
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011030
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011031fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011032
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011033if test "$posix_threads" = "yes"; then
11034 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011037
11038 fi
11039
11040 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11041 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011042 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011043$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011044
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011045 ;;
11046 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011047$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011048
11049 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011050 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011052
11053 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011054 esac
11055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11057$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011058 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011060else
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011062 ac_cv_pthread_system_supported=no
11063else
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011065/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011066
11067 #include <stdio.h>
11068 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011069 void *foo(void *parm) {
11070 return NULL;
11071 }
11072 main() {
11073 pthread_attr_t attr;
11074 pthread_t id;
11075 if (pthread_attr_init(&attr)) exit(-1);
11076 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11077 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11078 exit(0);
11079 }
11080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011081if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011082 ac_cv_pthread_system_supported=yes
11083else
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011088fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011090
Guido van Rossum627b2d71993-12-24 10:39:16 +000011091fi
11092
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11094$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011095 if test "$ac_cv_pthread_system_supported" = "yes"; then
11096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011098
11099 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 for ac_func in pthread_sigmask
11101do :
11102 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011103if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011104 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011105#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011106_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011107 case $ac_sys_system in
11108 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011109
Matthias Kloseb9621712010-04-24 17:59:49 +000011110$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011111
11112 ;;
11113 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011114fi
11115done
11116
pdoxe14679c2017-10-05 00:01:56 -070011117 for ac_func in pthread_getcpuclockid
11118do :
11119 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11120if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11121 cat >>confdefs.h <<_ACEOF
11122#define HAVE_PTHREAD_GETCPUCLOCKID 1
11123_ACEOF
11124
11125fi
11126done
11127
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011128fi
11129
11130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11134$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011136if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011137 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141 ipv6=no
11142 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11144$as_echo "yes" >&6; }
11145 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011146
11147 ipv6=yes
11148 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011149 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150else
Martin v. Löwis11437992002-04-12 09:54:03 +000011151
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011153/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011154 /* AF_INET6 available check */
11155#include <sys/types.h>
11156#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011157int
11158main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011159{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011160int domain = AF_INET6;
11161 ;
11162 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011163}
Martin v. Löwis11437992002-04-12 09:54:03 +000011164_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011165if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011166
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11168$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011169 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011171else
Matthias Kloseb159a552010-04-25 21:00:44 +000011172
Matthias Kloseb9621712010-04-24 17:59:49 +000011173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011175 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011176
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011177fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011179
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011180if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11182$as_echo_n "checking if RFC2553 API is available... " >&6; }
11183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011185
11186 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011187#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011188int
11189main ()
11190{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011191struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011192 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011193 ;
11194 return 0;
11195}
Matthias Kloseb159a552010-04-25 21:00:44 +000011196
Martin v. Löwis11437992002-04-12 09:54:03 +000011197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011198if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011199
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011201$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011202 ipv6=yes
11203
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011204else
Matthias Kloseb159a552010-04-25 21:00:44 +000011205
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011207$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011208 ipv6=no
11209
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011212fi
11213
11214if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011215 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011216
11217fi
11218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219fi
11220
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011221
11222ipv6type=unknown
11223ipv6lib=none
11224ipv6trylibc=no
11225
11226if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11228$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011229 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11230 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011231 case $i in
11232 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011235
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011236#include <netinet/in.h>
11237#ifdef IPV6_INRIA_VERSION
11238yes
11239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011240_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011243 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011244fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011245rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011246
11247 ;;
11248 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011250/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011251
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011252#include <netinet/in.h>
11253#ifdef __KAME__
11254yes
11255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011256_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011259 ipv6type=$i;
11260 ipv6lib=inet6
11261 ipv6libdir=/usr/local/v6/lib
11262 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011263fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011264rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011265
11266 ;;
11267 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011269/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011270
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011271#include <features.h>
11272#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11273yes
11274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011275_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011277 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011278 ipv6type=$i;
11279 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011280fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011281rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011282
11283 ;;
11284 linux-inet6)
11285 if test -d /usr/inet6; then
11286 ipv6type=$i
11287 ipv6lib=inet6
11288 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011289 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011290 fi
11291 ;;
11292 solaris)
11293 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011294 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011295 ipv6type=$i
11296 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011297 fi
11298 fi
11299 ;;
11300 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011303
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304#include <sys/param.h>
11305#ifdef _TOSHIBA_INET6
11306yes
11307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011308_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011311 ipv6type=$i;
11312 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011313 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011314fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011315rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011316
11317 ;;
11318 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011321
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011322#include </usr/local/v6/include/sys/v6config.h>
11323#ifdef __V6D__
11324yes
11325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011326_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011328 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011329 ipv6type=$i;
11330 ipv6lib=v6;
11331 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011332 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011333fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011334rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011335
11336 ;;
11337 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011339/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011340
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011341#include <sys/param.h>
11342#ifdef _ZETA_MINAMI_INET6
11343yes
11344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011345_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011347 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011348 ipv6type=$i;
11349 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011350 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011351fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011352rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011353
11354 ;;
11355 esac
11356 if test "$ipv6type" != "unknown"; then
11357 break
11358 fi
11359 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11361$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362fi
11363
11364if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11365 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11366 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11367 echo "using lib$ipv6lib"
11368 else
11369 if test $ipv6trylibc = "yes"; then
11370 echo "using libc"
11371 else
11372 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11373 echo "You need to fetch lib$ipv6lib.a from appropriate"
11374 echo 'ipv6 kit and compile beforehand.'
11375 exit 1
11376 fi
11377 fi
11378fi
11379
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11381$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11383/* end confdefs.h. */
11384 /* CAN_RAW_FD_FRAMES available check */
11385#include <linux/can/raw.h>
11386int
11387main ()
11388{
11389int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394if ac_fn_c_try_compile "$LINENO"; then :
11395
11396
11397$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11398
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11400$as_echo "yes" >&6; }
11401
11402else
11403
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11405$as_echo "no" >&6; }
11406
11407fi
11408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11409
Zackery Spytz97e0de02020-04-09 06:03:49 -060011410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11411$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11413/* end confdefs.h. */
11414
11415#include <linux/can/raw.h>
11416int
11417main ()
11418{
11419int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11420 ;
11421 return 0;
11422}
11423_ACEOF
11424if ac_fn_c_try_compile "$LINENO"; then :
11425
11426
11427$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11428
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11430$as_echo "yes" >&6; }
11431
11432else
11433
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435$as_echo "no" >&6; }
11436
11437fi
11438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11439
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011440# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11442$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011445if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446 withval=$with_doc_strings;
11447fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011448
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011449
11450if test -z "$with_doc_strings"
11451then with_doc_strings="yes"
11452fi
11453if test "$with_doc_strings" != "no"
11454then
11455
Matthias Kloseb9621712010-04-24 17:59:49 +000011456$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011457
11458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11460$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011461
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011462# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11464$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011467if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468 withval=$with_pymalloc;
11469fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011470
Neil Schemenauera35c6882001-02-27 04:45:05 +000011471
Neil Schemenauer16c22972002-03-22 15:34:49 +000011472if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011473then
11474 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011475fi
11476if test "$with_pymalloc" != "no"
11477then
Martin v. Löwis11437992002-04-12 09:54:03 +000011478
Matthias Kloseb9621712010-04-24 17:59:49 +000011479$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011480
11481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11483$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011484
Nick Coghlan6ea41862017-06-11 13:16:15 +100011485# Check for --with-c-locale-coercion
11486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11487$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11488
11489# Check whether --with-c-locale-coercion was given.
11490if test "${with_c_locale_coercion+set}" = set; then :
11491 withval=$with_c_locale_coercion;
11492fi
11493
11494
11495if test -z "$with_c_locale_coercion"
11496then
11497 with_c_locale_coercion="yes"
11498fi
11499if test "$with_c_locale_coercion" != "no"
11500then
11501
11502$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11503
11504fi
11505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11506$as_echo "$with_c_locale_coercion" >&6; }
11507
Benjamin Peterson05159c42009-12-03 03:01:27 +000011508# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11510$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011511
11512# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011513if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011514 withval=$with_valgrind;
11515else
11516 with_valgrind=no
11517fi
11518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11520$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011521if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 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 +020011523if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011524
Matthias Kloseb9621712010-04-24 17:59:49 +000011525$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011526
11527else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011528 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011529
11530fi
11531
11532
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011533 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011534fi
11535
Łukasz Langaa785c872016-09-09 17:37:37 -070011536# Check for DTrace support
11537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11538$as_echo_n "checking for --with-dtrace... " >&6; }
11539
11540# Check whether --with-dtrace was given.
11541if test "${with_dtrace+set}" = set; then :
11542 withval=$with_dtrace;
11543else
11544 with_dtrace=no
11545fi
11546
11547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11548$as_echo "$with_dtrace" >&6; }
11549
11550
11551
11552
11553
11554DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011555DTRACE_HEADERS=
11556DTRACE_OBJS=
11557
11558if test "$with_dtrace" = "yes"
11559then
11560 # Extract the first word of "dtrace", so it can be a program name with args.
11561set dummy dtrace; ac_word=$2
11562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11563$as_echo_n "checking for $ac_word... " >&6; }
11564if ${ac_cv_path_DTRACE+:} false; then :
11565 $as_echo_n "(cached) " >&6
11566else
11567 case $DTRACE in
11568 [\\/]* | ?:[\\/]*)
11569 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11570 ;;
11571 *)
11572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11573for as_dir in $PATH
11574do
11575 IFS=$as_save_IFS
11576 test -z "$as_dir" && as_dir=.
11577 for ac_exec_ext in '' $ac_executable_extensions; do
11578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11579 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11581 break 2
11582 fi
11583done
11584 done
11585IFS=$as_save_IFS
11586
11587 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11588 ;;
11589esac
11590fi
11591DTRACE=$ac_cv_path_DTRACE
11592if test -n "$DTRACE"; then
11593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11594$as_echo "$DTRACE" >&6; }
11595else
11596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597$as_echo "no" >&6; }
11598fi
11599
11600
11601 if test "$DTRACE" = "not found"; then
11602 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11603 fi
11604
11605$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11606
11607 DTRACE_HEADERS="Include/pydtrace_probes.h"
11608
11609 # On OS X, DTrace providers do not need to be explicitly compiled and
11610 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11611 # generation flag '-G'. We check for presence of this flag, rather than
11612 # hardcoding support by OS, in the interest of robustness.
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11614$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11615if ${ac_cv_dtrace_link+:} false; then :
11616 $as_echo_n "(cached) " >&6
11617else
11618 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011619 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011620 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011621 ac_cv_dtrace_link=yes
11622
11623fi
11624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11625$as_echo "$ac_cv_dtrace_link" >&6; }
11626 if test "$ac_cv_dtrace_link" = "yes"; then
11627 DTRACE_OBJS="Python/pydtrace.o"
11628 fi
11629fi
11630
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011631# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011632
Guido van Rossum98935bf2001-09-05 19:13:16 +000011633DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011634
Guido van Rossume97ee181999-12-20 21:27:22 +000011635# the dlopen() function means we might want to use dynload_shlib.o. some
11636# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011637for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011638do :
11639 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011640if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011641 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011642#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011643_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011644
Guido van Rossume97ee181999-12-20 21:27:22 +000011645fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011646done
Guido van Rossume97ee181999-12-20 21:27:22 +000011647
Michael W. Hudson54241132001-12-07 15:38:26 +000011648
Guido van Rossume97ee181999-12-20 21:27:22 +000011649# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11650# loading of modules.
11651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11653$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011654if test -z "$DYNLOADFILE"
11655then
11656 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011657 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11658 if test "$ac_cv_func_dlopen" = yes
11659 then DYNLOADFILE="dynload_shlib.o"
11660 else DYNLOADFILE="dynload_aix.o"
11661 fi
11662 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011663 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011664 *)
11665 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11666 # out any dynamic loading
11667 if test "$ac_cv_func_dlopen" = yes
11668 then DYNLOADFILE="dynload_shlib.o"
11669 else DYNLOADFILE="dynload_stub.o"
11670 fi
11671 ;;
11672 esac
11673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11675$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011676if test "$DYNLOADFILE" != "dynload_stub.o"
11677then
Martin v. Löwis11437992002-04-12 09:54:03 +000011678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011680
11681fi
11682
Neil Schemenauer4e425612001-06-19 15:44:15 +000011683# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11684
Michael W. Hudson54241132001-12-07 15:38:26 +000011685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11687$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011688if test -z "$MACHDEP_OBJS"
11689then
Jack Jansene578a632001-08-15 01:27:14 +000011690 MACHDEP_OBJS=$extra_machdep_objs
11691else
11692 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011693fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011694if test -z "$MACHDEP_OBJS"; then
11695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11696$as_echo "none" >&6; }
11697else
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11699$as_echo "$MACHDEP_OBJS" >&6; }
11700fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011701
Guido van Rossum627b2d71993-12-24 10:39:16 +000011702# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011703for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011704 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11705 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011706 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011707 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011708 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011709 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011710 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011711 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011712 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011713 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011714 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011715 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011716 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011717 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011718 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011719 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011720 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011721 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11722 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011723 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011724 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011725 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011726 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011727 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011728do :
11729 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11730ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011731if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011732 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011733#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011734_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011735
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011736fi
11737done
11738
Michael W. Hudson54241132001-12-07 15:38:26 +000011739
Benjamin Peterson40caa052018-09-12 15:52:40 -070011740# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11741# links. Some libc implementations have a stub lchmod implementation that always
11742# returns an error.
11743if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011744 for ac_func in lchmod
11745do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011746 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11747if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011748 cat >>confdefs.h <<_ACEOF
11749#define HAVE_LCHMOD 1
11750_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011751
11752fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011753done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011754
11755fi
11756
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011757ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11758 #include <dirent.h>
11759"
11760if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11761
11762$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11763
11764fi
11765
11766
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011767# For some functions, having a definition is not sufficient, since
11768# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11770$as_echo_n "checking for chroot... " >&6; }
11771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011772/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011773#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011774int
11775main ()
11776{
11777void *x=chroot
11778 ;
11779 return 0;
11780}
11781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011782if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011785
Matthias Kloseb159a552010-04-25 21:00:44 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011787$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011791
11792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11795$as_echo_n "checking for link... " >&6; }
11796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011797/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011798#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011799int
11800main ()
11801{
11802void *x=link
11803 ;
11804 return 0;
11805}
11806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011810
Matthias Kloseb159a552010-04-25 21:00:44 +000011811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011812$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011813else
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11815$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011816
11817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11820$as_echo_n "checking for symlink... " >&6; }
11821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011822/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011823#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011824int
11825main ()
11826{
11827void *x=symlink
11828 ;
11829 return 0;
11830}
11831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011833
Matthias Kloseb9621712010-04-24 17:59:49 +000011834$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011835
Matthias Kloseb159a552010-04-25 21:00:44 +000011836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011837$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11840$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011841
11842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11845$as_echo_n "checking for fchdir... " >&6; }
11846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011847/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011848#include <unistd.h>
11849int
11850main ()
11851{
11852void *x=fchdir
11853 ;
11854 return 0;
11855}
11856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011860
Matthias Kloseb159a552010-04-25 21:00:44 +000011861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011862$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11865$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011866
11867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11870$as_echo_n "checking for fsync... " >&6; }
11871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011872/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011873#include <unistd.h>
11874int
11875main ()
11876{
11877void *x=fsync
11878 ;
11879 return 0;
11880}
11881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011885
Matthias Kloseb159a552010-04-25 21:00:44 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011887$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11890$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011891
11892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11895$as_echo_n "checking for fdatasync... " >&6; }
11896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011897/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011898#include <unistd.h>
11899int
11900main ()
11901{
11902void *x=fdatasync
11903 ;
11904 return 0;
11905}
11906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011907if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011908
Matthias Kloseb9621712010-04-24 17:59:49 +000011909$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011910
Matthias Kloseb159a552010-04-25 21:00:44 +000011911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011912$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011913else
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11915$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011916
11917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11920$as_echo_n "checking for epoll... " >&6; }
11921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011922/* end confdefs.h. */
11923#include <sys/epoll.h>
11924int
11925main ()
11926{
11927void *x=epoll_create
11928 ;
11929 return 0;
11930}
11931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011932if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011933
Matthias Kloseb9621712010-04-24 17:59:49 +000011934$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011935
Matthias Kloseb159a552010-04-25 21:00:44 +000011936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011937$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011938else
Matthias Kloseb9621712010-04-24 17:59:49 +000011939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11940$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011941
11942fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11945$as_echo_n "checking for epoll_create1... " >&6; }
11946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11947/* end confdefs.h. */
11948#include <sys/epoll.h>
11949int
11950main ()
11951{
11952void *x=epoll_create1
11953 ;
11954 return 0;
11955}
11956_ACEOF
11957if ac_fn_c_try_compile "$LINENO"; then :
11958
11959$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11960
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11962$as_echo "yes" >&6; }
11963else
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11965$as_echo "no" >&6; }
11966
11967fi
11968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11970$as_echo_n "checking for kqueue... " >&6; }
11971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011972/* end confdefs.h. */
11973
11974#include <sys/types.h>
11975#include <sys/event.h>
11976
11977int
11978main ()
11979{
11980int x=kqueue()
11981 ;
11982 return 0;
11983}
11984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011985if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011986
Matthias Kloseb9621712010-04-24 17:59:49 +000011987$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011988
Matthias Kloseb159a552010-04-25 21:00:44 +000011989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11993$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011994
11995fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11998$as_echo_n "checking for prlimit... " >&6; }
11999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12000/* end confdefs.h. */
12001
12002#include <sys/time.h>
12003#include <sys/resource.h>
12004
12005int
12006main ()
12007{
12008void *x=prlimit
12009 ;
12010 return 0;
12011}
12012_ACEOF
12013if ac_fn_c_try_compile "$LINENO"; then :
12014
12015$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
12016
12017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12018$as_echo "yes" >&6; }
12019else
12020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12021$as_echo "no" >&6; }
12022
12023fi
12024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussorene8b1c032020-11-22 11:18:40 +010012025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12026$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
12027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12028/* end confdefs.h. */
12029#include <mach-o/dyld.h>
12030int
12031main ()
12032{
12033void *x=_dyld_shared_cache_contains_path
12034 ;
12035 return 0;
12036}
12037_ACEOF
12038if ac_fn_c_try_compile "$LINENO"; then :
12039
12040$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
12041
12042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12043$as_echo "yes" >&6; }
12044else
12045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046$as_echo "no" >&6; }
12047
12048fi
12049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012050
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12052$as_echo_n "checking for memfd_create... " >&6; }
12053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12054/* end confdefs.h. */
12055
12056#ifdef HAVE_SYS_MMAN_H
12057#include <sys/mman.h>
12058#endif
12059#ifdef HAVE_SYS_MEMFD_H
12060#include <sys/memfd.h>
12061#endif
12062
12063int
12064main ()
12065{
12066void *x=memfd_create
12067 ;
12068 return 0;
12069}
12070_ACEOF
12071if ac_fn_c_try_compile "$LINENO"; then :
12072
12073$as_echo "#define HAVE_MEMFD_CREATE 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
12083
Martin v. Löwisd5843682002-11-21 20:41:28 +000012084# On some systems (eg. FreeBSD 5), we would find a definition of the
12085# functions ctermid_r, setgroups in the library, but no prototype
12086# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12087# address to avoid compiler warnings and potential miscompilations
12088# because of the missing prototypes.
12089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12091$as_echo_n "checking for ctermid_r... " >&6; }
12092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012093/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012094
Martin v. Löwisd5843682002-11-21 20:41:28 +000012095#include <stdio.h>
12096
Martin v. Löwisd5843682002-11-21 20:41:28 +000012097int
12098main ()
12099{
12100void* p = ctermid_r
12101 ;
12102 return 0;
12103}
12104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012105if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012106
Matthias Kloseb9621712010-04-24 17:59:49 +000012107$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012108
Matthias Kloseb159a552010-04-25 21:00:44 +000012109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012110$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12113$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012114
12115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12117
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12119$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012121 $as_echo_n "(cached) " >&6
12122else
12123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012124/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012125#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012126int
12127main ()
12128{
12129void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012130
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012131 ;
12132 return 0;
12133}
12134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012135if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012136 ac_cv_flock_decl=yes
12137else
12138 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012139
12140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012142
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012143fi
12144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12145$as_echo "$ac_cv_flock_decl" >&6; }
12146if test "x${ac_cv_flock_decl}" = xyes; then
12147 for ac_func in flock
12148do :
12149 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012150if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012151 cat >>confdefs.h <<_ACEOF
12152#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012153_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012154
Antoine Pitroua3000072010-09-07 14:52:42 +000012155else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012157$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012158if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012159 $as_echo_n "(cached) " >&6
12160else
12161 ac_check_lib_save_LIBS=$LIBS
12162LIBS="-lbsd $LIBS"
12163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12164/* end confdefs.h. */
12165
12166/* Override any GCC internal prototype to avoid an error.
12167 Use char because int might match the return type of a GCC
12168 builtin and then its argument prototype would still apply. */
12169#ifdef __cplusplus
12170extern "C"
12171#endif
12172char flock ();
12173int
12174main ()
12175{
12176return flock ();
12177 ;
12178 return 0;
12179}
12180_ACEOF
12181if ac_fn_c_try_link "$LINENO"; then :
12182 ac_cv_lib_bsd_flock=yes
12183else
12184 ac_cv_lib_bsd_flock=no
12185fi
12186rm -f core conftest.err conftest.$ac_objext \
12187 conftest$ac_exeext conftest.$ac_ext
12188LIBS=$ac_check_lib_save_LIBS
12189fi
12190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12191$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012193 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012194
12195
12196$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12197
12198
12199fi
12200
12201
12202fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012203done
12204
Antoine Pitroua3000072010-09-07 14:52:42 +000012205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206
Matthias Kloseb9621712010-04-24 17:59:49 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12208$as_echo_n "checking for getpagesize... " >&6; }
12209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012210/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012211
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012212#include <unistd.h>
12213
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012214int
12215main ()
12216{
12217void* p = getpagesize
12218 ;
12219 return 0;
12220}
12221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012223
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012225
Matthias Kloseb159a552010-04-25 21:00:44 +000012226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012227$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012228else
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12230$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012231
12232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012234
Victor Stinner984890f2011-11-24 13:53:38 +010012235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12236$as_echo_n "checking for broken unsetenv... " >&6; }
12237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12238/* end confdefs.h. */
12239
12240#include <stdlib.h>
12241
12242int
12243main ()
12244{
12245int res = unsetenv("DUMMY")
12246 ;
12247 return 0;
12248}
12249_ACEOF
12250if ac_fn_c_try_compile "$LINENO"; then :
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12252$as_echo "no" >&6; }
12253else
12254
12255$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12256
12257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12258$as_echo "yes" >&6; }
12259
12260fi
12261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12262
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012263for ac_prog in true
12264do
12265 # Extract the first word of "$ac_prog", so it can be a program name with args.
12266set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12268$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012269if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012271else
12272 if test -n "$TRUE"; then
12273 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12274else
12275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12276for as_dir in $PATH
12277do
12278 IFS=$as_save_IFS
12279 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012282 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 $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 +000012284 break 2
12285 fi
12286done
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012289
12290fi
12291fi
12292TRUE=$ac_cv_prog_TRUE
12293if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12295$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012296else
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12298$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012299fi
12300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012302 test -n "$TRUE" && break
12303done
12304test -n "$TRUE" || TRUE="/bin/true"
12305
12306
Matthias Kloseb9621712010-04-24 17:59:49 +000012307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12308$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012309if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012311else
12312 ac_check_lib_save_LIBS=$LIBS
12313LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317/* Override any GCC internal prototype to avoid an error.
12318 Use char because int might match the return type of a GCC
12319 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012320#ifdef __cplusplus
12321extern "C"
12322#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012323char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012324int
12325main ()
12326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012328 ;
12329 return 0;
12330}
12331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012333 ac_cv_lib_c_inet_aton=yes
12334else
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012337rm -f core conftest.err conftest.$ac_objext \
12338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012339LIBS=$ac_check_lib_save_LIBS
12340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12342$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012343if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012344 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12347$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012348if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012349 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012350else
12351 ac_check_lib_save_LIBS=$LIBS
12352LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012354/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356/* Override any GCC internal prototype to avoid an error.
12357 Use char because int might match the return type of a GCC
12358 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012359#ifdef __cplusplus
12360extern "C"
12361#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012362char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012363int
12364main ()
12365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012367 ;
12368 return 0;
12369}
12370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012372 ac_cv_lib_resolv_inet_aton=yes
12373else
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012376rm -f core conftest.err conftest.$ac_objext \
12377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012378LIBS=$ac_check_lib_save_LIBS
12379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12381$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012382if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012383 cat >>confdefs.h <<_ACEOF
12384#define HAVE_LIBRESOLV 1
12385_ACEOF
12386
12387 LIBS="-lresolv $LIBS"
12388
12389fi
12390
12391
12392fi
12393
12394
Christian Heimesd0764e22007-12-04 15:00:33 +000012395# On Tru64, chflags seems to be present, but calling it will
12396# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12398$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012399if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012401else
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012403 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012404else
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012406/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012407
Christian Heimesd0764e22007-12-04 15:00:33 +000012408#include <sys/stat.h>
12409#include <unistd.h>
12410int main(int argc, char*argv[])
12411{
12412 if(chflags(argv[0], 0) != 0)
12413 return 1;
12414 return 0;
12415}
Ned Deily3eb67d52011-06-28 00:00:28 -070012416
Christian Heimesd0764e22007-12-04 15:00:33 +000012417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012418if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012419 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012420else
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012423rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12424 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012425fi
12426
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012427
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12430$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012431if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012433if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012434 ac_cv_have_chflags="yes"
12435else
12436 ac_cv_have_chflags="no"
12437fi
12438
12439fi
12440if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012441
Matthias Kloseb9621712010-04-24 17:59:49 +000012442$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012443
12444fi
12445
Matthias Kloseb9621712010-04-24 17:59:49 +000012446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12447$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012448if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012450else
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012452 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012453else
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012455/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012456
Christian Heimesd0764e22007-12-04 15:00:33 +000012457#include <sys/stat.h>
12458#include <unistd.h>
12459int main(int argc, char*argv[])
12460{
12461 if(lchflags(argv[0], 0) != 0)
12462 return 1;
12463 return 0;
12464}
Ned Deily3eb67d52011-06-28 00:00:28 -070012465
Christian Heimesd0764e22007-12-04 15:00:33 +000012466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012468 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012469else
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12473 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012474fi
12475
12476
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12479$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012480if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012482if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012483 ac_cv_have_lchflags="yes"
12484else
12485 ac_cv_have_lchflags="no"
12486fi
12487
12488fi
12489if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012492
12493fi
12494
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012495case $ac_sys_system/$ac_sys_release in
12496Darwin/*)
12497 _CUR_CFLAGS="${CFLAGS}"
12498 _CUR_LDFLAGS="${LDFLAGS}"
12499 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12500 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12501 ;;
12502esac
12503
Matthias Kloseb9621712010-04-24 17:59:49 +000012504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12505$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012506if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012507 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012508else
12509 ac_check_lib_save_LIBS=$LIBS
12510LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012512/* end confdefs.h. */
12513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514/* Override any GCC internal prototype to avoid an error.
12515 Use char because int might match the return type of a GCC
12516 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012517#ifdef __cplusplus
12518extern "C"
12519#endif
12520char inflateCopy ();
12521int
12522main ()
12523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012525 ;
12526 return 0;
12527}
12528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012529if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012530 ac_cv_lib_z_inflateCopy=yes
12531else
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012534rm -f core conftest.err conftest.$ac_objext \
12535 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012536LIBS=$ac_check_lib_save_LIBS
12537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12539$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012540if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012543
12544fi
12545
12546
12547case $ac_sys_system/$ac_sys_release in
12548Darwin/*)
12549 CFLAGS="${_CUR_CFLAGS}"
12550 LDFLAGS="${_CUR_LDFLAGS}"
12551 ;;
12552esac
12553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12555$as_echo_n "checking for hstrerror... " >&6; }
12556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012557/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012558
Martin v. Löwise9416172003-05-03 10:12:45 +000012559#include <netdb.h>
12560
Martin v. Löwise9416172003-05-03 10:12:45 +000012561int
12562main ()
12563{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012564void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012565 ;
12566 return 0;
12567}
12568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012569if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012572
Matthias Kloseb159a552010-04-25 21:00:44 +000012573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012574$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012575else
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12577$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012578
12579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012580rm -f core conftest.err conftest.$ac_objext \
12581 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582
Matthias Kloseb9621712010-04-24 17:59:49 +000012583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12584$as_echo_n "checking for inet_aton... " >&6; }
12585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012586/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012587
Martin v. Löwis86d66262006-02-17 08:40:11 +000012588#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012589#include <sys/socket.h>
12590#include <netinet/in.h>
12591#include <arpa/inet.h>
12592
Martin v. Löwise9416172003-05-03 10:12:45 +000012593int
12594main ()
12595{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012596void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012597 ;
12598 return 0;
12599}
12600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012601if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012602
Matthias Kloseb9621712010-04-24 17:59:49 +000012603$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012604
Matthias Kloseb159a552010-04-25 21:00:44 +000012605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012606$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12609$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012610
12611fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012612rm -f core conftest.err conftest.$ac_objext \
12613 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012614
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12616$as_echo_n "checking for inet_pton... " >&6; }
12617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012619
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012620#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012621#include <sys/socket.h>
12622#include <netinet/in.h>
12623#include <arpa/inet.h>
12624
Martin v. Löwise9416172003-05-03 10:12:45 +000012625int
12626main ()
12627{
12628void* p = inet_pton
12629 ;
12630 return 0;
12631}
12632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012636
Matthias Kloseb159a552010-04-25 21:00:44 +000012637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012638$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012639else
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12641$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012642
12643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012645
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012646# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12648$as_echo_n "checking for setgroups... " >&6; }
12649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012650/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012651
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012652#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012653#ifdef HAVE_GRP_H
12654#include <grp.h>
12655#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012656
Martin v. Löwisd5843682002-11-21 20:41:28 +000012657int
12658main ()
12659{
12660void* p = setgroups
12661 ;
12662 return 0;
12663}
12664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012666
Matthias Kloseb9621712010-04-24 17:59:49 +000012667$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012668
Matthias Kloseb159a552010-04-25 21:00:44 +000012669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012670$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012671else
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12673$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012674
12675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012677
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012678# check for openpty and forkpty
12679
12680for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012681do :
12682 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012683if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012685#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012686_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012687
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012688else
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12690$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012691if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012693else
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012695LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699/* Override any GCC internal prototype to avoid an error.
12700 Use char because int might match the return type of a GCC
12701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012702#ifdef __cplusplus
12703extern "C"
12704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012705char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012706int
12707main ()
12708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ;
12711 return 0;
12712}
12713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012719rm -f core conftest.err conftest.$ac_objext \
12720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012721LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12724$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012725if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012727 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12730$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012731if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012733else
12734 ac_check_lib_save_LIBS=$LIBS
12735LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012737/* end confdefs.h. */
12738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739/* Override any GCC internal prototype to avoid an error.
12740 Use char because int might match the return type of a GCC
12741 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012742#ifdef __cplusplus
12743extern "C"
12744#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012745char openpty ();
12746int
12747main ()
12748{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012750 ;
12751 return 0;
12752}
12753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012754if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012755 ac_cv_lib_bsd_openpty=yes
12756else
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012759rm -f core conftest.err conftest.$ac_objext \
12760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012761LIBS=$ac_check_lib_save_LIBS
12762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12764$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012765if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012767 LIBS="$LIBS -lbsd"
12768fi
12769
12770
12771fi
12772
Fred Drake8cef4cf2000-06-28 16:40:38 +000012773
12774fi
12775done
12776
12777for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012778do :
12779 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012780if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012782#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012783_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012784
Fred Drake8cef4cf2000-06-28 16:40:38 +000012785else
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12787$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012788if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012790else
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012792LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796/* Override any GCC internal prototype to avoid an error.
12797 Use char because int might match the return type of a GCC
12798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012799#ifdef __cplusplus
12800extern "C"
12801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012802char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012803int
12804main ()
12805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ;
12808 return 0;
12809}
12810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012813else
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012816rm -f core conftest.err conftest.$ac_objext \
12817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012818LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12821$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012822if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012824 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012825else
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12827$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012828if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012830else
12831 ac_check_lib_save_LIBS=$LIBS
12832LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012834/* end confdefs.h. */
12835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836/* Override any GCC internal prototype to avoid an error.
12837 Use char because int might match the return type of a GCC
12838 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012839#ifdef __cplusplus
12840extern "C"
12841#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012842char forkpty ();
12843int
12844main ()
12845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012847 ;
12848 return 0;
12849}
12850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012851if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012852 ac_cv_lib_bsd_forkpty=yes
12853else
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012856rm -f core conftest.err conftest.$ac_objext \
12857 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012858LIBS=$ac_check_lib_save_LIBS
12859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12861$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012862if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012864 LIBS="$LIBS -lbsd"
12865fi
12866
12867
12868fi
12869
Fred Drake8cef4cf2000-06-28 16:40:38 +000012870
12871fi
12872done
12873
Jack Jansendd19cf82001-12-06 22:36:17 +000012874
Michael W. Hudson54241132001-12-07 15:38:26 +000012875# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012876for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012877do :
12878 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12879ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012880if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012882#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012883_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012884
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012885fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012886done
12887
Michael W. Hudson54241132001-12-07 15:38:26 +000012888
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012889ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012890if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012891 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012892
Martin v. Löwis1142de32002-03-29 16:28:31 +000012893else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012895 *" dup2.$ac_objext "* ) ;;
12896 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012898esac
12899
Martin v. Löwis1142de32002-03-29 16:28:31 +000012900fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012901
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012902ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012903if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012904 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12905
12906else
12907 case " $LIBOBJS " in
12908 *" strdup.$ac_objext "* ) ;;
12909 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12910 ;;
12911esac
12912
12913fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012914
12915
12916for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012917do :
12918 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012919if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012921#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012924/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012926int
12927main ()
12928{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 ;
12931 return 0;
12932}
12933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012934if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012937
Guido van Rossum627b2d71993-12-24 10:39:16 +000012938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012940
Guido van Rossum627b2d71993-12-24 10:39:16 +000012941fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012942done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012943
Jack Jansen150753c2003-03-29 22:07:47 +000012944for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012945do :
12946 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012947if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012948 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012949#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012952/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012953#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012954int
12955main ()
12956{
12957setpgrp(0,0);
12958 ;
12959 return 0;
12960}
12961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012965
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012968
12969fi
12970done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012971
Michael W. Hudson54241132001-12-07 15:38:26 +000012972
Gregory P. Smith387512c2018-12-30 15:42:32 -080012973# We search for both crypt and crypt_r as one or the other may be defined
12974# This gets us our -lcrypt in LIBS when required on the target platform.
12975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12976$as_echo_n "checking for library containing crypt... " >&6; }
12977if ${ac_cv_search_crypt+:} false; then :
12978 $as_echo_n "(cached) " >&6
12979else
12980 ac_func_search_save_LIBS=$LIBS
12981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12982/* end confdefs.h. */
12983
12984/* Override any GCC internal prototype to avoid an error.
12985 Use char because int might match the return type of a GCC
12986 builtin and then its argument prototype would still apply. */
12987#ifdef __cplusplus
12988extern "C"
12989#endif
12990char crypt ();
12991int
12992main ()
12993{
12994return crypt ();
12995 ;
12996 return 0;
12997}
12998_ACEOF
12999for ac_lib in '' crypt; do
13000 if test -z "$ac_lib"; then
13001 ac_res="none required"
13002 else
13003 ac_res=-l$ac_lib
13004 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13005 fi
13006 if ac_fn_c_try_link "$LINENO"; then :
13007 ac_cv_search_crypt=$ac_res
13008fi
13009rm -f core conftest.err conftest.$ac_objext \
13010 conftest$ac_exeext
13011 if ${ac_cv_search_crypt+:} false; then :
13012 break
13013fi
13014done
13015if ${ac_cv_search_crypt+:} false; then :
13016
13017else
13018 ac_cv_search_crypt=no
13019fi
13020rm conftest.$ac_ext
13021LIBS=$ac_func_search_save_LIBS
13022fi
13023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13024$as_echo "$ac_cv_search_crypt" >&6; }
13025ac_res=$ac_cv_search_crypt
13026if test "$ac_res" != no; then :
13027 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13028
13029fi
13030
13031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13032$as_echo_n "checking for library containing crypt_r... " >&6; }
13033if ${ac_cv_search_crypt_r+:} false; then :
13034 $as_echo_n "(cached) " >&6
13035else
13036 ac_func_search_save_LIBS=$LIBS
13037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038/* end confdefs.h. */
13039
13040/* Override any GCC internal prototype to avoid an error.
13041 Use char because int might match the return type of a GCC
13042 builtin and then its argument prototype would still apply. */
13043#ifdef __cplusplus
13044extern "C"
13045#endif
13046char crypt_r ();
13047int
13048main ()
13049{
13050return crypt_r ();
13051 ;
13052 return 0;
13053}
13054_ACEOF
13055for ac_lib in '' crypt; do
13056 if test -z "$ac_lib"; then
13057 ac_res="none required"
13058 else
13059 ac_res=-l$ac_lib
13060 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13061 fi
13062 if ac_fn_c_try_link "$LINENO"; then :
13063 ac_cv_search_crypt_r=$ac_res
13064fi
13065rm -f core conftest.err conftest.$ac_objext \
13066 conftest$ac_exeext
13067 if ${ac_cv_search_crypt_r+:} false; then :
13068 break
13069fi
13070done
13071if ${ac_cv_search_crypt_r+:} false; then :
13072
13073else
13074 ac_cv_search_crypt_r=no
13075fi
13076rm conftest.$ac_ext
13077LIBS=$ac_func_search_save_LIBS
13078fi
13079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13080$as_echo "$ac_cv_search_crypt_r" >&6; }
13081ac_res=$ac_cv_search_crypt_r
13082if test "$ac_res" != no; then :
13083 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13084
13085fi
13086
13087
13088ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13089if test "x$ac_cv_func_crypt_r" = xyes; then :
13090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13091/* end confdefs.h. */
13092
13093#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13094#include <crypt.h>
13095
13096int
13097main ()
13098{
13099
13100struct crypt_data d;
13101char *r = crypt_r("", "", &d);
13102
13103 ;
13104 return 0;
13105}
13106_ACEOF
13107if ac_fn_c_try_compile "$LINENO"; then :
13108
13109$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13110
13111fi
13112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13113
13114fi
13115
13116
Victor Stinnere0be4232011-10-25 13:06:09 +020013117for ac_func in clock_gettime
13118do :
13119 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13120if test "x$ac_cv_func_clock_gettime" = xyes; then :
13121 cat >>confdefs.h <<_ACEOF
13122#define HAVE_CLOCK_GETTIME 1
13123_ACEOF
13124
13125else
13126
13127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13128$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13129if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13130 $as_echo_n "(cached) " >&6
13131else
13132 ac_check_lib_save_LIBS=$LIBS
13133LIBS="-lrt $LIBS"
13134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13135/* end confdefs.h. */
13136
13137/* Override any GCC internal prototype to avoid an error.
13138 Use char because int might match the return type of a GCC
13139 builtin and then its argument prototype would still apply. */
13140#ifdef __cplusplus
13141extern "C"
13142#endif
13143char clock_gettime ();
13144int
13145main ()
13146{
13147return clock_gettime ();
13148 ;
13149 return 0;
13150}
13151_ACEOF
13152if ac_fn_c_try_link "$LINENO"; then :
13153 ac_cv_lib_rt_clock_gettime=yes
13154else
13155 ac_cv_lib_rt_clock_gettime=no
13156fi
13157rm -f core conftest.err conftest.$ac_objext \
13158 conftest$ac_exeext conftest.$ac_ext
13159LIBS=$ac_check_lib_save_LIBS
13160fi
13161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13162$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13163if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13164
Victor Stinner7efb8332014-08-29 15:41:08 +020013165 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013166 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13167
13168
13169$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13170
13171
13172fi
13173
13174
13175fi
13176done
13177
13178
13179for ac_func in clock_getres
13180do :
13181 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13182if test "x$ac_cv_func_clock_getres" = xyes; then :
13183 cat >>confdefs.h <<_ACEOF
13184#define HAVE_CLOCK_GETRES 1
13185_ACEOF
13186
13187else
13188
13189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13190$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13191if ${ac_cv_lib_rt_clock_getres+:} false; then :
13192 $as_echo_n "(cached) " >&6
13193else
13194 ac_check_lib_save_LIBS=$LIBS
13195LIBS="-lrt $LIBS"
13196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13197/* end confdefs.h. */
13198
13199/* Override any GCC internal prototype to avoid an error.
13200 Use char because int might match the return type of a GCC
13201 builtin and then its argument prototype would still apply. */
13202#ifdef __cplusplus
13203extern "C"
13204#endif
13205char clock_getres ();
13206int
13207main ()
13208{
13209return clock_getres ();
13210 ;
13211 return 0;
13212}
13213_ACEOF
13214if ac_fn_c_try_link "$LINENO"; then :
13215 ac_cv_lib_rt_clock_getres=yes
13216else
13217 ac_cv_lib_rt_clock_getres=no
13218fi
13219rm -f core conftest.err conftest.$ac_objext \
13220 conftest$ac_exeext conftest.$ac_ext
13221LIBS=$ac_check_lib_save_LIBS
13222fi
13223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13224$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13225if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13226
13227 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13228
13229
13230fi
13231
13232
13233fi
13234done
13235
13236
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013237for ac_func in clock_settime
13238do :
13239 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13240if test "x$ac_cv_func_clock_settime" = xyes; then :
13241 cat >>confdefs.h <<_ACEOF
13242#define HAVE_CLOCK_SETTIME 1
13243_ACEOF
13244
13245else
13246
13247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13248$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13249if ${ac_cv_lib_rt_clock_settime+:} false; then :
13250 $as_echo_n "(cached) " >&6
13251else
13252 ac_check_lib_save_LIBS=$LIBS
13253LIBS="-lrt $LIBS"
13254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13255/* end confdefs.h. */
13256
13257/* Override any GCC internal prototype to avoid an error.
13258 Use char because int might match the return type of a GCC
13259 builtin and then its argument prototype would still apply. */
13260#ifdef __cplusplus
13261extern "C"
13262#endif
13263char clock_settime ();
13264int
13265main ()
13266{
13267return clock_settime ();
13268 ;
13269 return 0;
13270}
13271_ACEOF
13272if ac_fn_c_try_link "$LINENO"; then :
13273 ac_cv_lib_rt_clock_settime=yes
13274else
13275 ac_cv_lib_rt_clock_settime=no
13276fi
13277rm -f core conftest.err conftest.$ac_objext \
13278 conftest$ac_exeext conftest.$ac_ext
13279LIBS=$ac_check_lib_save_LIBS
13280fi
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13282$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13283if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13284
13285 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13286
13287
13288fi
13289
13290
13291fi
13292done
13293
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13296$as_echo_n "checking for major... " >&6; }
13297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013298/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013299
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013300#if defined(MAJOR_IN_MKDEV)
13301#include <sys/mkdev.h>
13302#elif defined(MAJOR_IN_SYSMACROS)
13303#include <sys/sysmacros.h>
13304#else
13305#include <sys/types.h>
13306#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013307
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013308int
13309main ()
13310{
13311
13312 makedev(major(0),minor(0));
13313
13314 ;
13315 return 0;
13316}
13317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013318if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013319
13320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13324$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013325
13326else
Skip Montanaro6dead952003-09-25 14:50:04 +000013327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13329$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013330
13331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013332rm -f core conftest.err conftest.$ac_objext \
13333 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013334
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013335# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013336# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13338$as_echo_n "checking for getaddrinfo... " >&6; }
13339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013340/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013341
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013342#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013343#include <sys/socket.h>
13344#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013345#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013346
Martin v. Löwis11437992002-04-12 09:54:03 +000013347int
13348main ()
13349{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013350getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 ;
13352 return 0;
13353}
13354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013355if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013356 have_getaddrinfo=yes
13357else
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013360rm -f core conftest.err conftest.$ac_objext \
13361 conftest$ac_exeext conftest.$ac_ext
13362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13363$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013364if test $have_getaddrinfo = yes
13365then
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13367$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013368 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013372
13373if test "${enable_ipv6+set}" = set; then
13374 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13375else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013376 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013377fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013378else
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013380/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013381
Stefan Krah19c21392012-11-22 23:47:32 +010013382#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013383#include <sys/types.h>
13384#include <netdb.h>
13385#include <string.h>
13386#include <sys/socket.h>
13387#include <netinet/in.h>
13388
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013389int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013390{
13391 int passive, gaierr, inet4 = 0, inet6 = 0;
13392 struct addrinfo hints, *ai, *aitop;
13393 char straddr[INET6_ADDRSTRLEN], strport[16];
13394
13395 for (passive = 0; passive <= 1; passive++) {
13396 memset(&hints, 0, sizeof(hints));
13397 hints.ai_family = AF_UNSPEC;
13398 hints.ai_flags = passive ? AI_PASSIVE : 0;
13399 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013400 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013401 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13402 (void)gai_strerror(gaierr);
13403 goto bad;
13404 }
13405 for (ai = aitop; ai; ai = ai->ai_next) {
13406 if (ai->ai_addr == NULL ||
13407 ai->ai_addrlen == 0 ||
13408 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13409 straddr, sizeof(straddr), strport, sizeof(strport),
13410 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13411 goto bad;
13412 }
13413 switch (ai->ai_family) {
13414 case AF_INET:
13415 if (strcmp(strport, "54321") != 0) {
13416 goto bad;
13417 }
13418 if (passive) {
13419 if (strcmp(straddr, "0.0.0.0") != 0) {
13420 goto bad;
13421 }
13422 } else {
13423 if (strcmp(straddr, "127.0.0.1") != 0) {
13424 goto bad;
13425 }
13426 }
13427 inet4++;
13428 break;
13429 case AF_INET6:
13430 if (strcmp(strport, "54321") != 0) {
13431 goto bad;
13432 }
13433 if (passive) {
13434 if (strcmp(straddr, "::") != 0) {
13435 goto bad;
13436 }
13437 } else {
13438 if (strcmp(straddr, "::1") != 0) {
13439 goto bad;
13440 }
13441 }
13442 inet6++;
13443 break;
13444 case AF_UNSPEC:
13445 goto bad;
13446 break;
13447 default:
13448 /* another family support? */
13449 break;
13450 }
13451 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013452 freeaddrinfo(aitop);
13453 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013454 }
13455
13456 if (!(inet4 == 0 || inet4 == 2))
13457 goto bad;
13458 if (!(inet6 == 0 || inet6 == 2))
13459 goto bad;
13460
13461 if (aitop)
13462 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013463 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013464
13465 bad:
13466 if (aitop)
13467 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013468 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013469}
13470
Martin v. Löwis11437992002-04-12 09:54:03 +000013471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013472if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013473 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013480
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013481fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013482
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013484
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13486$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13487
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013488if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013489then
13490 if test $ipv6 = yes
13491 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013492 echo 'Fatal: You must get working getaddrinfo() function.'
13493 echo ' or you can specify "--disable-ipv6"'.
13494 exit 1
13495 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013496else
Martin v. Löwis11437992002-04-12 09:54:03 +000013497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013499
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013500fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013501
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013502for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013503do :
13504 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013505if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013508_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013509
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013510fi
13511done
13512
Michael W. Hudson54241132001-12-07 15:38:26 +000013513
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013514# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13516$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013517if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013519else
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013521/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013522#include <sys/types.h>
13523#include <sys/time.h>
13524#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526int
13527main ()
13528{
13529if ((struct tm *) 0)
13530return 0;
13531 ;
13532 return 0;
13533}
13534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013535if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13543$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013544if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013547
13548fi
13549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13551$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013552if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013554else
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013556/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013557#include <sys/types.h>
13558#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013559
Martin v. Löwis11437992002-04-12 09:54:03 +000013560int
13561main ()
13562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563struct tm tm;
13564 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 ;
13567 return 0;
13568}
13569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013570if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013571 ac_cv_struct_tm=time.h
13572else
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13578$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013579if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582
13583fi
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585ac_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 +000013586#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588"
Victor Stinnere0be4232011-10-25 13:06:09 +020013589if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
13591cat >>confdefs.h <<_ACEOF
13592#define HAVE_STRUCT_TM_TM_ZONE 1
13593_ACEOF
13594
13595
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013596fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013597
Martin v. Löwis11437992002-04-12 09:54:03 +000013598if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601
13602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13604"
Victor Stinnere0be4232011-10-25 13:06:09 +020013605if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607else
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609fi
13610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013612#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013613_ACEOF
13614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13616$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013617if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013619else
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013621/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013622#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623#if !HAVE_DECL_TZNAME
13624extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013626
Martin v. Löwis11437992002-04-12 09:54:03 +000013627int
13628main ()
13629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 ;
13632 return 0;
13633}
13634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013635if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013636 ac_cv_var_tzname=yes
13637else
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013640rm -f core conftest.err conftest.$ac_objext \
13641 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13644$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013645 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013648
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013649 fi
13650fi
13651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652ac_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 +020013653if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
13655cat >>confdefs.h <<_ACEOF
13656#define HAVE_STRUCT_STAT_ST_RDEV 1
13657_ACEOF
13658
13659
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013660fi
13661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662ac_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 +020013663if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013664
Martin v. Löwis11437992002-04-12 09:54:03 +000013665cat >>confdefs.h <<_ACEOF
13666#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13667_ACEOF
13668
13669
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013670fi
13671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672ac_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 +020013673if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013674
13675cat >>confdefs.h <<_ACEOF
13676#define HAVE_STRUCT_STAT_ST_FLAGS 1
13677_ACEOF
13678
13679
13680fi
13681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682ac_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 +020013683if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013684
13685cat >>confdefs.h <<_ACEOF
13686#define HAVE_STRUCT_STAT_ST_GEN 1
13687_ACEOF
13688
13689
13690fi
13691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692ac_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 +020013693if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013694
13695cat >>confdefs.h <<_ACEOF
13696#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13697_ACEOF
13698
13699
13700fi
13701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702ac_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 +020013703if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013704
Martin v. Löwis11437992002-04-12 09:54:03 +000013705cat >>confdefs.h <<_ACEOF
13706#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13707_ACEOF
13708
13709
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013710fi
13711
Stefan Krah267b6392016-04-26 01:09:18 +020013712ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13713 #include <sys/types.h>
13714 #include <pwd.h>
13715
13716"
13717if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13718
13719cat >>confdefs.h <<_ACEOF
13720#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13721_ACEOF
13722
13723
13724fi
13725ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13726 #include <sys/types.h>
13727 #include <pwd.h>
13728
13729"
13730if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13731
13732cat >>confdefs.h <<_ACEOF
13733#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13734_ACEOF
13735
13736
13737fi
13738
Zachary Ware6a6967e2016-10-01 00:47:27 -050013739# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13740ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13741"
13742if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13743
13744cat >>confdefs.h <<_ACEOF
13745#define HAVE_SIGINFO_T_SI_BAND 1
13746_ACEOF
13747
13748
13749fi
13750
Michael W. Hudson54241132001-12-07 15:38:26 +000013751
Matthias Kloseb9621712010-04-24 17:59:49 +000013752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13753$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013754if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013756else
Matthias Kloseb159a552010-04-25 21:00:44 +000013757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013759/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013760#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013761int
13762main ()
13763{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 ;
13766 return 0;
13767}
13768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013769if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013770 ac_cv_header_time_altzone=yes
13771else
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776fi
13777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13779$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Matthias Kloseb9621712010-04-24 17:59:49 +000013782$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783
13784fi
13785
Guido van Rossumda88dad1995-01-26 00:46:29 +000013786was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13788$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013790/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013791
13792#include <sys/types.h>
13793#include <sys/select.h>
13794#include <sys/time.h>
13795
Martin v. Löwis11437992002-04-12 09:54:03 +000013796int
13797main ()
13798{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799;
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ;
13801 return 0;
13802}
13803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013804if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013805
13806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013808
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013809 was_it_defined=yes
13810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13814$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13817$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013818if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013819 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013820else
Matthias Kloseb9621712010-04-24 17:59:49 +000013821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013822/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013823#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013824int
13825main ()
13826{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013827struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ;
13829 return 0;
13830}
13831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013833 ac_cv_struct_addrinfo=yes
13834else
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13838fi
13839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13841$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013842if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013843
Matthias Kloseb9621712010-04-24 17:59:49 +000013844$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013845
13846fi
13847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13849$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013850if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013852else
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013855
13856# include <sys/types.h>
13857# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013858int
13859main ()
13860{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013861struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 ;
13863 return 0;
13864}
13865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013867 ac_cv_struct_sockaddr_storage=yes
13868else
Matthias Kloseb9621712010-04-24 17:59:49 +000013869 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13872fi
13873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13875$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013876if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013879
13880fi
13881
Christian Heimesdffa3942016-09-05 23:54:41 +020013882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13883$as_echo_n "checking for sockaddr_alg... " >&6; }
13884if ${ac_cv_struct_sockaddr_alg+:} false; then :
13885 $as_echo_n "(cached) " >&6
13886else
13887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13888/* end confdefs.h. */
13889
13890# include <sys/types.h>
13891# include <sys/socket.h>
13892# include <linux/if_alg.h>
13893int
13894main ()
13895{
13896struct sockaddr_alg s
13897 ;
13898 return 0;
13899}
13900_ACEOF
13901if ac_fn_c_try_compile "$LINENO"; then :
13902 ac_cv_struct_sockaddr_alg=yes
13903else
13904 ac_cv_struct_sockaddr_alg=no
13905fi
13906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13907fi
13908
13909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13910$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13911if test $ac_cv_struct_sockaddr_alg = yes; then
13912
13913$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13914
13915fi
13916
Guido van Rossum627b2d71993-12-24 10:39:16 +000013917# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13920$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013921if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013923else
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013926$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013927int
13928main ()
13929{
13930static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013931test_array [0] = 0;
13932return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013933
13934 ;
13935 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013936}
Martin v. Löwis11437992002-04-12 09:54:03 +000013937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013938if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013939 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013940else
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13946$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013947if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013949
13950fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013951
Matthias Kloseb9621712010-04-24 17:59:49 +000013952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13953$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013954if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013955 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013956else
Matthias Kloseb9621712010-04-24 17:59:49 +000013957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013958/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013959
Martin v. Löwis11437992002-04-12 09:54:03 +000013960int
13961main ()
13962{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013963
Martin v. Löwis11437992002-04-12 09:54:03 +000013964#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013965 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013966 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013967 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013968 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013969 char const *const *pcpcc;
13970 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 /* NEC SVR4.0.2 mips cc rejects this. */
13972 struct point {int x, y;};
13973 static struct point const zero = {0,0};
13974 /* AIX XL C 1.02.0.0 rejects this.
13975 It does not let you subtract one const X* pointer from another in
13976 an arm of an if-expression whose if-part is not a constant
13977 expression */
13978 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981 ++pcpcc;
13982 ppc = (char**) pcpcc;
13983 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013984 { /* SCO 3.2v4 cc rejects this sort of thing. */
13985 char tx;
13986 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013988
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 }
13992 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13993 int x[] = {25, 17};
13994 const int *foo = &x[0];
13995 ++foo;
13996 }
13997 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13998 typedef const int *iptr;
13999 iptr p = 0;
14000 ++p;
14001 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014002 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014003 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014004 struct s { int j; const int *ap[3]; } bx;
14005 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014006 }
14007 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14008 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014009 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014010 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014012#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014013
Martin v. Löwis11437992002-04-12 09:54:03 +000014014 ;
14015 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014016}
Martin v. Löwis11437992002-04-12 09:54:03 +000014017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014018if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014019 ac_cv_c_const=yes
14020else
Matthias Kloseb9621712010-04-24 17:59:49 +000014021 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14026$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014027if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014030
14031fi
14032
Michael W. Hudson54241132001-12-07 15:38:26 +000014033
Guido van Rossumda88dad1995-01-26 00:46:29 +000014034works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14036$as_echo_n "checking for working signed char... " >&6; }
14037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014038/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014039
Martin v. Löwis11437992002-04-12 09:54:03 +000014040int
14041main ()
14042{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014043signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014044 ;
14045 return 0;
14046}
14047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014048if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014049 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014050else
Skip Montanaro6dead952003-09-25 14:50:04 +000014051
Matthias Kloseb9621712010-04-24 17:59:49 +000014052$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014053
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014054
Guido van Rossum7f43da71994-08-01 12:15:30 +000014055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14058$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014059
Guido van Rossumda88dad1995-01-26 00:46:29 +000014060have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14062$as_echo_n "checking for prototypes... " >&6; }
14063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014064/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014065int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014066int
14067main ()
14068{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014069return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 ;
14071 return 0;
14072}
14073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
Matthias Kloseb9621712010-04-24 17:59:49 +000014076$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Matthias Kloseb159a552010-04-25 21:00:44 +000014078 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14082$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +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 variable length prototypes and stdarg.h" >&5
14086$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014088/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014089
14090#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014091int foo(int x, ...) {
14092 va_list va;
14093 va_start(va, x);
14094 va_arg(va, int);
14095 va_arg(va, char *);
14096 va_arg(va, double);
14097 return 0;
14098}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014099
Martin v. Löwis11437992002-04-12 09:54:03 +000014100int
14101main ()
14102{
Guido van Rossum90eea071996-08-30 20:58:57 +000014103return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 ;
14105 return 0;
14106}
14107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014109
14110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014113 works=yes
14114
Guido van Rossum627b2d71993-12-24 10:39:16 +000014115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14118$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014119
Martin v. Löwisd6320502004-08-12 13:45:08 +000014120# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14122$as_echo_n "checking for socketpair... " >&6; }
14123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014124/* end confdefs.h. */
14125
14126#include <sys/types.h>
14127#include <sys/socket.h>
14128
14129int
14130main ()
14131{
14132void *x=socketpair
14133 ;
14134 return 0;
14135}
14136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014140
Matthias Kloseb159a552010-04-25 21:00:44 +000014141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014142$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014143else
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14145$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014146
14147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014149
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014150# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14152$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014154/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014155#include <sys/types.h>
14156#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014157int
14158main ()
14159{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014160struct sockaddr x;
14161x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 ;
14163 return 0;
14164}
14165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014166if ac_fn_c_try_compile "$LINENO"; then :
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14168$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014169
Matthias Kloseb9621712010-04-24 17:59:49 +000014170$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014171
14172else
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14174$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014175
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014178
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014179# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
14181
Matthias Kloseb9621712010-04-24 17:59:49 +000014182ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014183if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14188$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014189 OLD_CFLAGS=$CFLAGS
14190 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014192/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014193
14194# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014195
Martin v. Löwis11437992002-04-12 09:54:03 +000014196int
14197main ()
14198{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014199
14200 char *name;
14201 struct hostent *he, *res;
14202 char buffer[2048];
14203 int buflen = 2048;
14204 int h_errnop;
14205
14206 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014207
14208 ;
14209 return 0;
14210}
14211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014212if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014213
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014215
Martin v. Löwis11437992002-04-12 09:54:03 +000014216
Matthias Kloseb9621712010-04-24 17:59:49 +000014217$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014218
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14220$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014221
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014222else
Skip Montanaro6dead952003-09-25 14:50:04 +000014223
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14225$as_echo "no" >&6; }
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14227$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014229/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014230
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014231# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
Martin v. Löwis11437992002-04-12 09:54:03 +000014233int
14234main ()
14235{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014236
14237 char *name;
14238 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014239 char buffer[2048];
14240 int buflen = 2048;
14241 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014242
Matthias Kloseb159a552010-04-25 21:00:44 +000014243 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
14245 ;
14246 return 0;
14247}
14248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014252
Martin v. Löwis11437992002-04-12 09:54:03 +000014253
Matthias Kloseb159a552010-04-25 21:00:44 +000014254$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14257$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014258
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014259else
Skip Montanaro6dead952003-09-25 14:50:04 +000014260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14262$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14264$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14266/* end confdefs.h. */
14267
14268# include <netdb.h>
14269
14270int
14271main ()
14272{
14273
14274 char *name;
14275 struct hostent *he;
14276 struct hostent_data data;
14277
14278 (void) gethostbyname_r(name, he, &data);
14279
14280 ;
14281 return 0;
14282}
14283_ACEOF
14284if ac_fn_c_try_compile "$LINENO"; then :
14285
14286 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14287
14288
14289$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14290
14291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14292$as_echo "yes" >&6; }
14293
14294else
14295
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14297$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014298
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014307 CFLAGS=$OLD_CFLAGS
14308
14309else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 for ac_func in gethostbyname
14312do :
14313 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014314if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014315 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014316#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014317_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014318
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014319fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014320done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014321
Michael W. Hudson54241132001-12-07 15:38:26 +000014322
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014323fi
14324
Michael W. Hudson54241132001-12-07 15:38:26 +000014325
14326
14327
14328
14329
14330
Guido van Rossum627b2d71993-12-24 10:39:16 +000014331# checks for system services
14332# (none yet)
14333
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014334# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014335ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014336if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014337
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014338else
Matthias Kloseb9621712010-04-24 17:59:49 +000014339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14340$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014341if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014343else
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014345LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349/* Override any GCC internal prototype to avoid an error.
14350 Use char because int might match the return type of a GCC
14351 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014352#ifdef __cplusplus
14353extern "C"
14354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014355char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014356int
14357main ()
14358{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014360 ;
14361 return 0;
14362}
14363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014364if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014365 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014366else
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014369rm -f core conftest.err conftest.$ac_objext \
14370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014371LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14374$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014375if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 cat >>confdefs.h <<_ACEOF
14377#define HAVE_LIBIEEE 1
14378_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014379
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014380 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014381
Guido van Rossum627b2d71993-12-24 10:39:16 +000014382fi
14383
Michael W. Hudson54241132001-12-07 15:38:26 +000014384
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014385fi
14386
Michael W. Hudson54241132001-12-07 15:38:26 +000014387
Guido van Rossum7f43da71994-08-01 12:15:30 +000014388# check for --with-libm=...
14389
Guido van Rossum563e7081996-09-10 18:20:48 +000014390case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014391Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014392*) LIBM=-lm
14393esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14395$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014398if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014400if test "$withval" = no
14401then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14403$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014404elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014405then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14407$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014408else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014409fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014410else
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14412$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413fi
14414
Guido van Rossum7f43da71994-08-01 12:15:30 +000014415
14416# check for --with-libc=...
14417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14419$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014422if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014423 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014424if test "$withval" = no
14425then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14427$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014428elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014429then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14431$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014432else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014433fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014434else
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14436$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437fi
14438
Guido van Rossum7f43da71994-08-01 12:15:30 +000014439
Stefan Krah1919b7e2012-03-21 18:25:23 +010014440# **************************************
14441# * Check for gcc x64 inline assembler *
14442# **************************************
14443
14444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14445$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14447/* end confdefs.h. */
14448
14449int
14450main ()
14451{
14452
14453 __asm__ __volatile__ ("movq %rcx, %rax");
14454
14455 ;
14456 return 0;
14457}
14458_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014459if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014460 have_gcc_asm_for_x64=yes
14461else
14462 have_gcc_asm_for_x64=no
14463fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014464rm -f core conftest.err conftest.$ac_objext \
14465 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14467$as_echo "$have_gcc_asm_for_x64" >&6; }
14468if test "$have_gcc_asm_for_x64" = yes
14469then
14470
14471$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14472
14473fi
14474
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014475# **************************************************
14476# * Check for various properties of floating point *
14477# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014478
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14480$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14481if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014482 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014483else
14484
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014485
14486ax_cv_c_float_words_bigendian=unknown
14487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014488/* end confdefs.h. */
14489
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014490
14491double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14492
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014493
14494_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014495if ac_fn_c_try_compile "$LINENO"; then :
14496
14497
Arnon Yaari5dd83602020-04-01 18:19:09 +030014498if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014499 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014500fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014501if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014502 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14503 ax_cv_c_float_words_bigendian=no
14504 else
14505 ax_cv_c_float_words_bigendian=unknown
14506 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014507fi
14508
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014509
14510fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014512fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14514$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014515
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014516case $ax_cv_c_float_words_bigendian in
14517 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014518
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014519$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14520 ;;
14521 no)
14522 ;;
14523 *)
14524 as_fn_error $? "
14525
14526Unknown float word ordering. You need to manually preset
14527ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14528
14529 " "$LINENO" 5 ;;
14530esac
14531
14532
14533if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014534then
14535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014537
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014538elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014539then
14540
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014541$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14542
14543else
14544 # Some ARM platforms use a mixed-endian representation for doubles.
14545 # While Python doesn't currently have full support for these platforms
14546 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14547 # conversions work.
14548 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14549 # or little, then it must be this?
14550
Matthias Kloseb9621712010-04-24 17:59:49 +000014551$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014552
14553fi
14554
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014555# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014556# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014557# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014558# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014559# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014560# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014561
14562# This inline assembler syntax may also work for suncc and icc,
14563# so we try it on all platforms.
14564
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14566$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014568/* end confdefs.h. */
14569
14570int
14571main ()
14572{
14573
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014574 unsigned short cw;
14575 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14576 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014577
14578 ;
14579 return 0;
14580}
14581_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014582if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014583 have_gcc_asm_for_x87=yes
14584else
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014586fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014587rm -f core conftest.err conftest.$ac_objext \
14588 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14590$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014591if test "$have_gcc_asm_for_x87" = yes
14592then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014595
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014596fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014597
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14599$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14601/* end confdefs.h. */
14602
14603int
14604main ()
14605{
14606
14607 unsigned int fpcr;
14608 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14609 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14610
14611 ;
14612 return 0;
14613}
14614_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014615if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014616 have_gcc_asm_for_mc68881=yes
14617else
14618 have_gcc_asm_for_mc68881=no
14619fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014620rm -f core conftest.err conftest.$ac_objext \
14621 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14623$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14624if test "$have_gcc_asm_for_mc68881" = yes
14625then
14626
14627$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14628
14629fi
14630
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014631# Detect whether system arithmetic is subject to x87-style double
14632# rounding issues. The result of this test has little meaning on non
14633# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14634# mode is round-to-nearest and double rounding issues are present, and
14635# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14637$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014638# $BASECFLAGS may affect the result
14639ac_save_cc="$CC"
14640CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014641if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014642 ac_cv_x87_double_rounding=no
14643else
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014645/* end confdefs.h. */
14646
14647#include <stdlib.h>
14648#include <math.h>
14649int main() {
14650 volatile double x, y, z;
14651 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14652 x = 0.99999999999999989; /* 1-2**-53 */
14653 y = 1./x;
14654 if (y != 1.)
14655 exit(0);
14656 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14657 x = 1e16;
14658 y = 2.99999;
14659 z = x + y;
14660 if (z != 1e16+4.)
14661 exit(0);
14662 /* both tests show evidence of double rounding */
14663 exit(1);
14664}
14665
14666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014667if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014668 ac_cv_x87_double_rounding=no
14669else
Matthias Kloseb9621712010-04-24 17:59:49 +000014670 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014674fi
14675
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014676CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14678$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014679if test "$ac_cv_x87_double_rounding" = yes
14680then
14681
Matthias Kloseb9621712010-04-24 17:59:49 +000014682$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014683
14684fi
14685
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014686# ************************************
14687# * Check for mathematical functions *
14688# ************************************
14689
14690LIBS_SAVE=$LIBS
14691LIBS="$LIBS $LIBM"
14692
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014693for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14694do :
14695 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14696ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014697if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014698 cat >>confdefs.h <<_ACEOF
14699#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14700_ACEOF
14701
14702fi
14703done
14704
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014705for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014706do :
14707 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14708ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014709if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014710 cat >>confdefs.h <<_ACEOF
14711#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14712_ACEOF
14713
14714fi
14715done
14716
14717ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14718"
Victor Stinnere0be4232011-10-25 13:06:09 +020014719if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014720 ac_have_decl=1
14721else
14722 ac_have_decl=0
14723fi
14724
14725cat >>confdefs.h <<_ACEOF
14726#define HAVE_DECL_ISINF $ac_have_decl
14727_ACEOF
14728ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14729"
Victor Stinnere0be4232011-10-25 13:06:09 +020014730if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014731 ac_have_decl=1
14732else
14733 ac_have_decl=0
14734fi
14735
14736cat >>confdefs.h <<_ACEOF
14737#define HAVE_DECL_ISNAN $ac_have_decl
14738_ACEOF
14739ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14740"
Victor Stinnere0be4232011-10-25 13:06:09 +020014741if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014742 ac_have_decl=1
14743else
14744 ac_have_decl=0
14745fi
14746
14747cat >>confdefs.h <<_ACEOF
14748#define HAVE_DECL_ISFINITE $ac_have_decl
14749_ACEOF
14750
14751
Mark Dickinsona614f042009-11-28 12:48:43 +000014752# For multiprocessing module, check that sem_open
14753# actually works. For FreeBSD versions <= 7.2,
14754# the kernel module that provides POSIX semaphores
14755# isn't loaded by default, so an attempt to call
14756# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14758$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014759if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014760 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014761else
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014763 ac_cv_posix_semaphores_enabled=yes
14764else
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014766/* end confdefs.h. */
14767
14768#include <unistd.h>
14769#include <fcntl.h>
14770#include <stdio.h>
14771#include <semaphore.h>
14772#include <sys/stat.h>
14773
14774int main(void) {
14775 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14776 if (a == SEM_FAILED) {
14777 perror("sem_open");
14778 return 1;
14779 }
14780 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014781 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014782 return 0;
14783}
14784
14785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014786if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014787 ac_cv_posix_semaphores_enabled=yes
14788else
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14792 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014793fi
14794
14795
Mark Dickinsona614f042009-11-28 12:48:43 +000014796fi
14797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14799$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014800if test $ac_cv_posix_semaphores_enabled = no
14801then
14802
Matthias Kloseb9621712010-04-24 17:59:49 +000014803$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014804
14805fi
14806
Mark Dickinson10683072009-04-18 21:18:19 +000014807# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14809$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014810if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014812else
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014814 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014815else
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014817/* end confdefs.h. */
14818
14819#include <unistd.h>
14820#include <fcntl.h>
14821#include <stdio.h>
14822#include <semaphore.h>
14823#include <sys/stat.h>
14824
14825int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014826 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014827 int count;
14828 int res;
14829 if(a==SEM_FAILED){
14830 perror("sem_open");
14831 return 1;
14832
14833 }
14834 res = sem_getvalue(a, &count);
14835 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014836 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014837 return res==-1 ? 1 : 0;
14838}
14839
Mark Dickinson10683072009-04-18 21:18:19 +000014840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014841if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014842 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014843else
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014848fi
14849
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014851fi
14852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14854$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014855if test $ac_cv_broken_sem_getvalue = yes
14856then
14857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014859
14860fi
14861
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014862ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14863"
14864if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14865 ac_have_decl=1
14866else
14867 ac_have_decl=0
14868fi
14869
14870cat >>confdefs.h <<_ACEOF
14871#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14872_ACEOF
14873ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14874"
14875if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14876 ac_have_decl=1
14877else
14878 ac_have_decl=0
14879fi
14880
14881cat >>confdefs.h <<_ACEOF
14882#define HAVE_DECL_RTLD_NOW $ac_have_decl
14883_ACEOF
14884ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14885"
14886if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14887 ac_have_decl=1
14888else
14889 ac_have_decl=0
14890fi
14891
14892cat >>confdefs.h <<_ACEOF
14893#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14894_ACEOF
14895ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14896"
14897if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14898 ac_have_decl=1
14899else
14900 ac_have_decl=0
14901fi
14902
14903cat >>confdefs.h <<_ACEOF
14904#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14905_ACEOF
14906ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14907"
14908if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14909 ac_have_decl=1
14910else
14911 ac_have_decl=0
14912fi
14913
14914cat >>confdefs.h <<_ACEOF
14915#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14916_ACEOF
14917ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14918"
14919if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14920 ac_have_decl=1
14921else
14922 ac_have_decl=0
14923fi
14924
14925cat >>confdefs.h <<_ACEOF
14926#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14927_ACEOF
14928ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14929"
14930if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14931 ac_have_decl=1
14932else
14933 ac_have_decl=0
14934fi
14935
14936cat >>confdefs.h <<_ACEOF
14937#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14938_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014939ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14940"
14941if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14942 ac_have_decl=1
14943else
14944 ac_have_decl=0
14945fi
14946
14947cat >>confdefs.h <<_ACEOF
14948#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14949_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014950
14951
Mark Dickinsonbd792642009-03-18 20:06:12 +000014952# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14954$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014955# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014956if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014957 enableval=$enable_big_digits; case $enable_big_digits in
14958yes)
14959 enable_big_digits=30 ;;
14960no)
14961 enable_big_digits=15 ;;
1496215|30)
14963 ;;
14964*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014965 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 +000014966esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14968$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014969
14970cat >>confdefs.h <<_ACEOF
14971#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14972_ACEOF
14973
14974
14975else
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14977$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014978fi
14979
14980
Guido van Rossumef2255b2000-03-10 22:30:29 +000014981# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014982ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014983if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014984
14985
Matthias Kloseb9621712010-04-24 17:59:49 +000014986$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014987
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014988 wchar_h="yes"
14989
Guido van Rossumef2255b2000-03-10 22:30:29 +000014990else
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014992
14993fi
14994
Michael W. Hudson54241132001-12-07 15:38:26 +000014995
Martin v. Löwis11437992002-04-12 09:54:03 +000014996
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014997# determine wchar_t size
14998if test "$wchar_h" = yes
14999then
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15002# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15003# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000015004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15005$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015006if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015007 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015008else
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
15010"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
Martin v. Löwis11437992002-04-12 09:54:03 +000015012else
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 if test "$ac_cv_type_wchar_t" = yes; then
15014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015016as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015017See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018 else
15019 ac_cv_sizeof_wchar_t=0
15020 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015022
Martin v. Löwis11437992002-04-12 09:54:03 +000015023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15025$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026
15027
15028
Martin v. Löwis11437992002-04-12 09:54:03 +000015029cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015030#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015031_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015032
Michael W. Hudson54241132001-12-07 15:38:26 +000015033
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015034fi
15035
Matthias Kloseb9621712010-04-24 17:59:49 +000015036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15037$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015038have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015040/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015041
15042#include <tcl.h>
15043#if TCL_UTF_MAX != 6
15044# error "NOT UCS4_TCL"
15045#endif
15046int
15047main ()
15048{
15049
15050 ;
15051 return 0;
15052}
15053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015054if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015055
15056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015058
15059 have_ucs4_tcl=yes
15060
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15064$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015065
Skip Montanaro6dead952003-09-25 14:50:04 +000015066# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015067if test "$wchar_h" = yes
15068then
15069 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15071$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015072 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015074else
15075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015077 ac_cv_wchar_t_signed=yes
15078else
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015080/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015081
15082 #include <wchar.h>
15083 int main()
15084 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015085 /* Success: exit code 0 */
15086 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015087 }
15088
15089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015090if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015091 ac_cv_wchar_t_signed=yes
15092else
Matthias Kloseb9621712010-04-24 17:59:49 +000015093 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15096 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015097fi
15098
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015099fi
15100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15102$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103fi
15104
Michael Osipov3738fad2018-08-24 18:17:19 +020015105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15106$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015107# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015108if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015109 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015110then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015113
Michael Osipov3738fad2018-08-24 18:17:19 +020015114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15115$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015116else
Michael Osipov3738fad2018-08-24 18:17:19 +020015117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15118$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015119fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015120
15121# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15123$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015124if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015126else
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 ac_cv_c_bigendian=unknown
15128 # See if we're dealing with a universal compiler.
15129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15130/* end confdefs.h. */
15131#ifndef __APPLE_CC__
15132 not a universal capable compiler
15133 #endif
15134 typedef int dummy;
15135
Skip Montanaro6dead952003-09-25 14:50:04 +000015136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015137if ac_fn_c_try_compile "$LINENO"; then :
15138
15139 # Check for potential -arch flags. It is not universal unless
15140 # there are at least two -arch flags with different values.
15141 ac_arch=
15142 ac_prev=
15143 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15144 if test -n "$ac_prev"; then
15145 case $ac_word in
15146 i?86 | x86_64 | ppc | ppc64)
15147 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15148 ac_arch=$ac_word
15149 else
15150 ac_cv_c_bigendian=universal
15151 break
15152 fi
15153 ;;
15154 esac
15155 ac_prev=
15156 elif test "x$ac_word" = "x-arch"; then
15157 ac_prev=arch
15158 fi
15159 done
15160fi
15161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15162 if test $ac_cv_c_bigendian = unknown; then
15163 # See if sys/param.h defines the BYTE_ORDER macro.
15164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015165/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015166#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015168
Martin v. Löwis11437992002-04-12 09:54:03 +000015169int
15170main ()
15171{
Matthias Kloseb9621712010-04-24 17:59:49 +000015172#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15173 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15174 && LITTLE_ENDIAN)
15175 bogus endian macros
15176 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015177
15178 ;
15179 return 0;
15180}
15181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015182if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015183 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015185/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015186#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015188
Martin v. Löwis11437992002-04-12 09:54:03 +000015189int
15190main ()
15191{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015192#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 not big endian
15194 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015195
15196 ;
15197 return 0;
15198}
15199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015200if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015201 ac_cv_c_bigendian=yes
15202else
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015206fi
15207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15208 fi
15209 if test $ac_cv_c_bigendian = unknown; then
15210 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015212/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015213#include <limits.h>
15214
Martin v. Löwis11437992002-04-12 09:54:03 +000015215int
15216main ()
15217{
Matthias Kloseb9621712010-04-24 17:59:49 +000015218#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15219 bogus endian macros
15220 #endif
15221
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 ;
15223 return 0;
15224}
15225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015226if ac_fn_c_try_compile "$LINENO"; then :
15227 # It does; now see whether it defined to _BIG_ENDIAN or not.
15228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15229/* end confdefs.h. */
15230#include <limits.h>
15231
15232int
15233main ()
15234{
15235#ifndef _BIG_ENDIAN
15236 not big endian
15237 #endif
15238
15239 ;
15240 return 0;
15241}
15242_ACEOF
15243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015245else
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15249fi
15250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15251 fi
15252 if test $ac_cv_c_bigendian = unknown; then
15253 # Compile a test program.
15254 if test "$cross_compiling" = yes; then :
15255 # Try to guess by grepping values from an object file.
15256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15257/* end confdefs.h. */
15258short int ascii_mm[] =
15259 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15260 short int ascii_ii[] =
15261 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15262 int use_ascii (int i) {
15263 return ascii_mm[i] + ascii_ii[i];
15264 }
15265 short int ebcdic_ii[] =
15266 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15267 short int ebcdic_mm[] =
15268 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15269 int use_ebcdic (int i) {
15270 return ebcdic_mm[i] + ebcdic_ii[i];
15271 }
15272 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274int
15275main ()
15276{
15277return use_ascii (foo) == use_ebcdic (foo);
15278 ;
15279 return 0;
15280}
15281_ACEOF
15282if ac_fn_c_try_compile "$LINENO"; then :
15283 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15284 ac_cv_c_bigendian=yes
15285 fi
15286 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15287 if test "$ac_cv_c_bigendian" = unknown; then
15288 ac_cv_c_bigendian=no
15289 else
15290 # finding both strings is unlikely to happen, but who knows?
15291 ac_cv_c_bigendian=unknown
15292 fi
15293 fi
15294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015296else
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015298/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015300int
15301main ()
15302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015303
Matthias Kloseb9621712010-04-24 17:59:49 +000015304 /* Are we little or big endian? From Harbison&Steele. */
15305 union
15306 {
15307 long int l;
15308 char c[sizeof (long int)];
15309 } u;
15310 u.l = 1;
15311 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312
15313 ;
15314 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015315}
Martin v. Löwis11437992002-04-12 09:54:03 +000015316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015317if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015318 ac_cv_c_bigendian=no
15319else
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15329$as_echo "$ac_cv_c_bigendian" >&6; }
15330 case $ac_cv_c_bigendian in #(
15331 yes)
15332 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15333;; #(
15334 no)
15335 ;; #(
15336 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015339
Matthias Kloseb9621712010-04-24 17:59:49 +000015340 ;; #(
15341 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015342 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015343 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015344 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015345
Michael W. Hudson54241132001-12-07 15:38:26 +000015346
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015347# ABI version string for Python extension modules. This appears between the
15348# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15349# from the following attributes which affect the ABI of this Python build (in
15350# this order):
15351#
15352# * The Python implementation (always 'cpython-' for us)
15353# * The major and minor version numbers
15354# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015355#
15356# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015357# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15358# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015359#
15360# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15361# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015362
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15364$as_echo_n "checking ABIFLAGS... " >&6; }
15365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15366$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15368$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015369SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15371$as_echo "$SOABI" >&6; }
15372
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015373# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15374if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015375 # Similar to SOABI but remove "d" flag from ABIFLAGS
15376
15377 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15378
15379cat >>confdefs.h <<_ACEOF
15380#define ALT_SOABI "${ALT_SOABI}"
15381_ACEOF
15382
15383fi
15384
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015385
15386case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015387 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015388 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15389 *)
15390 EXT_SUFFIX=${SHLIB_SUFFIX};;
15391esac
15392
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15394$as_echo_n "checking LDVERSION... " >&6; }
15395LDVERSION='$(VERSION)$(ABIFLAGS)'
15396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15397$as_echo "$LDVERSION" >&6; }
15398
E. M. Brayc994c8f2019-05-24 17:33:47 +020015399# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015400
E. M. Brayb1fc4172019-05-24 18:39:39 +020015401if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015402 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015403else
15404 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015405fi
15406
doko@python.org87421192013-01-26 11:39:31 +010015407
Miss Islington (bot)6cb24a02020-06-09 06:54:54 -070015408
15409BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15410
15411
15412# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015413# /usr/$LIDIRNAME/python$VERSION
15414
15415PLATLIBDIR="lib"
15416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15417$as_echo_n "checking for --with-platlibdir... " >&6; }
15418
15419# Check whether --with-platlibdir was given.
15420if test "${with_platlibdir+set}" = set; then :
15421 withval=$with_platlibdir;
15422# ignore 3 options:
15423# --with-platlibdir
15424# --with-platlibdir=
15425# --without-platlibdir
15426if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15427then
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15429$as_echo "yes" >&6; }
15430 PLATLIBDIR="$withval"
Miss Islington (bot)6cb24a02020-06-09 06:54:54 -070015431 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015432else
Victor Stinner8510f432020-03-10 09:53:09 +010015433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15434$as_echo "no" >&6; }
15435fi
15436else
15437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15438$as_echo "no" >&6; }
15439fi
15440
15441
15442
15443
15444if test x$PLATFORM_TRIPLET = x; then
15445 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15446else
15447 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015448fi
doko@python.org87421192013-01-26 11:39:31 +010015449
15450
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015451# Check whether right shifting a negative integer extends the sign bit
15452# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15454$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015455if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015457else
Martin v. Löwis11437992002-04-12 09:54:03 +000015458
Matthias Kloseb9621712010-04-24 17:59:49 +000015459if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015460 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015461else
Matthias Kloseb9621712010-04-24 17:59:49 +000015462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015463/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015464
15465int main()
15466{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015467 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015468}
15469
Martin v. Löwis11437992002-04-12 09:54:03 +000015470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015471if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015472 ac_cv_rshift_extends_sign=yes
15473else
Matthias Kloseb9621712010-04-24 17:59:49 +000015474 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15477 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015478fi
15479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480fi
15481
Matthias Kloseb9621712010-04-24 17:59:49 +000015482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15483$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015484if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015485then
Martin v. Löwis11437992002-04-12 09:54:03 +000015486
Matthias Kloseb9621712010-04-24 17:59:49 +000015487$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015488
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015489fi
15490
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015491# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15493$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015494if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015496else
Martin v. Löwis11437992002-04-12 09:54:03 +000015497
Matthias Kloseb9621712010-04-24 17:59:49 +000015498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015499/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015500#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015501int
15502main ()
15503{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015504
15505 FILE *f = fopen("/dev/null", "r");
15506 flockfile(f);
15507 getc_unlocked(f);
15508 funlockfile(f);
15509
Martin v. Löwis11437992002-04-12 09:54:03 +000015510 ;
15511 return 0;
15512}
15513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015514if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015515 ac_cv_have_getc_unlocked=yes
15516else
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 ac_cv_have_getc_unlocked=no
15518fi
15519rm -f core conftest.err conftest.$ac_objext \
15520 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522
Matthias Kloseb9621712010-04-24 17:59:49 +000015523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15524$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015525if test "$ac_cv_have_getc_unlocked" = yes
15526then
Martin v. Löwis11437992002-04-12 09:54:03 +000015527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015529
15530fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015531
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015532# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015533# save the value of LIBS so we don't actually link Python with readline
15534LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015535
Gregory P. Smith18820942008-09-07 06:24:49 +000015536# On some systems we need to link readline to a termcap compatible
15537# library. NOTE: Keep the precedence of listed libraries synchronised
15538# with setup.py.
15539py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15541$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015542for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015543 if test -z "$py_libtermcap"; then
15544 READLINE_LIBS="-lreadline"
15545 else
15546 READLINE_LIBS="-lreadline -l$py_libtermcap"
15547 fi
15548 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015550/* end confdefs.h. */
15551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015552/* Override any GCC internal prototype to avoid an error.
15553 Use char because int might match the return type of a GCC
15554 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015555#ifdef __cplusplus
15556extern "C"
15557#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015558char readline ();
15559int
15560main ()
15561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015562return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015563 ;
15564 return 0;
15565}
15566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015567if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015568 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015570rm -f core conftest.err conftest.$ac_objext \
15571 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015572 if test $py_cv_lib_readline = yes; then
15573 break
15574 fi
15575done
15576# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15577#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015578if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15580$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015581else
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15583$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015586
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015587fi
15588
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015589# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015591/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015592#include <readline/readline.h>
15593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015594if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015595 have_readline=yes
15596else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015597 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015598
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015599fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015600rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015601if test $have_readline = yes
15602then
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015604/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015605#include <readline/readline.h>
15606
15607_ACEOF
15608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015609 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015610
Matthias Kloseb9621712010-04-24 17:59:49 +000015611$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015612
15613fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015614rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015615
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015617/* end confdefs.h. */
15618#include <readline/readline.h>
15619
15620_ACEOF
15621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015623
Matthias Kloseb9621712010-04-24 17:59:49 +000015624$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015625
15626fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015627rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015628
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015629fi
15630
Martin v. Löwis0daad592001-09-30 21:09:59 +000015631# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15633$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015634if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015636else
Martin v. Löwis11437992002-04-12 09:54:03 +000015637 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015638LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642/* Override any GCC internal prototype to avoid an error.
15643 Use char because int might match the return type of a GCC
15644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015645#ifdef __cplusplus
15646extern "C"
15647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015648char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015649int
15650main ()
15651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 ;
15654 return 0;
15655}
15656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015658 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015659else
Matthias Kloseb9621712010-04-24 17:59:49 +000015660 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015662rm -f core conftest.err conftest.$ac_objext \
15663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015664LIBS=$ac_check_lib_save_LIBS
15665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15667$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015668if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015669
Matthias Kloseb9621712010-04-24 17:59:49 +000015670$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015671
Martin v. Löwis0daad592001-09-30 21:09:59 +000015672fi
15673
Michael W. Hudson54241132001-12-07 15:38:26 +000015674
Thomas Wouters89d996e2007-09-08 17:39:28 +000015675# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15677$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015678if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015679 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015680else
15681 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015682LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015684/* end confdefs.h. */
15685
15686/* Override any GCC internal prototype to avoid an error.
15687 Use char because int might match the return type of a GCC
15688 builtin and then its argument prototype would still apply. */
15689#ifdef __cplusplus
15690extern "C"
15691#endif
15692char rl_completion_display_matches_hook ();
15693int
15694main ()
15695{
15696return rl_completion_display_matches_hook ();
15697 ;
15698 return 0;
15699}
15700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015701if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015702 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15703else
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015706rm -f core conftest.err conftest.$ac_objext \
15707 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015708LIBS=$ac_check_lib_save_LIBS
15709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15711$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015712if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015713
Matthias Kloseb9621712010-04-24 17:59:49 +000015714$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015715
15716fi
15717
15718
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015719# also in 4.0, but not in editline
15720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15721$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15722if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15723 $as_echo_n "(cached) " >&6
15724else
15725 ac_check_lib_save_LIBS=$LIBS
15726LIBS="-lreadline $READLINE_LIBS $LIBS"
15727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15728/* end confdefs.h. */
15729
15730/* Override any GCC internal prototype to avoid an error.
15731 Use char because int might match the return type of a GCC
15732 builtin and then its argument prototype would still apply. */
15733#ifdef __cplusplus
15734extern "C"
15735#endif
15736char rl_resize_terminal ();
15737int
15738main ()
15739{
15740return rl_resize_terminal ();
15741 ;
15742 return 0;
15743}
15744_ACEOF
15745if ac_fn_c_try_link "$LINENO"; then :
15746 ac_cv_lib_readline_rl_resize_terminal=yes
15747else
15748 ac_cv_lib_readline_rl_resize_terminal=no
15749fi
15750rm -f core conftest.err conftest.$ac_objext \
15751 conftest$ac_exeext conftest.$ac_ext
15752LIBS=$ac_check_lib_save_LIBS
15753fi
15754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15755$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15756if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15757
15758$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15759
15760fi
15761
15762
Martin v. Löwis0daad592001-09-30 21:09:59 +000015763# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15765$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015766if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015768else
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015770LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774/* Override any GCC internal prototype to avoid an error.
15775 Use char because int might match the return type of a GCC
15776 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015777#ifdef __cplusplus
15778extern "C"
15779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015780char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015781int
15782main ()
15783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015785 ;
15786 return 0;
15787}
15788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015790 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015791else
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015794rm -f core conftest.err conftest.$ac_objext \
15795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015796LIBS=$ac_check_lib_save_LIBS
15797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15799$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015800if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015801
Matthias Kloseb9621712010-04-24 17:59:49 +000015802$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015803
Guido van Rossum353ae582001-07-10 16:45:32 +000015804fi
15805
Jack Jansendd19cf82001-12-06 22:36:17 +000015806
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015807# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015809/* end confdefs.h. */
15810#include <readline/readline.h>
15811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015812if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015813 have_readline=yes
15814else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015815 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015816
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015817fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015818rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015819if test $have_readline = yes
15820then
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015822/* end confdefs.h. */
15823#include <readline/readline.h>
15824
15825_ACEOF
15826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015827 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015828
Matthias Kloseb9621712010-04-24 17:59:49 +000015829$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015830
15831fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015832rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015833
15834fi
15835
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15837$as_echo_n "checking for append_history in -lreadline... " >&6; }
15838if ${ac_cv_lib_readline_append_history+:} false; then :
15839 $as_echo_n "(cached) " >&6
15840else
15841 ac_check_lib_save_LIBS=$LIBS
15842LIBS="-lreadline $READLINE_LIBS $LIBS"
15843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15844/* end confdefs.h. */
15845
15846/* Override any GCC internal prototype to avoid an error.
15847 Use char because int might match the return type of a GCC
15848 builtin and then its argument prototype would still apply. */
15849#ifdef __cplusplus
15850extern "C"
15851#endif
15852char append_history ();
15853int
15854main ()
15855{
15856return append_history ();
15857 ;
15858 return 0;
15859}
15860_ACEOF
15861if ac_fn_c_try_link "$LINENO"; then :
15862 ac_cv_lib_readline_append_history=yes
15863else
15864 ac_cv_lib_readline_append_history=no
15865fi
15866rm -f core conftest.err conftest.$ac_objext \
15867 conftest$ac_exeext conftest.$ac_ext
15868LIBS=$ac_check_lib_save_LIBS
15869fi
15870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15871$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15872if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15873
15874$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15875
15876fi
15877
15878
Martin v. Löwis82bca632006-02-10 20:49:30 +000015879# End of readline checks: restore LIBS
15880LIBS=$LIBS_no_readline
15881
Matthias Kloseb9621712010-04-24 17:59:49 +000015882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15883$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015884if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015885 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015886else
Martin v. Löwis11437992002-04-12 09:54:03 +000015887
Matthias Kloseb9621712010-04-24 17:59:49 +000015888if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015889 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015890else
Matthias Kloseb9621712010-04-24 17:59:49 +000015891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015892/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015893
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015894#include <stdlib.h>
15895#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015896int main()
15897{
15898 int val1 = nice(1);
15899 if (val1 != -1 && val1 == nice(2))
15900 exit(0);
15901 exit(1);
15902}
15903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015905if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015906 ac_cv_broken_nice=yes
15907else
Matthias Kloseb9621712010-04-24 17:59:49 +000015908 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015912fi
15913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015914fi
15915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15917$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015918if test "$ac_cv_broken_nice" = yes
15919then
Martin v. Löwis11437992002-04-12 09:54:03 +000015920
Matthias Kloseb9621712010-04-24 17:59:49 +000015921$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015922
15923fi
15924
Matthias Kloseb9621712010-04-24 17:59:49 +000015925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15926$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015927if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015928 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015929else
Matthias Kloseb9621712010-04-24 17:59:49 +000015930 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015931 ac_cv_broken_poll=no
15932else
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015934/* end confdefs.h. */
15935
15936#include <poll.h>
15937
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015938int main()
15939{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015940 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015941 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015942
15943 close (42);
15944
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015945 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015946 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015947 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015948 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015949 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015950 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015951 return 1;
15952}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015953
15954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015955if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015956 ac_cv_broken_poll=yes
15957else
Matthias Kloseb9621712010-04-24 17:59:49 +000015958 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015964fi
15965
Matthias Kloseb9621712010-04-24 17:59:49 +000015966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15967$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015968if test "$ac_cv_broken_poll" = yes
15969then
15970
Matthias Kloseb9621712010-04-24 17:59:49 +000015971$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015972
15973fi
15974
Martin v. Löwis1d459062005-03-14 21:23:33 +000015975# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15977$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015978if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015979 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015980else
15981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015983 ac_cv_working_tzset=no
15984else
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015986/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015987
15988#include <stdlib.h>
15989#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015990#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015991
15992#if HAVE_TZNAME
15993extern char *tzname[];
15994#endif
15995
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015996int main()
15997{
Brett Cannon18367812003-09-19 00:59:16 +000015998 /* Note that we need to ensure that not only does tzset(3)
15999 do 'something' with localtime, but it works as documented
16000 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016001 This includes making sure that tzname is set properly if
16002 tm->tm_zone does not exist since it is the alternative way
16003 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016004
16005 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016006 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016007 */
16008
Martin v. Löwis1d459062005-03-14 21:23:33 +000016009 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016010 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16011
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016012 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016013 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016014 if (localtime(&groundhogday)->tm_hour != 0)
16015 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016016#if HAVE_TZNAME
16017 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16018 if (strcmp(tzname[0], "UTC") ||
16019 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16020 exit(1);
16021#endif
Brett Cannon18367812003-09-19 00:59:16 +000016022
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016023 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016024 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016025 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016026 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016027#if HAVE_TZNAME
16028 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16029 exit(1);
16030#endif
Brett Cannon18367812003-09-19 00:59:16 +000016031
16032 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16033 tzset();
16034 if (localtime(&groundhogday)->tm_hour != 11)
16035 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016036#if HAVE_TZNAME
16037 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16038 exit(1);
16039#endif
16040
16041#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016042 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16043 exit(1);
16044 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16045 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016046#endif
Brett Cannon18367812003-09-19 00:59:16 +000016047
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016048 exit(0);
16049}
16050
16051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016052if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016053 ac_cv_working_tzset=yes
16054else
Matthias Kloseb9621712010-04-24 17:59:49 +000016055 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016059fi
16060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016061fi
16062
Matthias Kloseb9621712010-04-24 17:59:49 +000016063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16064$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016065if test "$ac_cv_working_tzset" = yes
16066then
16067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016069
16070fi
16071
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016072# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16074$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016075if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016076 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016077else
Matthias Kloseb9621712010-04-24 17:59:49 +000016078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016079/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016080#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016081int
16082main ()
16083{
16084
16085struct stat st;
16086st.st_mtim.tv_nsec = 1;
16087
16088 ;
16089 return 0;
16090}
16091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016092if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016093 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016094else
Matthias Kloseb9621712010-04-24 17:59:49 +000016095 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16098fi
16099
Matthias Kloseb9621712010-04-24 17:59:49 +000016100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16101$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016102if test "$ac_cv_stat_tv_nsec" = yes
16103then
16104
Matthias Kloseb9621712010-04-24 17:59:49 +000016105$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016106
16107fi
16108
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016109# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16111$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016112if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016113 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016114else
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016116/* end confdefs.h. */
16117#include <sys/stat.h>
16118int
16119main ()
16120{
16121
16122struct stat st;
16123st.st_mtimespec.tv_nsec = 1;
16124
16125 ;
16126 return 0;
16127}
16128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016129if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016130 ac_cv_stat_tv_nsec2=yes
16131else
Matthias Kloseb9621712010-04-24 17:59:49 +000016132 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16135fi
16136
Matthias Kloseb9621712010-04-24 17:59:49 +000016137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16138$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016139if test "$ac_cv_stat_tv_nsec2" = yes
16140then
16141
Matthias Kloseb9621712010-04-24 17:59:49 +000016142$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016143
16144fi
16145
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016146# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016147ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016148if test "$cross_compiling" = no; then
16149 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16150fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016151
16152for ac_header in curses.h ncurses.h
16153do :
16154 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16155ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16156if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16157 cat >>confdefs.h <<_ACEOF
16158#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16159_ACEOF
16160
16161fi
16162
16163done
16164
16165
16166# On Solaris, term.h requires curses.h
16167for ac_header in term.h
16168do :
16169 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16170#ifdef HAVE_CURSES_H
16171#include <curses.h>
16172#endif
16173
16174"
16175if test "x$ac_cv_header_term_h" = xyes; then :
16176 cat >>confdefs.h <<_ACEOF
16177#define HAVE_TERM_H 1
16178_ACEOF
16179
16180fi
16181
16182done
16183
16184
Jack Jansen666b1e72001-10-31 12:11:48 +000016185# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16187$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016188if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016190else
Matthias Kloseb9621712010-04-24 17:59:49 +000016191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016192/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016193#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016194int
16195main ()
16196{
Jack Jansen666b1e72001-10-31 12:11:48 +000016197
16198 int rtn;
16199 rtn = mvwdelch(0,0,0);
16200
Martin v. Löwis11437992002-04-12 09:54:03 +000016201 ;
16202 return 0;
16203}
16204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016205if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016206 ac_cv_mvwdelch_is_expression=yes
16207else
Matthias Kloseb9621712010-04-24 17:59:49 +000016208 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16211fi
16212
Matthias Kloseb9621712010-04-24 17:59:49 +000016213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16214$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016215
16216if test "$ac_cv_mvwdelch_is_expression" = yes
16217then
Martin v. Löwis11437992002-04-12 09:54:03 +000016218
Matthias Kloseb9621712010-04-24 17:59:49 +000016219$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016220
16221fi
16222
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016223# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16224# structs since version 5.7. If the macro is defined as zero before including
16225# [n]curses.h, ncurses will expose fields of the structs regardless of the
16226# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16228$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016229if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016230 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016231else
Matthias Kloseb9621712010-04-24 17:59:49 +000016232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016233/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016234
16235 #define NCURSES_OPAQUE 0
16236 #include <curses.h>
16237
Martin v. Löwis11437992002-04-12 09:54:03 +000016238int
16239main ()
16240{
Jack Jansen666b1e72001-10-31 12:11:48 +000016241
16242 WINDOW *w;
16243 w->_flags = 0;
16244
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 ;
16246 return 0;
16247}
16248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016249if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016250 ac_cv_window_has_flags=yes
16251else
Matthias Kloseb9621712010-04-24 17:59:49 +000016252 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16255fi
16256
Matthias Kloseb9621712010-04-24 17:59:49 +000016257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16258$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016259
Jack Jansen666b1e72001-10-31 12:11:48 +000016260
16261if test "$ac_cv_window_has_flags" = yes
16262then
Martin v. Löwis11437992002-04-12 09:54:03 +000016263
Matthias Kloseb9621712010-04-24 17:59:49 +000016264$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016265
16266fi
16267
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16269$as_echo_n "checking for is_pad... " >&6; }
16270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16271/* end confdefs.h. */
16272#include <curses.h>
16273int
16274main ()
16275{
16276
16277#ifndef is_pad
16278void *x=is_pad
16279#endif
16280
16281 ;
16282 return 0;
16283}
16284_ACEOF
16285if ac_fn_c_try_compile "$LINENO"; then :
16286
16287$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16288
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16290$as_echo "yes" >&6; }
16291else
16292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16293$as_echo "no" >&6; }
16294
16295fi
16296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16297
Matthias Kloseb9621712010-04-24 17:59:49 +000016298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16299$as_echo_n "checking for is_term_resized... " >&6; }
16300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016301/* end confdefs.h. */
16302#include <curses.h>
16303int
16304main ()
16305{
16306void *x=is_term_resized
16307 ;
16308 return 0;
16309}
16310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016312
Matthias Kloseb9621712010-04-24 17:59:49 +000016313$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016314
Matthias Kloseb159a552010-04-25 21:00:44 +000016315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016316$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016317else
Matthias Kloseb9621712010-04-24 17:59:49 +000016318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16319$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016320
16321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16323
Matthias Kloseb9621712010-04-24 17:59:49 +000016324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16325$as_echo_n "checking for resize_term... " >&6; }
16326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016327/* end confdefs.h. */
16328#include <curses.h>
16329int
16330main ()
16331{
16332void *x=resize_term
16333 ;
16334 return 0;
16335}
16336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016337if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016338
Matthias Kloseb9621712010-04-24 17:59:49 +000016339$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016340
Matthias Kloseb159a552010-04-25 21:00:44 +000016341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016342$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016343else
Matthias Kloseb9621712010-04-24 17:59:49 +000016344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16345$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016346
16347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16349
Matthias Kloseb9621712010-04-24 17:59:49 +000016350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16351$as_echo_n "checking for resizeterm... " >&6; }
16352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016353/* end confdefs.h. */
16354#include <curses.h>
16355int
16356main ()
16357{
16358void *x=resizeterm
16359 ;
16360 return 0;
16361}
16362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016363if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016364
Matthias Kloseb9621712010-04-24 17:59:49 +000016365$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016366
Matthias Kloseb159a552010-04-25 21:00:44 +000016367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016368$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016369else
Matthias Kloseb9621712010-04-24 17:59:49 +000016370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16371$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016372
16373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016375
16376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16377$as_echo_n "checking for immedok... " >&6; }
16378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16379/* end confdefs.h. */
16380#include <curses.h>
16381int
16382main ()
16383{
16384
16385#ifndef immedok
16386void *x=immedok
16387#endif
16388
16389 ;
16390 return 0;
16391}
16392_ACEOF
16393if ac_fn_c_try_compile "$LINENO"; then :
16394
16395$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16396
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16398$as_echo "yes" >&6; }
16399else
16400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16401$as_echo "no" >&6; }
16402
16403fi
16404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16405
16406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16407$as_echo_n "checking for syncok... " >&6; }
16408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16409/* end confdefs.h. */
16410#include <curses.h>
16411int
16412main ()
16413{
16414
16415#ifndef syncok
16416void *x=syncok
16417#endif
16418
16419 ;
16420 return 0;
16421}
16422_ACEOF
16423if ac_fn_c_try_compile "$LINENO"; then :
16424
16425$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16426
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16428$as_echo "yes" >&6; }
16429else
16430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16431$as_echo "no" >&6; }
16432
16433fi
16434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16435
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16437$as_echo_n "checking for wchgat... " >&6; }
16438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16439/* end confdefs.h. */
16440#include <curses.h>
16441int
16442main ()
16443{
16444
16445#ifndef wchgat
16446void *x=wchgat
16447#endif
16448
16449 ;
16450 return 0;
16451}
16452_ACEOF
16453if ac_fn_c_try_compile "$LINENO"; then :
16454
16455$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16456
16457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16458$as_echo "yes" >&6; }
16459else
16460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16461$as_echo "no" >&6; }
16462
16463fi
16464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16465
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16467$as_echo_n "checking for filter... " >&6; }
16468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16469/* end confdefs.h. */
16470#include <curses.h>
16471int
16472main ()
16473{
16474
16475#ifndef filter
16476void *x=filter
16477#endif
16478
16479 ;
16480 return 0;
16481}
16482_ACEOF
16483if ac_fn_c_try_compile "$LINENO"; then :
16484
16485$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16486
16487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16488$as_echo "yes" >&6; }
16489else
16490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16491$as_echo "no" >&6; }
16492
16493fi
16494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16495
16496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16497$as_echo_n "checking for has_key... " >&6; }
16498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16499/* end confdefs.h. */
16500#include <curses.h>
16501int
16502main ()
16503{
16504
16505#ifndef has_key
16506void *x=has_key
16507#endif
16508
16509 ;
16510 return 0;
16511}
16512_ACEOF
16513if ac_fn_c_try_compile "$LINENO"; then :
16514
16515$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16516
16517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16518$as_echo "yes" >&6; }
16519else
16520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16521$as_echo "no" >&6; }
16522
16523fi
16524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16525
16526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16527$as_echo_n "checking for typeahead... " >&6; }
16528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16529/* end confdefs.h. */
16530#include <curses.h>
16531int
16532main ()
16533{
16534
16535#ifndef typeahead
16536void *x=typeahead
16537#endif
16538
16539 ;
16540 return 0;
16541}
16542_ACEOF
16543if ac_fn_c_try_compile "$LINENO"; then :
16544
16545$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16546
16547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16548$as_echo "yes" >&6; }
16549else
16550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16551$as_echo "no" >&6; }
16552
16553fi
16554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16555
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16557$as_echo_n "checking for use_env... " >&6; }
16558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16559/* end confdefs.h. */
16560#include <curses.h>
16561int
16562main ()
16563{
16564
16565#ifndef use_env
16566void *x=use_env
16567#endif
16568
16569 ;
16570 return 0;
16571}
16572_ACEOF
16573if ac_fn_c_try_compile "$LINENO"; then :
16574
16575$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16576
16577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16578$as_echo "yes" >&6; }
16579else
16580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16581$as_echo "no" >&6; }
16582
16583fi
16584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016585# last curses configure check
16586CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016587
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16589$as_echo "$as_me: checking for device files" >&6;}
16590
16591if test "x$cross_compiling" = xyes; then
16592 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16594$as_echo_n "checking for /dev/ptmx... " >&6; }
16595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16596$as_echo "not set" >&6; }
16597 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16598 fi
16599 if test "${ac_cv_file__dev_ptc+set}" != set; then
16600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16601$as_echo_n "checking for /dev/ptc... " >&6; }
16602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16603$as_echo "not set" >&6; }
16604 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16605 fi
16606fi
16607
Matthias Kloseb9621712010-04-24 17:59:49 +000016608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16609$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016610if ${ac_cv_file__dev_ptmx+:} false; then :
16611 $as_echo_n "(cached) " >&6
16612else
16613 test "$cross_compiling" = yes &&
16614 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16615if test -r "/dev/ptmx"; then
16616 ac_cv_file__dev_ptmx=yes
16617else
16618 ac_cv_file__dev_ptmx=no
16619fi
16620fi
16621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16622$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16623if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016624
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016625fi
16626
16627if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016628
Matthias Kloseb9621712010-04-24 17:59:49 +000016629$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016630
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16633$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016634if ${ac_cv_file__dev_ptc+:} false; then :
16635 $as_echo_n "(cached) " >&6
16636else
16637 test "$cross_compiling" = yes &&
16638 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16639if test -r "/dev/ptc"; then
16640 ac_cv_file__dev_ptc=yes
16641else
16642 ac_cv_file__dev_ptc=no
16643fi
16644fi
16645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16646$as_echo "$ac_cv_file__dev_ptc" >&6; }
16647if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016648
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016649fi
16650
16651if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016652
Matthias Kloseb9621712010-04-24 17:59:49 +000016653$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016654
Neal Norwitz865400f2003-03-21 01:42:58 +000016655fi
16656
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016657if test $ac_sys_system = Darwin
16658then
16659 LIBS="$LIBS -framework CoreFoundation"
16660fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016661
Matthias Kloseb9621712010-04-24 17:59:49 +000016662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16663$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016664if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016665 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016666else
Matthias Kloseb9621712010-04-24 17:59:49 +000016667 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016668 ac_cv_have_size_t_format="cross -- assuming yes"
16669
Thomas Wouters477c8d52006-05-27 19:21:47 +000016670else
Matthias Kloseb9621712010-04-24 17:59:49 +000016671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016672/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016673
Thomas Wouters477c8d52006-05-27 19:21:47 +000016674#include <stdio.h>
16675#include <stddef.h>
16676#include <string.h>
16677
Christian Heimes2c181612007-12-17 20:04:13 +000016678#ifdef HAVE_SYS_TYPES_H
16679#include <sys/types.h>
16680#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016681
16682#ifdef HAVE_SSIZE_T
16683typedef ssize_t Py_ssize_t;
16684#elif SIZEOF_VOID_P == SIZEOF_LONG
16685typedef long Py_ssize_t;
16686#else
16687typedef int Py_ssize_t;
16688#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016689
Christian Heimes2c181612007-12-17 20:04:13 +000016690int main()
16691{
16692 char buffer[256];
16693
Thomas Wouters477c8d52006-05-27 19:21:47 +000016694 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16695 return 1;
16696
Thomas Wouters89f507f2006-12-13 04:49:30 +000016697 if (strcmp(buffer, "123"))
16698 return 1;
16699
16700 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16701 return 1;
16702
16703 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016704 return 1;
16705
16706 return 0;
16707}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016708
Thomas Wouters477c8d52006-05-27 19:21:47 +000016709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016710if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016711 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016712else
Matthias Kloseb9621712010-04-24 17:59:49 +000016713 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016717fi
16718
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16721$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016722if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016723
Matthias Kloseb9621712010-04-24 17:59:49 +000016724$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016725
16726fi
16727
Matthias Kloseb9621712010-04-24 17:59:49 +000016728ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016729#ifdef HAVE_SYS_TYPES_H
16730#include <sys/types.h>
16731#endif
16732#ifdef HAVE_SYS_SOCKET_H
16733#include <sys/socket.h>
16734#endif
16735
Matthias Kloseb9621712010-04-24 17:59:49 +000016736"
Victor Stinnere0be4232011-10-25 13:06:09 +020016737if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016738
Martin v. Löwis11437992002-04-12 09:54:03 +000016739else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016740
Matthias Kloseb9621712010-04-24 17:59:49 +000016741$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016742
16743fi
16744
Michael W. Hudson54241132001-12-07 15:38:26 +000016745
Matthias Kloseb9621712010-04-24 17:59:49 +000016746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16747$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016748if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016749 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016750else
Matthias Kloseb9621712010-04-24 17:59:49 +000016751 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016752 ac_cv_broken_mbstowcs=no
16753else
Matthias Kloseb9621712010-04-24 17:59:49 +000016754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016755/* end confdefs.h. */
16756
Stefan Krah19c21392012-11-22 23:47:32 +010016757#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016758#include<stdlib.h>
16759int main() {
16760 size_t len = -1;
16761 const char *str = "text";
16762 len = mbstowcs(NULL, str, 0);
16763 return (len != 4);
16764}
16765
16766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016767if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016768 ac_cv_broken_mbstowcs=no
16769else
Matthias Kloseb9621712010-04-24 17:59:49 +000016770 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016774fi
16775
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016776fi
16777
Matthias Kloseb9621712010-04-24 17:59:49 +000016778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16779$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016780if test "$ac_cv_broken_mbstowcs" = yes
16781then
16782
Matthias Kloseb9621712010-04-24 17:59:49 +000016783$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016784
16785fi
16786
Antoine Pitroub52ec782009-01-25 16:34:23 +000016787# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16789$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016790
16791# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016792if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016793 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016794if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016795then
16796
Matthias Kloseb9621712010-04-24 17:59:49 +000016797$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016798
Matthias Kloseb9621712010-04-24 17:59:49 +000016799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16800$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016801fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016802if test "$withval" = no
16803then
16804
16805$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16806
Matthias Kloseb9621712010-04-24 17:59:49 +000016807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16808$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016809fi
16810
Antoine Pitrou042b1282010-08-13 21:15:58 +000016811else
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16813$as_echo "no value specified" >&6; }
16814fi
16815
Antoine Pitroub52ec782009-01-25 16:34:23 +000016816
Matthias Kloseb17289e2012-03-15 19:51:34 +010016817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16818$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16819if ${ac_cv_computed_gotos+:} false; then :
16820 $as_echo_n "(cached) " >&6
16821else
16822 if test "$cross_compiling" = yes; then :
16823 if test "${with_computed_gotos+set}" = set; then
16824 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16825 else
16826 ac_cv_computed_gotos=no
16827 fi
16828else
16829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16830/* end confdefs.h. */
16831
16832int main(int argc, char **argv)
16833{
16834 static void *targets[1] = { &&LABEL1 };
16835 goto LABEL2;
16836LABEL1:
16837 return 0;
16838LABEL2:
16839 goto *targets[0];
16840 return 1;
16841}
16842
16843_ACEOF
16844if ac_fn_c_try_run "$LINENO"; then :
16845 ac_cv_computed_gotos=yes
16846else
16847 ac_cv_computed_gotos=no
16848fi
16849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16850 conftest.$ac_objext conftest.beam conftest.$ac_ext
16851fi
16852
16853fi
16854
16855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16856$as_echo "$ac_cv_computed_gotos" >&6; }
16857case "$ac_cv_computed_gotos" in yes*)
16858
16859$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16860
16861esac
16862
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016863case $ac_sys_system in
16864AIX*)
16865
16866$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16867 ;;
16868esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016869
Michael W. Hudson54241132001-12-07 15:38:26 +000016870
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016871
16872
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016873for h in `(cd $srcdir;echo Python/thread_*.h)`
16874do
16875 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16876done
16877
Michael W. Hudson54241132001-12-07 15:38:26 +000016878
Pablo Galindoa25f3c42020-04-23 01:38:11 +010016879SRCDIRS="Parser Parser/pegen Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16881$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016882for dir in $SRCDIRS; do
16883 if test ! -d $dir; then
16884 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016885 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016886done
Matthias Kloseb9621712010-04-24 17:59:49 +000016887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16888$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016889
Stefan Krah1919b7e2012-03-21 18:25:23 +010016890# Availability of -O2:
16891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16892$as_echo_n "checking for -O2... " >&6; }
16893saved_cflags="$CFLAGS"
16894CFLAGS="-O2"
16895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16896/* end confdefs.h. */
16897
16898int
16899main ()
16900{
16901
16902
16903 ;
16904 return 0;
16905}
16906_ACEOF
16907if ac_fn_c_try_compile "$LINENO"; then :
16908 have_O2=yes
16909else
16910 have_O2=no
16911fi
16912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16914$as_echo "$have_O2" >&6; }
16915CFLAGS="$saved_cflags"
16916
16917# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16918# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16920$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16921saved_cflags="$CFLAGS"
16922CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16923if test "$have_O2" = no; then
16924 CFLAGS=""
16925fi
16926if test "$cross_compiling" = yes; then :
16927 have_glibc_memmove_bug=undefined
16928else
16929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16930/* end confdefs.h. */
16931
16932#include <stdio.h>
16933#include <stdlib.h>
16934#include <string.h>
16935void foo(void *p, void *q) { memmove(p, q, 19); }
16936int main() {
16937 char a[32] = "123456789000000000";
16938 foo(&a[9], a);
16939 if (strcmp(a, "123456789123456789000000000") != 0)
16940 return 1;
16941 foo(a, &a[9]);
16942 if (strcmp(a, "123456789000000000") != 0)
16943 return 1;
16944 return 0;
16945}
16946
16947_ACEOF
16948if ac_fn_c_try_run "$LINENO"; then :
16949 have_glibc_memmove_bug=no
16950else
16951 have_glibc_memmove_bug=yes
16952fi
16953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16954 conftest.$ac_objext conftest.beam conftest.$ac_ext
16955fi
16956
16957CFLAGS="$saved_cflags"
16958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16959$as_echo "$have_glibc_memmove_bug" >&6; }
16960if test "$have_glibc_memmove_bug" = yes; then
16961
16962$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16963
16964fi
16965
16966if test "$have_gcc_asm_for_x87" = yes; then
16967 # Some versions of gcc miscompile inline asm:
16968 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16969 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16970 case $CC in
16971 *gcc*)
16972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16973$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16974 saved_cflags="$CFLAGS"
16975 CFLAGS="-O2"
16976 if test "$cross_compiling" = yes; then :
16977 have_ipa_pure_const_bug=undefined
16978else
16979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16980/* end confdefs.h. */
16981
16982 __attribute__((noinline)) int
16983 foo(int *p) {
16984 int r;
16985 asm ( "movl \$6, (%1)\n\t"
16986 "xorl %0, %0\n\t"
16987 : "=r" (r) : "r" (p) : "memory"
16988 );
16989 return r;
16990 }
16991 int main() {
16992 int p = 8;
16993 if ((foo(&p) ? : p) != 6)
16994 return 1;
16995 return 0;
16996 }
16997
16998_ACEOF
16999if ac_fn_c_try_run "$LINENO"; then :
17000 have_ipa_pure_const_bug=no
17001else
17002 have_ipa_pure_const_bug=yes
17003fi
17004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17005 conftest.$ac_objext conftest.beam conftest.$ac_ext
17006fi
17007
17008 CFLAGS="$saved_cflags"
17009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17010$as_echo "$have_ipa_pure_const_bug" >&6; }
17011 if test "$have_ipa_pure_const_bug" = yes; then
17012
17013$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
17014
17015 fi
17016 ;;
17017 esac
17018fi
17019
Victor Stinner4f5366e2015-01-09 02:13:19 +010017020# Check for stdatomic.h
17021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17022$as_echo_n "checking for stdatomic.h... " >&6; }
17023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17024/* end confdefs.h. */
17025
17026
17027 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017028 atomic_int int_var;
17029 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017030 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017031 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17032 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17033 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017034 return 0;
17035 }
17036
17037
17038_ACEOF
17039if ac_fn_c_try_link "$LINENO"; then :
17040 have_stdatomic_h=yes
17041else
17042 have_stdatomic_h=no
17043fi
17044rm -f core conftest.err conftest.$ac_objext \
17045 conftest$ac_exeext conftest.$ac_ext
17046
17047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17048$as_echo "$have_stdatomic_h" >&6; }
17049
17050if test "$have_stdatomic_h" = yes; then
17051
17052$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
17053
17054fi
17055
17056# Check for GCC >= 4.7 __atomic builtins
17057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
17058$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
17059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17060/* end confdefs.h. */
17061
17062
17063 volatile int val = 1;
17064 int main() {
17065 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
17066 return 0;
17067 }
17068
17069
17070_ACEOF
17071if ac_fn_c_try_link "$LINENO"; then :
17072 have_builtin_atomic=yes
17073else
17074 have_builtin_atomic=no
17075fi
17076rm -f core conftest.err conftest.$ac_objext \
17077 conftest$ac_exeext conftest.$ac_ext
17078
17079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17080$as_echo "$have_builtin_atomic" >&6; }
17081
17082if test "$have_builtin_atomic" = yes; then
17083
17084$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17085
17086fi
17087
Ned Deily322f5ba2013-11-21 23:01:59 -080017088# ensurepip option
17089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17090$as_echo_n "checking for ensurepip... " >&6; }
17091
17092# Check whether --with-ensurepip was given.
17093if test "${with_ensurepip+set}" = set; then :
17094 withval=$with_ensurepip;
17095else
17096 with_ensurepip=upgrade
17097fi
17098
17099case $with_ensurepip in #(
17100 yes|upgrade) :
17101 ENSUREPIP=upgrade ;; #(
17102 install) :
17103 ENSUREPIP=install ;; #(
17104 no) :
17105 ENSUREPIP=no ;; #(
17106 *) :
17107 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17108esac
17109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17110$as_echo "$ENSUREPIP" >&6; }
17111
17112
Victor Stinner35a97c02015-03-08 02:59:09 +010017113# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17115$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17117/* end confdefs.h. */
17118
17119
17120 #include <dirent.h>
17121
17122 int main() {
17123 struct dirent entry;
17124 return entry.d_type == DT_UNKNOWN;
17125 }
17126
17127
17128_ACEOF
17129if ac_fn_c_try_link "$LINENO"; then :
17130 have_dirent_d_type=yes
17131else
17132 have_dirent_d_type=no
17133fi
17134rm -f core conftest.err conftest.$ac_objext \
17135 conftest$ac_exeext conftest.$ac_ext
17136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17137$as_echo "$have_dirent_d_type" >&6; }
17138
17139if test "$have_dirent_d_type" = yes; then
17140
17141$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17142
17143fi
17144
Victor Stinner9eb57c52015-03-19 22:21:49 +010017145# check if the Linux getrandom() syscall is available
17146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17147$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17149/* end confdefs.h. */
17150
17151
Victor Stinner1b80b242016-04-12 22:34:58 +020017152 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017153 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017154 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017155
17156 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017157 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017158 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017159 const int flags = GRND_NONBLOCK;
17160 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017161 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017162 return 0;
17163 }
17164
17165
17166_ACEOF
17167if ac_fn_c_try_link "$LINENO"; then :
17168 have_getrandom_syscall=yes
17169else
17170 have_getrandom_syscall=no
17171fi
17172rm -f core conftest.err conftest.$ac_objext \
17173 conftest$ac_exeext conftest.$ac_ext
17174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17175$as_echo "$have_getrandom_syscall" >&6; }
17176
17177if test "$have_getrandom_syscall" = yes; then
17178
17179$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17180
17181fi
17182
Victor Stinner3abf44e2015-09-18 15:38:37 +020017183# check if the getrandom() function is available
17184# the test was written for the Solaris function of <sys/random.h>
17185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17186$as_echo_n "checking for the getrandom() function... " >&6; }
17187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17188/* end confdefs.h. */
17189
17190
17191 #include <sys/random.h>
17192
17193 int main() {
17194 char buffer[1];
17195 const size_t buflen = sizeof(buffer);
17196 const int flags = 0;
17197 /* ignore the result, Python checks for ENOSYS at runtime */
17198 (void)getrandom(buffer, buflen, flags);
17199 return 0;
17200 }
17201
17202
17203_ACEOF
17204if ac_fn_c_try_link "$LINENO"; then :
17205 have_getrandom=yes
17206else
17207 have_getrandom=no
17208fi
17209rm -f core conftest.err conftest.$ac_objext \
17210 conftest$ac_exeext conftest.$ac_ext
17211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17212$as_echo "$have_getrandom" >&6; }
17213
17214if test "$have_getrandom" = yes; then
17215
17216$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17217
17218fi
17219
Neil Schemenauer5741c452019-02-08 10:48:46 -080017220# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17221# shm_* may only be available if linking against librt
17222save_LIBS="$LIBS"
17223save_includes_default="$ac_includes_default"
17224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17225$as_echo_n "checking for library containing shm_open... " >&6; }
17226if ${ac_cv_search_shm_open+:} false; then :
17227 $as_echo_n "(cached) " >&6
17228else
17229 ac_func_search_save_LIBS=$LIBS
17230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17231/* end confdefs.h. */
17232
17233/* Override any GCC internal prototype to avoid an error.
17234 Use char because int might match the return type of a GCC
17235 builtin and then its argument prototype would still apply. */
17236#ifdef __cplusplus
17237extern "C"
17238#endif
17239char shm_open ();
17240int
17241main ()
17242{
17243return shm_open ();
17244 ;
17245 return 0;
17246}
17247_ACEOF
17248for ac_lib in '' rt; do
17249 if test -z "$ac_lib"; then
17250 ac_res="none required"
17251 else
17252 ac_res=-l$ac_lib
17253 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17254 fi
17255 if ac_fn_c_try_link "$LINENO"; then :
17256 ac_cv_search_shm_open=$ac_res
17257fi
17258rm -f core conftest.err conftest.$ac_objext \
17259 conftest$ac_exeext
17260 if ${ac_cv_search_shm_open+:} false; then :
17261 break
17262fi
17263done
17264if ${ac_cv_search_shm_open+:} false; then :
17265
17266else
17267 ac_cv_search_shm_open=no
17268fi
17269rm conftest.$ac_ext
17270LIBS=$ac_func_search_save_LIBS
17271fi
17272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17273$as_echo "$ac_cv_search_shm_open" >&6; }
17274ac_res=$ac_cv_search_shm_open
17275if test "$ac_res" != no; then :
17276 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17277
17278fi
17279
17280if test "$ac_cv_search_shm_open" = "-lrt"; then
17281
17282$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17283
17284fi
17285for ac_header in sys/mman.h
17286do :
17287 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17288if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17289 cat >>confdefs.h <<_ACEOF
17290#define HAVE_SYS_MMAN_H 1
17291_ACEOF
17292
17293fi
17294
17295done
17296
17297# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17298ac_includes_default="\
17299${ac_includes_default}
17300#ifndef __cplusplus
17301# ifdef HAVE_SYS_MMAN_H
17302# include <sys/mman.h>
17303# endif
17304#endif
17305"
17306for ac_func in shm_open shm_unlink
17307do :
17308 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17309ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17310if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17311 cat >>confdefs.h <<_ACEOF
17312#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17313_ACEOF
17314
17315fi
17316done
17317
17318# we don't want to link with librt always, restore LIBS
17319LIBS="$save_LIBS"
17320ac_includes_default="$save_includes_default"
17321
Christian Heimesff5be6e2018-01-20 13:19:21 +010017322# Check for usable OpenSSL
17323
17324 found=false
17325
17326# Check whether --with-openssl was given.
17327if test "${with_openssl+set}" = set; then :
17328 withval=$with_openssl;
17329 case "$withval" in
17330 "" | y | ye | yes | n | no)
17331 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17332 ;;
17333 *) ssldirs="$withval"
17334 ;;
17335 esac
17336
17337else
17338
17339 # if pkg-config is installed and openssl has installed a .pc file,
17340 # then use that information and don't search ssldirs
17341 if test -n "$ac_tool_prefix"; then
17342 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17343set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17345$as_echo_n "checking for $ac_word... " >&6; }
17346if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17347 $as_echo_n "(cached) " >&6
17348else
17349 if test -n "$PKG_CONFIG"; then
17350 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17351else
17352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17353for as_dir in $PATH
17354do
17355 IFS=$as_save_IFS
17356 test -z "$as_dir" && as_dir=.
17357 for ac_exec_ext in '' $ac_executable_extensions; do
17358 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17359 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17360 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17361 break 2
17362 fi
17363done
17364 done
17365IFS=$as_save_IFS
17366
17367fi
17368fi
17369PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17370if test -n "$PKG_CONFIG"; then
17371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17372$as_echo "$PKG_CONFIG" >&6; }
17373else
17374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17375$as_echo "no" >&6; }
17376fi
17377
17378
17379fi
17380if test -z "$ac_cv_prog_PKG_CONFIG"; then
17381 ac_ct_PKG_CONFIG=$PKG_CONFIG
17382 # Extract the first word of "pkg-config", so it can be a program name with args.
17383set dummy pkg-config; ac_word=$2
17384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17385$as_echo_n "checking for $ac_word... " >&6; }
17386if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17387 $as_echo_n "(cached) " >&6
17388else
17389 if test -n "$ac_ct_PKG_CONFIG"; then
17390 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17391else
17392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17393for as_dir in $PATH
17394do
17395 IFS=$as_save_IFS
17396 test -z "$as_dir" && as_dir=.
17397 for ac_exec_ext in '' $ac_executable_extensions; do
17398 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17399 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17401 break 2
17402 fi
17403done
17404 done
17405IFS=$as_save_IFS
17406
17407fi
17408fi
17409ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17410if test -n "$ac_ct_PKG_CONFIG"; then
17411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17412$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17413else
17414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17415$as_echo "no" >&6; }
17416fi
17417
17418 if test "x$ac_ct_PKG_CONFIG" = x; then
17419 PKG_CONFIG=""
17420 else
17421 case $cross_compiling:$ac_tool_warned in
17422yes:)
17423{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17424$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17425ac_tool_warned=yes ;;
17426esac
17427 PKG_CONFIG=$ac_ct_PKG_CONFIG
17428 fi
17429else
17430 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17431fi
17432
17433 if test x"$PKG_CONFIG" != x""; then
17434 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17435 if test $? = 0; then
17436 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17437 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17438 found=true
17439 fi
17440 fi
17441
17442 # no such luck; use some default ssldirs
17443 if ! $found; then
17444 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17445 fi
17446
17447
17448fi
17449
17450
17451
17452 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17453 # an 'openssl' subdirectory
17454
17455 if ! $found; then
17456 OPENSSL_INCLUDES=
17457 for ssldir in $ssldirs; do
17458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17459$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17460 if test -f "$ssldir/include/openssl/ssl.h"; then
17461 OPENSSL_INCLUDES="-I$ssldir/include"
17462 OPENSSL_LDFLAGS="-L$ssldir/lib"
17463 OPENSSL_LIBS="-lssl -lcrypto"
17464 found=true
17465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17466$as_echo "yes" >&6; }
17467 break
17468 else
17469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17470$as_echo "no" >&6; }
17471 fi
17472 done
17473
17474 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17475 # it will just work!
17476 fi
17477
17478 # try the preprocessor and linker with our new flags,
17479 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17480
17481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17482$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17483 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17484 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17485
17486 save_LIBS="$LIBS"
17487 save_LDFLAGS="$LDFLAGS"
17488 save_CPPFLAGS="$CPPFLAGS"
17489 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17490 LIBS="$OPENSSL_LIBS $LIBS"
17491 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17493/* end confdefs.h. */
17494#include <openssl/ssl.h>
17495int
17496main ()
17497{
17498SSL_new(NULL)
17499 ;
17500 return 0;
17501}
17502_ACEOF
17503if ac_fn_c_try_link "$LINENO"; then :
17504
17505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17506$as_echo "yes" >&6; }
17507 have_openssl=yes
17508
17509else
17510
17511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17512$as_echo "no" >&6; }
17513 have_openssl=no
17514
17515fi
17516rm -f core conftest.err conftest.$ac_objext \
17517 conftest$ac_exeext conftest.$ac_ext
17518 CPPFLAGS="$save_CPPFLAGS"
17519 LDFLAGS="$save_LDFLAGS"
17520 LIBS="$save_LIBS"
17521
17522
17523
17524
17525
17526
17527if test "$have_openssl" = yes; then
17528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17529$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17530
17531 save_LIBS="$LIBS"
17532 save_LDFLAGS="$LDFLAGS"
17533 save_CPPFLAGS="$CPPFLAGS"
17534 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17535 LIBS="$OPENSSL_LIBS $LIBS"
17536 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17537
17538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17539/* end confdefs.h. */
17540
17541 #include <openssl/x509_vfy.h>
17542
17543int
17544main ()
17545{
17546
17547 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17548 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17549 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17550 X509_VERIFY_PARAM_set_hostflags(p, 0);
17551
17552 ;
17553 return 0;
17554}
17555
17556_ACEOF
17557if ac_fn_c_try_link "$LINENO"; then :
17558
17559 ac_cv_has_x509_verify_param_set1_host=yes
17560
17561else
17562
17563 ac_cv_has_x509_verify_param_set1_host=no
17564
17565fi
17566rm -f core conftest.err conftest.$ac_objext \
17567 conftest$ac_exeext conftest.$ac_ext
17568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17569$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17570 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17571
17572$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17573
17574 fi
17575
17576 CPPFLAGS="$save_CPPFLAGS"
17577 LDFLAGS="$save_LDFLAGS"
17578 LIBS="$save_LIBS"
17579fi
17580
Christian Heimes892d66e2018-01-29 14:10:18 +010017581# ssl module default cipher suite string
17582
17583
17584
17585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17586$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17587
17588# Check whether --with-ssl-default-suites was given.
17589if test "${with_ssl_default_suites+set}" = set; then :
17590 withval=$with_ssl_default_suites;
17591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17592$as_echo "$withval" >&6; }
17593case "$withval" in
17594 python)
17595 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17596
17597 ;;
17598 openssl)
17599 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17600
17601 ;;
17602 *)
17603 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17604
17605 cat >>confdefs.h <<_ACEOF
17606#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17607_ACEOF
17608
17609 ;;
17610esac
17611
17612else
17613
17614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17615$as_echo "python" >&6; }
17616$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17617
17618
17619fi
17620
17621
Christian Heimes9b60e552020-05-15 23:54:53 +020017622# builtin hash modules
17623default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17624
17625$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17626
17627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17628$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17629
17630# Check whether --with-builtin-hashlib-hashes was given.
17631if test "${with_builtin_hashlib_hashes+set}" = set; then :
17632 withval=$with_builtin_hashlib_hashes;
17633case "$withval" in
17634 yes)
17635 withval=$default_hashlib_hashes
17636 ;;
17637 no)
17638 withval=""
17639 ;;
17640esac
17641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17642$as_echo "$withval" >&6; }
17643cat >>confdefs.h <<_ACEOF
17644#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17645_ACEOF
17646
17647
17648else
17649
17650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17651$as_echo "$default_hashlib_hashes" >&6; };
17652cat >>confdefs.h <<_ACEOF
17653#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17654_ACEOF
17655
17656
17657fi
17658
17659
Guido van Rossum627b2d71993-12-24 10:39:16 +000017660# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017661ac_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 +000017662
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017663ac_config_files="$ac_config_files Modules/ld_so_aix"
17664
Martin v. Löwis11437992002-04-12 09:54:03 +000017665cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017666# This file is a shell script that caches the results of configure
17667# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017668# scripts and configure runs, see configure's option --config-cache.
17669# It is not useful on other systems. If it contains results you don't
17670# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017671#
Martin v. Löwis11437992002-04-12 09:54:03 +000017672# config.status only pays attention to the cache file if you give it
17673# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017674#
Skip Montanaro6dead952003-09-25 14:50:04 +000017675# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017676# loading this file, other *unset* `ac_cv_foo' will be assigned the
17677# following values.
17678
17679_ACEOF
17680
Guido van Rossumf78abae1997-01-21 22:02:36 +000017681# The following way of writing the cache mishandles newlines in values,
17682# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017684# Ultrix sh set writes to stderr and can't be redirected directly,
17685# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686(
17687 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17688 eval ac_val=\$$ac_var
17689 case $ac_val in #(
17690 *${as_nl}*)
17691 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017692 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17693$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 esac
17695 case $ac_var in #(
17696 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017697 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17698 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699 esac ;;
17700 esac
17701 done
17702
Martin v. Löwis11437992002-04-12 09:54:03 +000017703 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17705 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017706 # `set' does not quote correctly, so add quotes: double-quote
17707 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017708 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017709 "s/'/'\\\\''/g;
17710 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 *)
17713 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017714 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017715 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716 esac |
17717 sort
17718) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017719 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017723 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17724 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17726 :end' >>confcache
17727if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17728 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017729 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017730 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17731$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017732 if test ! -f "$cache_file" || test -h "$cache_file"; then
17733 cat confcache >"$cache_file"
17734 else
17735 case $cache_file in #(
17736 */* | ?:*)
17737 mv -f confcache "$cache_file"$$ &&
17738 mv -f "$cache_file"$$ "$cache_file" ;; #(
17739 *)
17740 mv -f confcache "$cache_file" ;;
17741 esac
17742 fi
17743 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017744 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17746$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017747 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017748fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017749rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017750
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017751test "x$prefix" = xNONE && prefix=$ac_default_prefix
17752# Let make expand exec_prefix.
17753test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017754
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017755DEFS=-DHAVE_CONFIG_H
17756
Skip Montanaro6dead952003-09-25 14:50:04 +000017757ac_libobjs=
17758ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017759U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017760for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17761 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17765 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017766 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17767 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017768done
17769LIBOBJS=$ac_libobjs
17770
17771LTLIBOBJS=$ac_ltlibobjs
17772
17773
Martin v. Löwis11437992002-04-12 09:54:03 +000017774
Matthias Kloseb9621712010-04-24 17:59:49 +000017775
Victor Stinnere0be4232011-10-25 13:06:09 +020017776: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017777ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017778ac_clean_files_save=$ac_clean_files
17779ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017780{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17781$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17782as_write_fail=0
17783cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017784#! $SHELL
17785# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017786# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017787# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017788# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017789
Martin v. Löwis11437992002-04-12 09:54:03 +000017790debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017791ac_cs_recheck=false
17792ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017793
Matthias Kloseb9621712010-04-24 17:59:49 +000017794SHELL=\${CONFIG_SHELL-$SHELL}
17795export SHELL
17796_ASEOF
17797cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17798## -------------------- ##
17799## M4sh Initialization. ##
17800## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017802# Be more Bourne compatible
17803DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017804if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017805 emulate sh
17806 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017807 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017808 # is contrary to our usage. Disable this feature.
17809 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017811else
Matthias Kloseb9621712010-04-24 17:59:49 +000017812 case `(set -o) 2>/dev/null` in #(
17813 *posix*) :
17814 set -o posix ;; #(
17815 *) :
17816 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017818fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017819
17820
Matthias Kloseb9621712010-04-24 17:59:49 +000017821as_nl='
17822'
17823export as_nl
17824# Printing a long string crashes Solaris 7 /usr/bin/printf.
17825as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17826as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17827as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17828# Prefer a ksh shell builtin over an external printf program on Solaris,
17829# but without wasting forks for bash or zsh.
17830if test -z "$BASH_VERSION$ZSH_VERSION" \
17831 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17832 as_echo='print -r --'
17833 as_echo_n='print -rn --'
17834elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17835 as_echo='printf %s\n'
17836 as_echo_n='printf %s'
17837else
17838 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17839 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17840 as_echo_n='/usr/ucb/echo -n'
17841 else
17842 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17843 as_echo_n_body='eval
17844 arg=$1;
17845 case $arg in #(
17846 *"$as_nl"*)
17847 expr "X$arg" : "X\\(.*\\)$as_nl";
17848 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17849 esac;
17850 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17851 '
17852 export as_echo_n_body
17853 as_echo_n='sh -c $as_echo_n_body as_echo'
17854 fi
17855 export as_echo_body
17856 as_echo='sh -c $as_echo_body as_echo'
17857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017858
17859# The user is always right.
17860if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017861 PATH_SEPARATOR=:
17862 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17863 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17864 PATH_SEPARATOR=';'
17865 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868
17869# IFS
17870# We need space, tab and new line, in precisely that order. Quoting is
17871# there to prevent editors from complaining about space-tab.
17872# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17873# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874IFS=" "" $as_nl"
17875
17876# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017877as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017878case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879 *[\\/]* ) as_myself=$0 ;;
17880 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017881for as_dir in $PATH
17882do
17883 IFS=$as_save_IFS
17884 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17886 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017889 ;;
17890esac
17891# We did not find ourselves, most probably we were run as `sh COMMAND'
17892# in which case we are not to be found in the path.
17893if test "x$as_myself" = x; then
17894 as_myself=$0
17895fi
17896if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017897 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17898 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899fi
17900
Matthias Kloseb9621712010-04-24 17:59:49 +000017901# Unset variables that we do not need and which cause bugs (e.g. in
17902# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17903# suppresses any "Segmentation fault" message there. '((' could
17904# trigger a bug in pdksh 5.2.14.
17905for as_var in BASH_ENV ENV MAIL MAILPATH
17906do eval test x\${$as_var+set} = xset \
17907 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908done
17909PS1='$ '
17910PS2='> '
17911PS4='+ '
17912
17913# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017914LC_ALL=C
17915export LC_ALL
17916LANGUAGE=C
17917export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017918
Matthias Kloseb9621712010-04-24 17:59:49 +000017919# CDPATH.
17920(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17921
17922
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017923# as_fn_error STATUS ERROR [LINENO LOG_FD]
17924# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017925# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17926# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017927# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017928as_fn_error ()
17929{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017930 as_status=$1; test $as_status -eq 0 && as_status=1
17931 if test "$4"; then
17932 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17933 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017934 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017935 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017936 as_fn_exit $as_status
17937} # as_fn_error
17938
17939
17940# as_fn_set_status STATUS
17941# -----------------------
17942# Set $? to STATUS, without forking.
17943as_fn_set_status ()
17944{
17945 return $1
17946} # as_fn_set_status
17947
17948# as_fn_exit STATUS
17949# -----------------
17950# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17951as_fn_exit ()
17952{
17953 set +e
17954 as_fn_set_status $1
17955 exit $1
17956} # as_fn_exit
17957
17958# as_fn_unset VAR
17959# ---------------
17960# Portably unset VAR.
17961as_fn_unset ()
17962{
17963 { eval $1=; unset $1;}
17964}
17965as_unset=as_fn_unset
17966# as_fn_append VAR VALUE
17967# ----------------------
17968# Append the text in VALUE to the end of the definition contained in VAR. Take
17969# advantage of any shell optimizations that allow amortized linear growth over
17970# repeated appends, instead of the typical quadratic growth present in naive
17971# implementations.
17972if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17973 eval 'as_fn_append ()
17974 {
17975 eval $1+=\$2
17976 }'
17977else
17978 as_fn_append ()
17979 {
17980 eval $1=\$$1\$2
17981 }
17982fi # as_fn_append
17983
17984# as_fn_arith ARG...
17985# ------------------
17986# Perform arithmetic evaluation on the ARGs, and store the result in the
17987# global $as_val. Take advantage of shells that can avoid forks. The arguments
17988# must be portable across $(()) and expr.
17989if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17990 eval 'as_fn_arith ()
17991 {
17992 as_val=$(( $* ))
17993 }'
17994else
17995 as_fn_arith ()
17996 {
17997 as_val=`expr "$@" || test $? -eq 1`
17998 }
17999fi # as_fn_arith
18000
18001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002if expr a : '\(a\)' >/dev/null 2>&1 &&
18003 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18004 as_expr=expr
18005else
18006 as_expr=false
18007fi
18008
18009if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18010 as_basename=basename
18011else
18012 as_basename=false
18013fi
18014
Matthias Kloseb9621712010-04-24 17:59:49 +000018015if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18016 as_dirname=dirname
18017else
18018 as_dirname=false
18019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021as_me=`$as_basename -- "$0" ||
18022$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18023 X"$0" : 'X\(//\)$' \| \
18024 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018025$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018026 sed '/^.*\/\([^/][^/]*\)\/*$/{
18027 s//\1/
18028 q
18029 }
18030 /^X\/\(\/\/\)$/{
18031 s//\1/
18032 q
18033 }
18034 /^X\/\(\/\).*/{
18035 s//\1/
18036 q
18037 }
18038 s/.*/./; q'`
18039
Matthias Kloseb9621712010-04-24 17:59:49 +000018040# Avoid depending upon Character Ranges.
18041as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18042as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18043as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18044as_cr_digits='0123456789'
18045as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046
18047ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018048case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018050 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018052 xy) ECHO_C='\c';;
18053 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18054 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055 esac;;
18056*)
18057 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018058esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018059
Martin v. Löwis11437992002-04-12 09:54:03 +000018060rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018061if test -d conf$$.dir; then
18062 rm -f conf$$.dir/conf$$.file
18063else
18064 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018065 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018067if (echo >conf$$.file) 2>/dev/null; then
18068 if ln -s conf$$.file conf$$ 2>/dev/null; then
18069 as_ln_s='ln -s'
18070 # ... but there are two gotchas:
18071 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18072 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018073 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018074 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018075 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018076 elif ln conf$$.file conf$$ 2>/dev/null; then
18077 as_ln_s=ln
18078 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018079 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018080 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018081else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018082 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18085rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018086
Matthias Kloseb9621712010-04-24 17:59:49 +000018087
18088# as_fn_mkdir_p
18089# -------------
18090# Create "$as_dir" as a directory, including parents if necessary.
18091as_fn_mkdir_p ()
18092{
18093
18094 case $as_dir in #(
18095 -*) as_dir=./$as_dir;;
18096 esac
18097 test -d "$as_dir" || eval $as_mkdir_p || {
18098 as_dirs=
18099 while :; do
18100 case $as_dir in #(
18101 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18102 *) as_qdir=$as_dir;;
18103 esac
18104 as_dirs="'$as_qdir' $as_dirs"
18105 as_dir=`$as_dirname -- "$as_dir" ||
18106$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18107 X"$as_dir" : 'X\(//\)[^/]' \| \
18108 X"$as_dir" : 'X\(//\)$' \| \
18109 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18110$as_echo X"$as_dir" |
18111 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18112 s//\1/
18113 q
18114 }
18115 /^X\(\/\/\)[^/].*/{
18116 s//\1/
18117 q
18118 }
18119 /^X\(\/\/\)$/{
18120 s//\1/
18121 q
18122 }
18123 /^X\(\/\).*/{
18124 s//\1/
18125 q
18126 }
18127 s/.*/./; q'`
18128 test -d "$as_dir" && break
18129 done
18130 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018131 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018132
18133
18134} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018135if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018136 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018137else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018138 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018139 as_mkdir_p=false
18140fi
18141
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018142
18143# as_fn_executable_p FILE
18144# -----------------------
18145# Test if FILE is an executable regular file.
18146as_fn_executable_p ()
18147{
18148 test -f "$1" && test -x "$1"
18149} # as_fn_executable_p
18150as_test_x='test -x'
18151as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018152
18153# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018154as_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 +000018155
18156# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018157as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018158
18159
Martin v. Löwis11437992002-04-12 09:54:03 +000018160exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018161## ----------------------------------- ##
18162## Main body of $CONFIG_STATUS script. ##
18163## ----------------------------------- ##
18164_ASEOF
18165test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018166
Matthias Kloseb9621712010-04-24 17:59:49 +000018167cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18168# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018169# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170# values after options handling.
18171ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018172This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018173generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018174
18175 CONFIG_FILES = $CONFIG_FILES
18176 CONFIG_HEADERS = $CONFIG_HEADERS
18177 CONFIG_LINKS = $CONFIG_LINKS
18178 CONFIG_COMMANDS = $CONFIG_COMMANDS
18179 $ $0 $@
18180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018181on `(hostname || uname -n) 2>/dev/null | sed 1q`
18182"
18183
Martin v. Löwis11437992002-04-12 09:54:03 +000018184_ACEOF
18185
Matthias Kloseb9621712010-04-24 17:59:49 +000018186case $ac_config_files in *"
18187"*) set x $ac_config_files; shift; ac_config_files=$*;;
18188esac
18189
18190case $ac_config_headers in *"
18191"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18192esac
18193
18194
18195cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018196# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018197config_files="$ac_config_files"
18198config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018200_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018201
Matthias Kloseb9621712010-04-24 17:59:49 +000018202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018203ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018204\`$as_me' instantiates files and other configuration actions
18205from templates according to the current configuration. Unless the files
18206and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018207
Matthias Kloseb9621712010-04-24 17:59:49 +000018208Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018209
18210 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018211 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018212 --config print configuration, then exit
18213 -q, --quiet, --silent
18214 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018215 -d, --debug don't remove temporary files
18216 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018217 --file=FILE[:TEMPLATE]
18218 instantiate the configuration file FILE
18219 --header=FILE[:TEMPLATE]
18220 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018221
18222Configuration files:
18223$config_files
18224
18225Configuration headers:
18226$config_headers
18227
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018228Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018231cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18232ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018233ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018234python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018235configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018236 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018237
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018238Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018239This config.status script is free software; the Free Software Foundation
18240gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018241
18242ac_pwd='$ac_pwd'
18243srcdir='$srcdir'
18244INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018245MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018246test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018247_ACEOF
18248
Matthias Kloseb9621712010-04-24 17:59:49 +000018249cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18250# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018251ac_need_defaults=:
18252while test $# != 0
18253do
18254 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018255 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18257 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018258 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018259 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018260 --*=)
18261 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18262 ac_optarg=
18263 ac_shift=:
18264 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018265 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018266 ac_option=$1
18267 ac_optarg=$2
18268 ac_shift=shift
18269 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018270 esac
18271
Skip Montanaro6dead952003-09-25 14:50:04 +000018272 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018274 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18275 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018276 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018277 $as_echo "$ac_cs_version"; exit ;;
18278 --config | --confi | --conf | --con | --co | --c )
18279 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018281 debug=: ;;
18282 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018283 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018284 case $ac_optarg in
18285 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018286 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018287 esac
18288 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018289 ac_need_defaults=false;;
18290 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018291 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018292 case $ac_optarg in
18293 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18294 esac
18295 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018296 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018297 --he | --h)
18298 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018299 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018300Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018301 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018302 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018303 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18304 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18305 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018306
18307 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018308 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018309Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018310
Matthias Kloseb9621712010-04-24 17:59:49 +000018311 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018312 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018313
18314 esac
18315 shift
18316done
18317
Skip Montanaro6dead952003-09-25 14:50:04 +000018318ac_configure_extra_args=
18319
18320if $ac_cs_silent; then
18321 exec 6>/dev/null
18322 ac_configure_extra_args="$ac_configure_extra_args --silent"
18323fi
18324
18325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018326cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018327if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018328 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018329 shift
18330 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18331 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018332 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018333 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018334fi
18335
Martin v. Löwis11437992002-04-12 09:54:03 +000018336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018338exec 5>>config.log
18339{
18340 echo
18341 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18342## Running $as_me. ##
18343_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018344 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018348cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018350
Matthias Kloseb9621712010-04-24 17:59:49 +000018351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018352
18353# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018354for ac_config_target in $ac_config_targets
18355do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018356 case $ac_config_target in
18357 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18358 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18359 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018360 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18361 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018362 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018363 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018364 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018365 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018366 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018367
Victor Stinnere0be4232011-10-25 13:06:09 +020018368 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018369 esac
18370done
18371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018372
Martin v. Löwis11437992002-04-12 09:54:03 +000018373# If the user did not use the arguments to specify the items to instantiate,
18374# then the envvar interface is used. Set only those that are not.
18375# We use the long form for the default assignment because of an extremely
18376# bizarre bug on SunOS 4.1.3.
18377if $ac_need_defaults; then
18378 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18379 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18380fi
18381
Skip Montanaro6dead952003-09-25 14:50:04 +000018382# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018384# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385# Hook for its removal unless debugging.
18386# Note that there is a small window in which the directory will not be cleaned:
18387# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018388$debug ||
18389{
Victor Stinnere0be4232011-10-25 13:06:09 +020018390 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018391 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018392 : "${ac_tmp:=$tmp}"
18393 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018395 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018396}
Martin v. Löwis11437992002-04-12 09:54:03 +000018397# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018398
Martin v. Löwis11437992002-04-12 09:54:03 +000018399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018401 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018402} ||
18403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404 tmp=./conf$$-$RANDOM
18405 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018406} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018407ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018408
Matthias Kloseb9621712010-04-24 17:59:49 +000018409# Set up the scripts for CONFIG_FILES section.
18410# No need to generate them if there are no CONFIG_FILES.
18411# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018413
Matthias Kloseb9621712010-04-24 17:59:49 +000018414
18415ac_cr=`echo X | tr X '\015'`
18416# On cygwin, bash can eat \r inside `` if the user requested igncr.
18417# But we know of no other shell where ac_cr would be empty at this
18418# point, so we can use a bashism as a fallback.
18419if test "x$ac_cr" = x; then
18420 eval ac_cr=\$\'\\r\'
18421fi
18422ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18423if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018424 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018425else
18426 ac_cs_awk_cr=$ac_cr
18427fi
18428
Victor Stinnere0be4232011-10-25 13:06:09 +020018429echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018430_ACEOF
18431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432
Matthias Kloseb9621712010-04-24 17:59:49 +000018433{
18434 echo "cat >conf$$subs.awk <<_ACEOF" &&
18435 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18436 echo "_ACEOF"
18437} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018438 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18439ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440ac_delim='%!_!# '
18441for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018442 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018443 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444
Matthias Kloseb9621712010-04-24 17:59:49 +000018445 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18446 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447 break
18448 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018449 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018450 else
18451 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018452 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018453done
Matthias Kloseb9621712010-04-24 17:59:49 +000018454rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018455
Matthias Kloseb9621712010-04-24 17:59:49 +000018456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018457cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018459sed -n '
18460h
18461s/^/S["/; s/!.*/"]=/
18462p
18463g
18464s/^[^!]*!//
18465:repl
18466t repl
18467s/'"$ac_delim"'$//
18468t delim
18469:nl
18470h
18471s/\(.\{148\}\)..*/\1/
18472t more1
18473s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18474p
18475n
18476b repl
18477:more1
18478s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18479p
18480g
18481s/.\{148\}//
18482t nl
18483:delim
18484h
18485s/\(.\{148\}\)..*/\1/
18486t more2
18487s/["\\]/\\&/g; s/^/"/; s/$/"/
18488p
18489b
18490:more2
18491s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18492p
18493g
18494s/.\{148\}//
18495t delim
18496' <conf$$subs.awk | sed '
18497/^[^""]/{
18498 N
18499 s/\n//
18500}
18501' >>$CONFIG_STATUS || ac_write_fail=1
18502rm -f conf$$subs.awk
18503cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18504_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018505cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018506 for (key in S) S_is_set[key] = 1
18507 FS = ""
18508
18509}
18510{
18511 line = $ 0
18512 nfields = split(line, field, "@")
18513 substed = 0
18514 len = length(field[1])
18515 for (i = 2; i < nfields; i++) {
18516 key = field[i]
18517 keylen = length(key)
18518 if (S_is_set[key]) {
18519 value = S[key]
18520 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18521 len += length(value) + length(field[++i])
18522 substed = 1
18523 } else
18524 len += 1 + keylen
18525 }
18526
18527 print line
18528}
18529
18530_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18533if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18534 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18535else
18536 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018537fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018538 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018539_ACEOF
18540
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018541# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18542# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018543# trailing colons and then remove the whole line if VPATH becomes empty
18544# (actually we leave an empty line to preserve line numbers).
18545if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018546 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18547h
18548s///
18549s/^/:/
18550s/[ ]*$/:/
18551s/:\$(srcdir):/:/g
18552s/:\${srcdir}:/:/g
18553s/:@srcdir@:/:/g
18554s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018556x
18557s/\(=[ ]*\).*/\1/
18558G
18559s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560s/^[^=]*=[ ]*$//
18561}'
18562fi
18563
Matthias Kloseb9621712010-04-24 17:59:49 +000018564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018565fi # test -n "$CONFIG_FILES"
18566
Matthias Kloseb9621712010-04-24 17:59:49 +000018567# Set up the scripts for CONFIG_HEADERS section.
18568# No need to generate them if there are no CONFIG_HEADERS.
18569# This happens for instance with `./config.status Makefile'.
18570if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018571cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018572BEGIN {
18573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574
Matthias Kloseb9621712010-04-24 17:59:49 +000018575# Transform confdefs.h into an awk script `defines.awk', embedded as
18576# here-document in config.status, that substitutes the proper values into
18577# config.h.in to produce config.h.
18578
18579# Create a delimiter string that does not exist in confdefs.h, to ease
18580# handling of long lines.
18581ac_delim='%!_!# '
18582for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018583 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18584 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018585 break
18586 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018587 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018588 else
18589 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18590 fi
18591done
18592
18593# For the awk script, D is an array of macro values keyed by name,
18594# likewise P contains macro parameters if any. Preserve backslash
18595# newline sequences.
18596
18597ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18598sed -n '
18599s/.\{148\}/&'"$ac_delim"'/g
18600t rset
18601:rset
18602s/^[ ]*#[ ]*define[ ][ ]*/ /
18603t def
18604d
18605:def
18606s/\\$//
18607t bsnl
18608s/["\\]/\\&/g
18609s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18610D["\1"]=" \3"/p
18611s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18612d
18613:bsnl
18614s/["\\]/\\&/g
18615s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18616D["\1"]=" \3\\\\\\n"\\/p
18617t cont
18618s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18619t cont
18620d
18621:cont
18622n
18623s/.\{148\}/&'"$ac_delim"'/g
18624t clear
18625:clear
18626s/\\$//
18627t bsnlc
18628s/["\\]/\\&/g; s/^/"/; s/$/"/p
18629d
18630:bsnlc
18631s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18632b cont
18633' <confdefs.h | sed '
18634s/'"$ac_delim"'/"\\\
18635"/g' >>$CONFIG_STATUS || ac_write_fail=1
18636
18637cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18638 for (key in D) D_is_set[key] = 1
18639 FS = ""
18640}
18641/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18642 line = \$ 0
18643 split(line, arg, " ")
18644 if (arg[1] == "#") {
18645 defundef = arg[2]
18646 mac1 = arg[3]
18647 } else {
18648 defundef = substr(arg[1], 2)
18649 mac1 = arg[2]
18650 }
18651 split(mac1, mac2, "(") #)
18652 macro = mac2[1]
18653 prefix = substr(line, 1, index(line, defundef) - 1)
18654 if (D_is_set[macro]) {
18655 # Preserve the white space surrounding the "#".
18656 print prefix "define", macro P[macro] D[macro]
18657 next
18658 } else {
18659 # Replace #undef with comments. This is necessary, for example,
18660 # in the case of _POSIX_SOURCE, which is predefined and required
18661 # on some systems where configure will not decide to define it.
18662 if (defundef == "undef") {
18663 print "/*", prefix defundef, macro, "*/"
18664 next
18665 }
18666 }
18667}
18668{ print }
18669_ACAWK
18670_ACEOF
18671cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018672 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018673fi # test -n "$CONFIG_HEADERS"
18674
18675
18676eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18677shift
18678for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018679do
18680 case $ac_tag in
18681 :[FHLC]) ac_mode=$ac_tag; continue;;
18682 esac
18683 case $ac_mode$ac_tag in
18684 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018685 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018686 :[FH]-) ac_tag=-:-;;
18687 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18688 esac
18689 ac_save_IFS=$IFS
18690 IFS=:
18691 set x $ac_tag
18692 IFS=$ac_save_IFS
18693 shift
18694 ac_file=$1
18695 shift
18696
18697 case $ac_mode in
18698 :L) ac_source=$1;;
18699 :[FH])
18700 ac_file_inputs=
18701 for ac_f
18702 do
18703 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018704 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018705 *) # Look for the file first in the build tree, then in the source tree
18706 # (if the path is not absolute). The absolute path cannot be DOS-style,
18707 # because $ac_f cannot contain `:'.
18708 test -f "$ac_f" ||
18709 case $ac_f in
18710 [\\/$]*) false;;
18711 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18712 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018713 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018714 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018715 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18716 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018717 done
18718
18719 # Let's still pretend it is `configure' which instantiates (i.e., don't
18720 # use $as_me), people would be surprised to read:
18721 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018722 configure_input='Generated from '`
18723 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18724 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018725 if test x"$ac_file" != x-; then
18726 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018727 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18728$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018729 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018730 # Neutralize special characters interpreted by sed in replacement strings.
18731 case $configure_input in #(
18732 *\&* | *\|* | *\\* )
18733 ac_sed_conf_input=`$as_echo "$configure_input" |
18734 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18735 *) ac_sed_conf_input=$configure_input;;
18736 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018737
18738 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018739 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18740 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018741 esac
18742 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018743 esac
18744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018745 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018746$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018747 X"$ac_file" : 'X\(//\)[^/]' \| \
18748 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018749 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018750$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018751 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18752 s//\1/
18753 q
18754 }
18755 /^X\(\/\/\)[^/].*/{
18756 s//\1/
18757 q
18758 }
18759 /^X\(\/\/\)$/{
18760 s//\1/
18761 q
18762 }
18763 /^X\(\/\).*/{
18764 s//\1/
18765 q
18766 }
18767 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018768 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018769 ac_builddir=.
18770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018771case "$ac_dir" in
18772.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18773*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018774 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018775 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018776 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018777 case $ac_top_builddir_sub in
18778 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18779 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18780 esac ;;
18781esac
18782ac_abs_top_builddir=$ac_pwd
18783ac_abs_builddir=$ac_pwd$ac_dir_suffix
18784# for backward compatibility:
18785ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018786
18787case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018788 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018789 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018790 ac_top_srcdir=$ac_top_builddir_sub
18791 ac_abs_top_srcdir=$ac_pwd ;;
18792 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018793 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018794 ac_top_srcdir=$srcdir
18795 ac_abs_top_srcdir=$srcdir ;;
18796 *) # Relative name.
18797 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18798 ac_top_srcdir=$ac_top_build_prefix$srcdir
18799 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018800esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018801ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018802
Martin v. Löwis11437992002-04-12 09:54:03 +000018803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018804 case $ac_mode in
18805 :F)
18806 #
18807 # CONFIG_FILE
18808 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018809
18810 case $INSTALL in
18811 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018812 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018813 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018814 ac_MKDIR_P=$MKDIR_P
18815 case $MKDIR_P in
18816 [\\/$]* | ?:[\\/]* ) ;;
18817 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18818 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018819_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018820
Matthias Kloseb9621712010-04-24 17:59:49 +000018821cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018822# If the template does not know about datarootdir, expand it.
18823# FIXME: This hack should be removed a few years after 2.60.
18824ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018825ac_sed_dataroot='
18826/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018827 p
18828 q
18829}
18830/@datadir@/p
18831/@docdir@/p
18832/@infodir@/p
18833/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018834/@mandir@/p'
18835case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018836*datarootdir*) ac_datarootdir_seen=yes;;
18837*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18839$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018842 ac_datarootdir_hack='
18843 s&@datadir@&$datadir&g
18844 s&@docdir@&$docdir&g
18845 s&@infodir@&$infodir&g
18846 s&@localedir@&$localedir&g
18847 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018848 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018849esac
18850_ACEOF
18851
18852# Neutralize VPATH when `$srcdir' = `.'.
18853# Shell code in configure.ac might set extrasub.
18854# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018855cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18856ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018857$extrasub
18858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018859cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018860:t
18861/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018862s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018863s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018864s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018865s&@srcdir@&$ac_srcdir&;t t
18866s&@abs_srcdir@&$ac_abs_srcdir&;t t
18867s&@top_srcdir@&$ac_top_srcdir&;t t
18868s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18869s&@builddir@&$ac_builddir&;t t
18870s&@abs_builddir@&$ac_abs_builddir&;t t
18871s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18872s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018873s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018874$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018875"
Victor Stinnere0be4232011-10-25 13:06:09 +020018876eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18877 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018879test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018880 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18881 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18882 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018883 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018884which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018885$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018886which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018887
Victor Stinnere0be4232011-10-25 13:06:09 +020018888 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018889 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018890 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18891 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018892 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018893 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018894 ;;
18895 :H)
18896 #
18897 # CONFIG_HEADER
18898 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018899 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018900 {
18901 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018902 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18903 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018904 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018905 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018906 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18907$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018908 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018909 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018910 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018911 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018912 fi
18913 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018914 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018915 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018916 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018917 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018918 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018920
18921 esac
18922
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018923
18924 case $ac_file$ac_mode in
18925 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18926
18927 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018928done # for ac_tag
18929
Guido van Rossum627b2d71993-12-24 10:39:16 +000018930
Matthias Kloseb9621712010-04-24 17:59:49 +000018931as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018932_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018933ac_clean_files=$ac_clean_files_save
18934
Matthias Kloseb9621712010-04-24 17:59:49 +000018935test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018936 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018937
Martin v. Löwis11437992002-04-12 09:54:03 +000018938
18939# configure is writing to config.log, and then calls config.status.
18940# config.status does its own redirection, appending to config.log.
18941# Unfortunately, on DOS this fails, as config.log is still kept open
18942# by configure, so config.status won't be able to write to it; its
18943# output is simply discarded. So we exec the FD to /dev/null,
18944# effectively closing config.log, so it can be properly (re)opened and
18945# appended to by config.status. When coming back to configure, we
18946# need to make the FD available again.
18947if test "$no_create" != yes; then
18948 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018949 ac_config_status_args=
18950 test "$silent" = yes &&
18951 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018952 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018953 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018954 exec 5>>config.log
18955 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18956 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018957 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018958fi
18959if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18961$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018962fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018963
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018964
Christian Heimes75ed8902013-11-20 01:11:18 +010018965echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018966if test ! -f Modules/Setup.local
18967then
18968 echo "# Edit this file for local setup changes" >Modules/Setup.local
18969fi
18970
Christian Heimes75ed8902013-11-20 01:11:18 +010018971echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018972$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018973 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018974 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018975mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018976
18977if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18978 echo "" >&6
18979 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018980 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 +000018981 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018982 echo "" >&6
18983 echo "" >&6
18984fi
18985