blob: 0bffe8b035686396a49b573cedcd57984294abe6 [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
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700685PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
Ian Nortona9edf442020-02-14 03:09:11 +0000785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100829with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000830enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700831with_tcltk_includes
832with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000837with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100845with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100846with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000847'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848 ac_precious_vars='build_alias
849host_alias
850target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100851MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852CC
853CFLAGS
854LDFLAGS
855LIBS
856CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800857CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700858PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800859PKG_CONFIG
860PKG_CONFIG_PATH
861PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865ac_init_help=
866ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000867ac_unrecognized_opts=
868ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869# The variables have the same names as the options, with
870# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000871cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874no_recursion=
875prefix=NONE
876program_prefix=NONE
877program_suffix=NONE
878program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883x_includes=NONE
884x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000885
886# Installation directory options.
887# These are left unexpanded so users can "make install exec_prefix=/foo"
888# and all the variables that are supposed to be based on exec_prefix
889# by default will actually change.
890# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892bindir='${exec_prefix}/bin'
893sbindir='${exec_prefix}/sbin'
894libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895datarootdir='${prefix}/share'
896datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897sysconfdir='${prefix}/etc'
898sharedstatedir='${prefix}/com'
899localstatedir='${prefix}/var'
Ian Nortona9edf442020-02-14 03:09:11 +0000900runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901includedir='${prefix}/include'
902oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
904infodir='${datarootdir}/info'
905htmldir='${docdir}'
906dvidir='${docdir}'
907pdfdir='${docdir}'
908psdir='${docdir}'
909libdir='${exec_prefix}/lib'
910localedir='${datarootdir}/locale'
911mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 # If the previous option needs an argument, assign it.
918 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 ac_prev=
921 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200925 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
926 *=) ac_optarg= ;;
927 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Accept the important Cygnus configure options, so we can diagnose typos.
931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 case $ac_dashdash$ac_option in
933 --)
934 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -bindir | --bindir | --bindi | --bind | --bin | --bi)
937 ac_prev=bindir ;;
938 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940
941 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946 -cache-file | --cache-file | --cache-fil | --cache-fi \
947 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
948 ac_prev=cache_file ;;
949 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
950 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 cache_file=$ac_optarg ;;
952
953 --config-cache | -C)
954 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
962 | --dataroo | --dataro | --datar)
963 ac_prev=datarootdir ;;
964 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
965 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
966 datarootdir=$ac_optarg ;;
967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200972 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977"enable_$ac_useropt"
978"*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983
984 -docdir | --docdir | --docdi | --doc | --do)
985 ac_prev=docdir ;;
986 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
987 docdir=$ac_optarg ;;
988
989 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
990 ac_prev=dvidir ;;
991 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
992 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200998 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000999 ac_useropt_orig=$ac_useropt
1000 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1001 case $ac_user_opts in
1002 *"
1003"enable_$ac_useropt"
1004"*) ;;
1005 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1006 ac_unrecognized_sep=', ';;
1007 esac
1008 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1011 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1012 | --exec | --exe | --ex)
1013 ac_prev=exec_prefix ;;
1014 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1015 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1016 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 # Obsolete; use --with-gas.
1021 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 -help | --help | --hel | --he | -h)
1024 ac_init_help=long ;;
1025 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1026 ac_init_help=recursive ;;
1027 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1028 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1036 ac_prev=htmldir ;;
1037 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1038 | --ht=*)
1039 htmldir=$ac_optarg ;;
1040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 -includedir | --includedir | --includedi | --included | --include \
1042 | --includ | --inclu | --incl | --inc)
1043 ac_prev=includedir ;;
1044 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1045 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -infodir | --infodir | --infodi | --infod | --info | --inf)
1049 ac_prev=infodir ;;
1050 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -libdir | --libdir | --libdi | --libd)
1054 ac_prev=libdir ;;
1055 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
1058 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1059 | --libexe | --libex | --libe)
1060 ac_prev=libexecdir ;;
1061 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1062 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 -localedir | --localedir | --localedi | --localed | --locale)
1066 ac_prev=localedir ;;
1067 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1068 localedir=$ac_optarg ;;
1069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 ac_prev=localstatedir ;;
1073 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1078 ac_prev=mandir ;;
1079 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 # Obsolete; use --without-fp.
1084 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 no_create=yes ;;
1089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1091 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1092 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1095 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1096 | --oldin | --oldi | --old | --ol | --o)
1097 ac_prev=oldincludedir ;;
1098 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1099 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1100 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1104 ac_prev=prefix ;;
1105 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1109 | --program-pre | --program-pr | --program-p)
1110 ac_prev=program_prefix ;;
1111 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1112 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1116 | --program-suf | --program-su | --program-s)
1117 ac_prev=program_suffix ;;
1118 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1119 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -program-transform-name | --program-transform-name \
1123 | --program-transform-nam | --program-transform-na \
1124 | --program-transform-n | --program-transform- \
1125 | --program-transform | --program-transfor \
1126 | --program-transfo | --program-transf \
1127 | --program-trans | --program-tran \
1128 | --progr-tra | --program-tr | --program-t)
1129 ac_prev=program_transform_name ;;
1130 -program-transform-name=* | --program-transform-name=* \
1131 | --program-transform-nam=* | --program-transform-na=* \
1132 | --program-transform-n=* | --program-transform-=* \
1133 | --program-transform=* | --program-transfor=* \
1134 | --program-transfo=* | --program-transf=* \
1135 | --program-trans=* | --program-tran=* \
1136 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001139 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1140 ac_prev=pdfdir ;;
1141 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1142 pdfdir=$ac_optarg ;;
1143
1144 -psdir | --psdir | --psdi | --psd | --ps)
1145 ac_prev=psdir ;;
1146 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1147 psdir=$ac_optarg ;;
1148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1150 | -silent | --silent | --silen | --sile | --sil)
1151 silent=yes ;;
1152
Ian Nortona9edf442020-02-14 03:09:11 +00001153 -runstatedir | --runstatedir | --runstatedi | --runstated \
1154 | --runstate | --runstat | --runsta | --runst | --runs \
1155 | --run | --ru | --r)
1156 ac_prev=runstatedir ;;
1157 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1158 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1159 | --run=* | --ru=* | --r=*)
1160 runstatedir=$ac_optarg ;;
1161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1163 ac_prev=sbindir ;;
1164 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1165 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
1168 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1169 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1170 | --sharedst | --shareds | --shared | --share | --shar \
1171 | --sha | --sh)
1172 ac_prev=sharedstatedir ;;
1173 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1174 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1175 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1176 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001179 -site | --site | --sit)
1180 ac_prev=site ;;
1181 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1185 ac_prev=srcdir ;;
1186 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1190 | --syscon | --sysco | --sysc | --sys | --sy)
1191 ac_prev=sysconfdir ;;
1192 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1193 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001195
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1202 verbose=yes ;;
1203
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 -version | --version | --versio | --versi | --vers | -V)
1205 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001211 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt_orig=$ac_useropt
1213 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214 case $ac_user_opts in
1215 *"
1216"with_$ac_useropt"
1217"*) ;;
1218 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1219 ac_unrecognized_sep=', ';;
1220 esac
1221 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
1223 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001227 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 ac_useropt_orig=$ac_useropt
1229 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1230 case $ac_user_opts in
1231 *"
1232"with_$ac_useropt"
1233"*) ;;
1234 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1235 ac_unrecognized_sep=', ';;
1236 esac
1237 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239 --x)
1240 # Obsolete; use --with-x.
1241 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1244 | --x-incl | --x-inc | --x-in | --x-i)
1245 ac_prev=x_includes ;;
1246 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1247 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
1250 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1251 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1252 ac_prev=x_libraries ;;
1253 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1254 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1258Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ;;
1260
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 *=*)
1262 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1263 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 case $ac_envvar in #(
1265 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 export $ac_envvar ;;
1270
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001271 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001276 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 ;;
1278
1279 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280done
1281
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285fi
1286
Matthias Kloseb9621712010-04-24 17:59:49 +00001287if test -n "$ac_unrecognized_opts"; then
1288 case $enable_option_checking in
1289 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1292 esac
1293fi
1294
1295# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1297 datadir sysconfdir sharedstatedir localstatedir includedir \
1298 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Ian Nortona9edf442020-02-14 03:09:11 +00001299 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001302 # Remove trailing slashes.
1303 case $ac_val in
1304 */ )
1305 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1306 eval $ac_var=\$ac_val;;
1307 esac
1308 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001309 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 [\\/$]* | ?:[\\/]* ) continue;;
1311 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001313 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001314done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# There might be people who depend on the old broken behavior: `$host'
1317# used to hold the argument of --host etc.
1318# FIXME: To remove some day.
1319build=$build_alias
1320host=$host_alias
1321target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Martin v. Löwis11437992002-04-12 09:54:03 +00001323# FIXME: To remove some day.
1324if test "x$host_alias" != x; then
1325 if test "x$build_alias" = x; then
1326 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001327 elif test "x$build_alias" != "x$host_alias"; then
1328 cross_compiling=yes
1329 fi
1330fi
1331
1332ac_tool_prefix=
1333test -n "$host_alias" && ac_tool_prefix=$host_alias-
1334
1335test "$silent" = yes && exec 6>/dev/null
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338ac_pwd=`pwd` && test -n "$ac_pwd" &&
1339ac_ls_di=`ls -di .` &&
1340ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344
1345
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346# Find the source files, if location was not specified.
1347if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001348 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 ac_confdir=`$as_dirname -- "$as_myself" ||
1351$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1352 X"$as_myself" : 'X\(//\)[^/]' \| \
1353 X"$as_myself" : 'X\(//\)$' \| \
1354 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1355$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\/\)[^/].*/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\/\)$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\).*/{
1369 s//\1/
1370 q
1371 }
1372 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001373 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375 srcdir=..
1376 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377else
1378 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380if test ! -r "$srcdir/$ac_unique_file"; then
1381 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001382 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1385ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001386 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387 pwd)`
1388# When building in place, set srcdir=.
1389if test "$ac_abs_confdir" = "$ac_pwd"; then
1390 srcdir=.
1391fi
1392# Remove unnecessary trailing slashes from srcdir.
1393# Double slashes in file names in object file debugging info
1394# mess up M-x gdb in Emacs.
1395case $srcdir in
1396*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1397esac
1398for ac_var in $ac_precious_vars; do
1399 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_env_${ac_var}_value=\$${ac_var}
1401 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1402 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1403done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001404
Martin v. Löwis11437992002-04-12 09:54:03 +00001405#
1406# Report the --help message.
1407#
1408if test "$ac_init_help" = "long"; then
1409 # Omit some internal or obsolete options to make the list less imposing.
1410 # This message is too long to be a string in the A/UX 3.1 sh.
1411 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001412\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413
1414Usage: $0 [OPTION]... [VAR=VALUE]...
1415
1416To assign environment variables (e.g., CC, CFLAGS...), specify them as
1417VAR=VALUE. See below for descriptions of some of the useful variables.
1418
1419Defaults for the options are specified in brackets.
1420
1421Configuration:
1422 -h, --help display this help and exit
1423 --help=short display options specific to this package
1424 --help=recursive display the short help of all the included packages
1425 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001426 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --cache-file=FILE cache test results in FILE [disabled]
1428 -C, --config-cache alias for \`--cache-file=config.cache'
1429 -n, --no-create do not create output files
1430 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432Installation directories:
1433 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438By default, \`make install' will install all the files in
1439\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1440an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1441for instance \`--prefix=\$HOME'.
1442
1443For better control, use the options below.
1444
1445Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --bindir=DIR user executables [EPREFIX/bin]
1447 --sbindir=DIR system admin executables [EPREFIX/sbin]
1448 --libexecdir=DIR program executables [EPREFIX/libexec]
1449 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1450 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1451 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Ian Nortona9edf442020-02-14 03:09:11 +00001452 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001453 --libdir=DIR object code libraries [EPREFIX/lib]
1454 --includedir=DIR C header files [PREFIX/include]
1455 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1456 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1457 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1458 --infodir=DIR info documentation [DATAROOTDIR/info]
1459 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1460 --mandir=DIR man documentation [DATAROOTDIR/man]
1461 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1462 --htmldir=DIR html documentation [DOCDIR]
1463 --dvidir=DIR dvi documentation [DOCDIR]
1464 --pdfdir=DIR pdf documentation [DOCDIR]
1465 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001466_ACEOF
1467
1468 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001469
1470System types:
1471 --build=BUILD configure for building on BUILD [guessed]
1472 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001473_ACEOF
1474fi
1475
1476if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001478 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001479 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 cat <<\_ACEOF
1481
1482Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001483 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1485 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001486 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001487 create a universal binary build. SDKDIR specifies
1488 which macOS SDK should be used to perform the build,
1489 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001491 create a Python.framework rather than a traditional
1492 Unix install. optional INSTALLDIR specifies the
1493 installation path. see Mac/README.rst (default is
1494 no)
1495 --enable-shared enable building a shared Python library (default is
1496 no)
1497 --enable-profiling enable C-level code profiling with gprof (default is
1498 no)
1499 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1500 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001501 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001502 support loadable extensions in _sqlite module, see
1503 Doc/library/sqlite3.rst (default is no)
1504 --enable-ipv6 enable ipv6 (with ipv4) support, see
1505 Doc/library/socket.rst (default is yes if supported)
1506 --enable-big-digits[=15|30]
1507 use big digits (30 or 15 bits) for Python longs
1508 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
1510Optional Packages:
1511 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1512 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001513 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001514 specify the kind of universal binary that should be
1515 created. this option is only valid when
1516 --enable-universalsdk is set; options are:
1517 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1518 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001519 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001520 specify the name for the python framework on macOS
1521 only valid when --enable-framework is set. see
1522 Mac/README.rst (default is 'Python')
1523 --with-cxx-main[=COMPILER]
1524 compile main() and link Python executable with C++
1525 compiler specified in COMPILER (default is $CXX)
1526 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1527 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001528 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001529 (default is no)
1530 --with-assertions build with C assertions enabled (default is no)
1531 --with-lto enable Link-Time-Optimization in any build (default
1532 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001533 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001534 select hash algorithm for use in Python/pyhash.c
1535 (default is SipHash24)
Charles-François Natalid30b0222014-05-08 23:08:51 +01001536 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001537 enable AddressSanitizer memory error detector,
1538 'asan' (default is no)
1539 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1540 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001541 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001542 enable UndefinedBehaviorSanitizer undefined
1543 behaviour detector, 'ubsan' (default is no)
1544 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001545 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001546 library, see Doc/library/pyexpat.rst (default is no)
1547 --with-system-ffi build _ctypes module using an installed ffi library,
1548 see Doc/library/ctypes.rst (default is
1549 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001550 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001551 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001552 --with-decimal-contextvar
1553 build _decimal module using a coroutine-local rather
1554 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001555 --with-tcltk-includes='-I...'
1556 override search for Tcl and Tk include files
1557 --with-tcltk-libs='-L...'
1558 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001559 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001560 override order to check db backends for dbm; a valid
1561 value is a colon separated string with the backend
1562 names `ndbm', `gdbm' and `bdb'.
1563 --with-doc-strings enable documentation strings (default is yes)
1564 --with-pymalloc enable specialized mallocs (default is yes)
1565 --with-c-locale-coercion
1566 enable C locale coercion to a UTF-8 based locale
1567 (default is yes)
1568 --with-valgrind enable Valgrind support (default is no)
1569 --with-dtrace enable DTrace support (default is no)
1570 --with-libm=STRING override libm math library to STRING (default is
1571 system-dependent)
1572 --with-libc=STRING override libc C library to STRING (default is
1573 system-dependent)
1574 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001575 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001576 --with-ensurepip[=install|upgrade|no]
1577 "install" or "upgrade" using bundled pip (default is
1578 upgrade)
1579 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001580 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001581 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001582 Python's preferred selection (default), openssl:
1583 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001584 custom string, PROTOCOL_SSLv2 ignores the setting,
1585 see Doc/library/ssl.rst
Martin v. Löwis11437992002-04-12 09:54:03 +00001586
1587Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001588 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 CC C compiler command
1590 CFLAGS C compiler flags
1591 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1592 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001594 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001597 PROFILE_TASK
1598 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001599 PKG_CONFIG path to pkg-config utility
1600 PKG_CONFIG_PATH
1601 directories to add to pkg-config's search path
1602 PKG_CONFIG_LIBDIR
1603 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001604
1605Use these variables to override the choices made by `configure' or to help
1606it to find libraries and programs with nonstandard names/locations.
1607
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001608Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001609_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001611fi
1612
1613if test "$ac_init_help" = "recursive"; then
1614 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 test -d "$ac_dir" ||
1617 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1618 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 ac_builddir=.
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621case "$ac_dir" in
1622.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1623*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 case $ac_top_builddir_sub in
1628 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1629 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1630 esac ;;
1631esac
1632ac_abs_top_builddir=$ac_pwd
1633ac_abs_builddir=$ac_pwd$ac_dir_suffix
1634# for backward compatibility:
1635ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
1637case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 ac_top_srcdir=$ac_top_builddir_sub
1641 ac_abs_top_srcdir=$ac_pwd ;;
1642 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 ac_top_srcdir=$srcdir
1645 ac_abs_top_srcdir=$srcdir ;;
1646 *) # Relative name.
1647 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1648 ac_top_srcdir=$ac_top_build_prefix$srcdir
1649 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001650esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653 cd "$ac_dir" || { ac_status=$?; continue; }
1654 # Check for guested configure.
1655 if test -f "$ac_srcdir/configure.gnu"; then
1656 echo &&
1657 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1658 elif test -f "$ac_srcdir/configure"; then
1659 echo &&
1660 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001662 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001663 fi || ac_status=$?
1664 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001665 done
1666fi
1667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001668test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001669if $ac_init_version; then
1670 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001671python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001672generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001673
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001674Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001675This configure script is free software; the Free Software Foundation
1676gives unlimited permission to copy, distribute and modify it.
1677_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001678 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001680
1681## ------------------------ ##
1682## Autoconf initialization. ##
1683## ------------------------ ##
1684
1685# ac_fn_c_try_compile LINENO
1686# --------------------------
1687# Try to compile conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_compile ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 rm -f conftest.$ac_objext
1692 if { { ac_try="$ac_compile"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_compile") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } && {
1708 test -z "$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 } && test -s conftest.$ac_objext; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_compile
1722
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001723# ac_fn_c_try_cpp LINENO
1724# ----------------------
1725# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_cpp ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 if { { ac_try="$ac_cpp conftest.$ac_ext"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1737 ac_status=$?
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1742 fi
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } > conftest.i && {
1745 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1746 test ! -s conftest.err
1747 }; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=1
1754fi
1755 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1756 as_fn_set_status $ac_retval
1757
1758} # ac_fn_c_try_cpp
1759
Matthias Kloseb9621712010-04-24 17:59:49 +00001760# ac_fn_c_try_link LINENO
1761# -----------------------
1762# Try to link conftest.$ac_ext, and return whether this succeeded.
1763ac_fn_c_try_link ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 rm -f conftest.$ac_objext conftest$ac_exeext
1767 if { { ac_try="$ac_link"
1768case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_link") 2>conftest.err
1775 ac_status=$?
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1780 fi
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } && {
1783 test -z "$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 } && test -s conftest$ac_exeext && {
1786 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001787 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001788 }; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: failed program was:" >&5
1792sed 's/^/| /' conftest.$ac_ext >&5
1793
1794 ac_retval=1
1795fi
1796 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1797 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1798 # interfere with the next link command; also delete a directory that is
1799 # left behind by Apple's compiler. We do this before executing the actions.
1800 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001801 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 as_fn_set_status $ac_retval
1803
1804} # ac_fn_c_try_link
1805
Matthias Kloseb9621712010-04-24 17:59:49 +00001806# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1807# -------------------------------------------------------
1808# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1809# the include files in INCLUDES and setting the cache variable VAR
1810# accordingly.
1811ac_fn_c_check_header_mongrel ()
1812{
1813 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001814 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1816$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001817if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001818 $as_echo_n "(cached) " >&6
1819fi
1820eval ac_res=\$$3
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1822$as_echo "$ac_res" >&6; }
1823else
1824 # Is the header compilable?
1825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1826$as_echo_n "checking $2 usability... " >&6; }
1827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1828/* end confdefs.h. */
1829$4
1830#include <$2>
1831_ACEOF
1832if ac_fn_c_try_compile "$LINENO"; then :
1833 ac_header_compiler=yes
1834else
1835 ac_header_compiler=no
1836fi
1837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1839$as_echo "$ac_header_compiler" >&6; }
1840
1841# Is the header present?
1842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1843$as_echo_n "checking $2 presence... " >&6; }
1844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1845/* end confdefs.h. */
1846#include <$2>
1847_ACEOF
1848if ac_fn_c_try_cpp "$LINENO"; then :
1849 ac_header_preproc=yes
1850else
1851 ac_header_preproc=no
1852fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001853rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1855$as_echo "$ac_header_preproc" >&6; }
1856
1857# So? What about this header?
1858case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1859 yes:no: )
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1861$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1863$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1864 ;;
1865 no:yes:* )
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1867$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1869$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1871$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1873$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1875$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001876( $as_echo "## --------------------------------------- ##
1877## Report this to https://bugs.python.org/ ##
1878## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001879 ) | sed "s/^/$as_me: WARNING: /" >&2
1880 ;;
1881esac
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1883$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001884if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 $as_echo_n "(cached) " >&6
1886else
1887 eval "$3=\$ac_header_compiler"
1888fi
1889eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891$as_echo "$ac_res" >&6; }
1892fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001894
1895} # ac_fn_c_check_header_mongrel
1896
1897# ac_fn_c_try_run LINENO
1898# ----------------------
1899# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1900# that executables *can* be run.
1901ac_fn_c_try_run ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 if { { ac_try="$ac_link"
1905case "(($ac_try" in
1906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1907 *) ac_try_echo=$ac_try;;
1908esac
1909eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1910$as_echo "$ac_try_echo"; } >&5
1911 (eval "$ac_link") 2>&5
1912 ac_status=$?
1913 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1914 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1915 { { case "(($ac_try" in
1916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1917 *) ac_try_echo=$ac_try;;
1918esac
1919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1920$as_echo "$ac_try_echo"; } >&5
1921 (eval "$ac_try") 2>&5
1922 ac_status=$?
1923 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1924 test $ac_status = 0; }; }; then :
1925 ac_retval=0
1926else
1927 $as_echo "$as_me: program exited with status $ac_status" >&5
1928 $as_echo "$as_me: failed program was:" >&5
1929sed 's/^/| /' conftest.$ac_ext >&5
1930
1931 ac_retval=$ac_status
1932fi
1933 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001934 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001935 as_fn_set_status $ac_retval
1936
1937} # ac_fn_c_try_run
1938
1939# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1940# -------------------------------------------------------
1941# Tests whether HEADER exists and can be compiled using the include files in
1942# INCLUDES, setting the cache variable VAR accordingly.
1943ac_fn_c_check_header_compile ()
1944{
1945 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1947$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001948if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001949 $as_echo_n "(cached) " >&6
1950else
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$4
1954#include <$2>
1955_ACEOF
1956if ac_fn_c_try_compile "$LINENO"; then :
1957 eval "$3=yes"
1958else
1959 eval "$3=no"
1960fi
1961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1962fi
1963eval ac_res=\$$3
1964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1965$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001966 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001967
1968} # ac_fn_c_check_header_compile
1969
Matthias Kloseb9621712010-04-24 17:59:49 +00001970# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1971# -------------------------------------------
1972# Tests whether TYPE exists after having included INCLUDES, setting cache
1973# variable VAR accordingly.
1974ac_fn_c_check_type ()
1975{
1976 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1978$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001979if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001980 $as_echo_n "(cached) " >&6
1981else
1982 eval "$3=no"
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$4
1986int
1987main ()
1988{
1989if (sizeof ($2))
1990 return 0;
1991 ;
1992 return 0;
1993}
1994_ACEOF
1995if ac_fn_c_try_compile "$LINENO"; then :
1996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002if (sizeof (($2)))
2003 return 0;
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009
2010else
2011 eval "$3=yes"
2012fi
2013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2014fi
2015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2016fi
2017eval ac_res=\$$3
2018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2019$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002020 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022} # ac_fn_c_check_type
2023
Matthias Kloseb9621712010-04-24 17:59:49 +00002024# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2025# --------------------------------------------
2026# Tries to find the compile-time value of EXPR in a program that includes
2027# INCLUDES, setting VAR accordingly. Returns whether the value could be
2028# computed
2029ac_fn_c_compute_int ()
2030{
2031 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032 if test "$cross_compiling" = yes; then
2033 # Depending upon the size, compute the lo and hi bounds.
2034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$4
2037int
2038main ()
2039{
2040static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002041test_array [0] = 0;
2042return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002043
2044 ;
2045 return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"; then :
2049 ac_lo=0 ac_mid=0
2050 while :; do
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002058test_array [0] = 0;
2059return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_hi=$ac_mid; break
2067else
2068 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2069 if test $ac_lo -le $ac_mid; then
2070 ac_lo= ac_hi=
2071 break
2072 fi
2073 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2074fi
2075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076 done
2077else
2078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2079/* end confdefs.h. */
2080$4
2081int
2082main ()
2083{
2084static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002085test_array [0] = 0;
2086return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002087
2088 ;
2089 return 0;
2090}
2091_ACEOF
2092if ac_fn_c_try_compile "$LINENO"; then :
2093 ac_hi=-1 ac_mid=-1
2094 while :; do
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002102test_array [0] = 0;
2103return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_lo=$ac_mid; break
2111else
2112 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2113 if test $ac_mid -le $ac_hi; then
2114 ac_lo= ac_hi=
2115 break
2116 fi
2117 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2118fi
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 done
2121else
2122 ac_lo= ac_hi=
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127# Binary search between lo and hi bounds.
2128while test "x$ac_lo" != "x$ac_hi"; do
2129 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133int
2134main ()
2135{
2136static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002137test_array [0] = 0;
2138return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_compile "$LINENO"; then :
2145 ac_hi=$ac_mid
2146else
2147 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150done
2151case $ac_lo in #((
2152?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2153'') ac_retval=1 ;;
2154esac
2155 else
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h. */
2158$4
2159static long int longval () { return $2; }
2160static unsigned long int ulongval () { return $2; }
2161#include <stdio.h>
2162#include <stdlib.h>
2163int
2164main ()
2165{
2166
2167 FILE *f = fopen ("conftest.val", "w");
2168 if (! f)
2169 return 1;
2170 if (($2) < 0)
2171 {
2172 long int i = longval ();
2173 if (i != ($2))
2174 return 1;
2175 fprintf (f, "%ld", i);
2176 }
2177 else
2178 {
2179 unsigned long int i = ulongval ();
2180 if (i != ($2))
2181 return 1;
2182 fprintf (f, "%lu", i);
2183 }
2184 /* Do not output a trailing newline, as this causes \r\n confusion
2185 on some platforms. */
2186 return ferror (f) || fclose (f) != 0;
2187
2188 ;
2189 return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_run "$LINENO"; then :
2193 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2194else
2195 ac_retval=1
2196fi
2197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2198 conftest.$ac_objext conftest.beam conftest.$ac_ext
2199rm -f conftest.val
2200
2201 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002202 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002203 as_fn_set_status $ac_retval
2204
2205} # ac_fn_c_compute_int
2206
2207# ac_fn_c_check_func LINENO FUNC VAR
2208# ----------------------------------
2209# Tests whether FUNC exists, setting the cache variable VAR accordingly
2210ac_fn_c_check_func ()
2211{
2212 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2214$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002215if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002216 $as_echo_n "(cached) " >&6
2217else
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219/* end confdefs.h. */
2220/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2221 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2222#define $2 innocuous_$2
2223
2224/* System header to define __stub macros and hopefully few prototypes,
2225 which can conflict with char $2 (); below.
2226 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2227 <limits.h> exists even on freestanding compilers. */
2228
2229#ifdef __STDC__
2230# include <limits.h>
2231#else
2232# include <assert.h>
2233#endif
2234
2235#undef $2
2236
2237/* Override any GCC internal prototype to avoid an error.
2238 Use char because int might match the return type of a GCC
2239 builtin and then its argument prototype would still apply. */
2240#ifdef __cplusplus
2241extern "C"
2242#endif
2243char $2 ();
2244/* The GNU C library defines this for functions which it implements
2245 to always fail with ENOSYS. Some functions are actually named
2246 something starting with __ and the normal name is an alias. */
2247#if defined __stub_$2 || defined __stub___$2
2248choke me
2249#endif
2250
2251int
2252main ()
2253{
2254return $2 ();
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_link "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext \
2265 conftest$ac_exeext conftest.$ac_ext
2266fi
2267eval ac_res=\$$3
2268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2269$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002270 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002271
2272} # ac_fn_c_check_func
2273
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002274# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2275# ---------------------------------------------
2276# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2277# accordingly.
2278ac_fn_c_check_decl ()
2279{
2280 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281 as_decl_name=`echo $2|sed 's/ *(.*//'`
2282 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2284$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2285if eval \${$3+:} false; then :
2286 $as_echo_n "(cached) " >&6
2287else
2288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h. */
2290$4
2291int
2292main ()
2293{
2294#ifndef $as_decl_name
2295#ifdef __cplusplus
2296 (void) $as_decl_use;
2297#else
2298 (void) $as_decl_name;
2299#endif
2300#endif
2301
2302 ;
2303 return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_compile "$LINENO"; then :
2307 eval "$3=yes"
2308else
2309 eval "$3=no"
2310fi
2311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312fi
2313eval ac_res=\$$3
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315$as_echo "$ac_res" >&6; }
2316 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2317
2318} # ac_fn_c_check_decl
2319
Matthias Kloseb9621712010-04-24 17:59:49 +00002320# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2321# ----------------------------------------------------
2322# Tries to find if the field MEMBER exists in type AGGR, after including
2323# INCLUDES, setting cache variable VAR accordingly.
2324ac_fn_c_check_member ()
2325{
2326 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2328$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002329if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002330 $as_echo_n "(cached) " >&6
2331else
2332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h. */
2334$5
2335int
2336main ()
2337{
2338static $2 ac_aggr;
2339if (ac_aggr.$3)
2340return 0;
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345if ac_fn_c_try_compile "$LINENO"; then :
2346 eval "$4=yes"
2347else
2348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2349/* end confdefs.h. */
2350$5
2351int
2352main ()
2353{
2354static $2 ac_aggr;
2355if (sizeof ac_aggr.$3)
2356return 0;
2357 ;
2358 return 0;
2359}
2360_ACEOF
2361if ac_fn_c_try_compile "$LINENO"; then :
2362 eval "$4=yes"
2363else
2364 eval "$4=no"
2365fi
2366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2367fi
2368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369fi
2370eval ac_res=\$$4
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2372$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002373 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002374
2375} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002377This file contains any messages produced by compilers while
2378running configure, to aid debugging if configure makes a mistake.
2379
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002380It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002381generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383 $ $0 $@
2384
2385_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002386exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002387{
2388cat <<_ASUNAME
2389## --------- ##
2390## Platform. ##
2391## --------- ##
2392
2393hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2394uname -m = `(uname -m) 2>/dev/null || echo unknown`
2395uname -r = `(uname -r) 2>/dev/null || echo unknown`
2396uname -s = `(uname -s) 2>/dev/null || echo unknown`
2397uname -v = `(uname -v) 2>/dev/null || echo unknown`
2398
2399/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2400/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2401
2402/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2403/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2404/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002405/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002406/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2407/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2408/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2409
2410_ASUNAME
2411
2412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2413for as_dir in $PATH
2414do
2415 IFS=$as_save_IFS
2416 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 $as_echo "PATH: $as_dir"
2418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002420
2421} >&5
2422
2423cat >&5 <<_ACEOF
2424
2425
2426## ----------- ##
2427## Core tests. ##
2428## ----------- ##
2429
2430_ACEOF
2431
2432
2433# Keep a trace of the command line.
2434# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002435# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002436# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002437# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002438ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002439ac_configure_args0=
2440ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002441ac_must_keep_next=false
2442for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002443do
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 for ac_arg
2445 do
2446 case $ac_arg in
2447 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2448 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2449 | -silent | --silent | --silen | --sile | --sil)
2450 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002452 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002453 esac
2454 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002459 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002461 case $ac_arg in
2462 *=* | --config-cache | -C | -disable-* | --disable-* \
2463 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2464 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2465 | -with-* | --with-* | -without-* | --without-* | --x)
2466 case "$ac_configure_args0 " in
2467 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2468 esac
2469 ;;
2470 -* ) ac_must_keep_next=true ;;
2471 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002472 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002473 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002474 ;;
2475 esac
2476 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002477done
Matthias Kloseb9621712010-04-24 17:59:49 +00002478{ ac_configure_args0=; unset ac_configure_args0;}
2479{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002480
2481# When interrupted or exit'd, cleanup temporary files, and complete
2482# config.log. We remove comments because anyway the quotes in there
2483# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484# WARNING: Use '\'' to represent an apostrophe within the trap.
2485# 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 +00002486trap 'exit_status=$?
2487 # Save into config.log some information that might help in debugging.
2488 {
2489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002492## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 echo
2495 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496(
2497 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2498 eval ac_val=\$$ac_var
2499 case $ac_val in #(
2500 *${as_nl}*)
2501 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2503$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
2505 case $ac_var in #(
2506 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2508 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac ;;
2510 esac
2511 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2514 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 "s/'\''/'\''\\\\'\'''\''/g;
2517 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2518 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002519 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002521 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 esac |
2523 sort
2524)
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002526
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002527 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002528## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002529## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 echo
2531 for ac_var in $ac_subst_vars
2532 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 eval ac_val=\$$ac_var
2534 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 done | sort
2539 echo
2540
2541 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002542 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002544## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 echo
2546 for ac_var in $ac_subst_files
2547 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548 eval ac_val=\$$ac_var
2549 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002552 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 done | sort
2554 echo
2555 fi
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002558 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002559## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002560## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 echo
2564 fi
2565 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 $as_echo "$as_me: caught signal $ac_signal"
2567 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 rm -f core *.core core.conftest.* &&
2570 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002573for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002575done
2576ac_signal=0
2577
2578# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002580
Matthias Kloseb9621712010-04-24 17:59:49 +00002581$as_echo "/* confdefs.h */" > confdefs.h
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583# Predefined preprocessor variables.
2584
2585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_NAME "$PACKAGE_NAME"
2587_ACEOF
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_VERSION "$PACKAGE_VERSION"
2595_ACEOF
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_STRING "$PACKAGE_STRING"
2599_ACEOF
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2603_ACEOF
2604
Matthias Kloseb9621712010-04-24 17:59:49 +00002605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_URL "$PACKAGE_URL"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609
2610# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002611# Prefer an explicitly selected file to automatically selected ones.
2612ac_site_file1=NONE
2613ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002615 # We do not want a PATH search for config.site.
2616 case $CONFIG_SITE in #((
2617 -*) ac_site_file1=./$CONFIG_SITE;;
2618 */*) ac_site_file1=$CONFIG_SITE;;
2619 *) ac_site_file1=./$CONFIG_SITE;;
2620 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 ac_site_file1=$prefix/share/config.site
2623 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624else
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 ac_site_file1=$ac_default_prefix/share/config.site
2626 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002628for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629do
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 test "x$ac_site_file" = xNONE && continue
2631 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2633$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002635 . "$ac_site_file" \
2636 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2638as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002639See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002640 fi
2641done
2642
2643if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # Some versions of bash will fail to source /dev/null (special files
2645 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2646 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2648$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2651 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 esac
2653 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002654else
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2656$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 >$cache_file
2658fi
2659
2660# Check that the precious variables saved in the cache have kept the same
2661# value.
2662ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2665 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2667 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 case $ac_old_set,$ac_new_set in
2669 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2671$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 +00002672 ac_cache_corrupted=: ;;
2673 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2675$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 ac_cache_corrupted=: ;;
2677 ,);;
2678 *)
2679 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 # differences in whitespace do not lead to failure.
2681 ac_old_val_w=`echo x $ac_old_val`
2682 ac_new_val_w=`echo x $ac_new_val`
2683 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2685$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2686 ac_cache_corrupted=:
2687 else
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2689$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2690 eval $ac_var=\$ac_old_val
2691 fi
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2693$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2695$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 fi;;
2697 esac
2698 # Pass precious variables to config.status.
2699 if test "$ac_new_set" = set; then
2700 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 *) ac_arg=$ac_var=$ac_new_val ;;
2703 esac
2704 case " $ac_configure_args " in
2705 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002706 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 esac
2708 fi
2709done
2710if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2714$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002715 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002717## -------------------- ##
2718## Main body of script. ##
2719## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002720
Guido van Rossum7f43da71994-08-01 12:15:30 +00002721ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2725ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726
Guido van Rossum627b2d71993-12-24 10:39:16 +00002727
Michael W. Hudson54241132001-12-07 15:38:26 +00002728
Trent Nelson4d4ec652012-10-16 08:51:24 -04002729
Christian Heimesff5be6e2018-01-20 13:19:21 +01002730
2731
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002732if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002733 # If we're building out-of-tree, we need to make sure the following
2734 # resources get picked up before their $srcdir counterparts.
2735 # Objects/ -> typeslots.inc
2736 # Include/ -> Python-ast.h, graminit.h
2737 # Python/ -> importlib.h
2738 # (A side effect of this is that these resources will automatically be
2739 # regenerated when building out-of-tree, regardless of whether or not
2740 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2741 # off.)
2742 BASECPPFLAGS="-IObjects -IInclude -IPython"
2743else
2744 BASECPPFLAGS=""
2745fi
2746
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747
2748
2749
2750
Victor Stinner9ed34a82017-05-02 22:35:58 +02002751if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753# Extract the first word of "git", so it can be a program name with args.
2754set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2756$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758 $as_echo_n "(cached) " >&6
2759else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760 if test -n "$HAS_GIT"; then
2761 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762else
2763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2764for as_dir in $PATH
2765do
2766 IFS=$as_save_IFS
2767 test -z "$as_dir" && as_dir=.
2768 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2772 break 2
2773 fi
2774done
2775 done
2776IFS=$as_save_IFS
2777
Ned Deily5c4b0d02017-03-04 00:19:55 -05002778 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779fi
2780fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002781HAS_GIT=$ac_cv_prog_HAS_GIT
2782if test -n "$HAS_GIT"; then
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2784$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002785else
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2787$as_echo "no" >&6; }
2788fi
2789
2790
2791else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002792HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002793fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002794if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002795then
Xiang Zhang4c855572018-08-20 22:36:19 +08002796 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2797 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2798 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002800 GITVERSION=""
2801 GITTAG=""
2802 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803fi
2804
2805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002806ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002807
2808
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002809ac_aux_dir=
2810for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2811 if test -f "$ac_dir/install-sh"; then
2812 ac_aux_dir=$ac_dir
2813 ac_install_sh="$ac_aux_dir/install-sh -c"
2814 break
2815 elif 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/shtool"; then
2820 ac_aux_dir=$ac_dir
2821 ac_install_sh="$ac_aux_dir/shtool install -c"
2822 break
2823 fi
2824done
2825if test -z "$ac_aux_dir"; then
2826 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2827fi
2828
2829# These three variables are undocumented and unsupported,
2830# and are intended to be withdrawn in a future Autoconf release.
2831# They can cause serious problems if a builder's source tree is in a directory
2832# whose full name contains unusual characters.
2833ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2834ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2835ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2836
2837
2838# Make sure we can run config.sub.
2839$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2840 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2841
2842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2843$as_echo_n "checking build system type... " >&6; }
2844if ${ac_cv_build+:} false; then :
2845 $as_echo_n "(cached) " >&6
2846else
2847 ac_build_alias=$build_alias
2848test "x$ac_build_alias" = x &&
2849 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2850test "x$ac_build_alias" = x &&
2851 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2852ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2853 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2854
2855fi
2856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2857$as_echo "$ac_cv_build" >&6; }
2858case $ac_cv_build in
2859*-*-*) ;;
2860*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2861esac
2862build=$ac_cv_build
2863ac_save_IFS=$IFS; IFS='-'
2864set x $ac_cv_build
2865shift
2866build_cpu=$1
2867build_vendor=$2
2868shift; shift
2869# Remember, the first character of IFS is used to create $*,
2870# except with old shells:
2871build_os=$*
2872IFS=$ac_save_IFS
2873case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2874
2875
2876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2877$as_echo_n "checking host system type... " >&6; }
2878if ${ac_cv_host+:} false; then :
2879 $as_echo_n "(cached) " >&6
2880else
2881 if test "x$host_alias" = x; then
2882 ac_cv_host=$ac_cv_build
2883else
2884 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2885 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2886fi
2887
2888fi
2889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2890$as_echo "$ac_cv_host" >&6; }
2891case $ac_cv_host in
2892*-*-*) ;;
2893*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2894esac
2895host=$ac_cv_host
2896ac_save_IFS=$IFS; IFS='-'
2897set x $ac_cv_host
2898shift
2899host_cpu=$1
2900host_vendor=$2
2901shift; shift
2902# Remember, the first character of IFS is used to create $*,
2903# except with old shells:
2904host_os=$*
2905IFS=$ac_save_IFS
2906case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2907
2908
2909
doko@python.orga10e4a92013-01-25 18:45:12 +01002910
2911
Ned Deilyfcbc2462014-08-22 13:32:49 -07002912# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2913rm -f pybuilddir.txt
2914
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915for ac_prog in python$PACKAGE_VERSION python3 python
2916do
2917 # Extract the first word of "$ac_prog", so it can be a program name with args.
2918set dummy $ac_prog; ac_word=$2
2919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2920$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002921if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922 $as_echo_n "(cached) " >&6
2923else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002924 if test -n "$PYTHON_FOR_REGEN"; then
2925 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926else
2927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2928for as_dir in $PATH
2929do
2930 IFS=$as_save_IFS
2931 test -z "$as_dir" && as_dir=.
2932 for ac_exec_ext in '' $ac_executable_extensions; do
2933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002934 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2936 break 2
2937 fi
2938done
2939 done
2940IFS=$as_save_IFS
2941
2942fi
2943fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002944PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2945if test -n "$PYTHON_FOR_REGEN"; then
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2947$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002948else
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2950$as_echo "no" >&6; }
2951fi
2952
2953
Victor Stinnera5c62a82017-05-03 18:21:48 +02002954 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002955done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002956test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002957
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002958
2959
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002960if test "$cross_compiling" = yes; then
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2962$as_echo_n "checking for python interpreter for cross build... " >&6; }
2963 if test -z "$PYTHON_FOR_BUILD"; then
2964 for interp in python$PACKAGE_VERSION python3 python; do
2965 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002966 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 +02002967 break
2968 fi
2969 interp=
2970 done
2971 if test x$interp = x; then
2972 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2973 fi
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2975$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002976 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 +02002977 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002978elif test "$cross_compiling" = maybe; then
2979 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002980else
2981 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2982fi
2983
2984
Martin v. Löwis11437992002-04-12 09:54:03 +00002985
Benjamin Petersond23f8222009-04-05 19:13:16 +00002986if test "$prefix" != "/"; then
2987 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2988fi
2989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991
2992
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002993# We don't use PACKAGE_ variables, and they cause conflicts
2994# with other autoconf-based packages that include Python.h
2995grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2996rm confdefs.h
2997mv confdefs.h.new confdefs.h
2998
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002999
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003000VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003001
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003002# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003003
3004SOVERSION=1.0
3005
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006# The later defininition of _XOPEN_SOURCE disables certain features
3007# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010
3011
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003012# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3013# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3014# them.
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003017
3018
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3021# them.
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003024
3025
Martin v. Löwisd6320502004-08-12 13:45:08 +00003026# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003027# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3028# them.
3029
Matthias Kloseb9621712010-04-24 17:59:49 +00003030$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003031
3032
3033
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003034define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003035
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003036# Arguments passed to configure.
3037
3038CONFIG_ARGS="$ac_configure_args"
3039
Matthias Kloseb9621712010-04-24 17:59:49 +00003040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3041$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003043if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045 case $enableval in
3046 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003047 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003048 # information
3049 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003050 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003052 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3053 if test ! -d "${enableval}"
3054 then
3055 enableval=/
3056 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058 ;;
3059 esac
3060 case $enableval in
3061 no)
3062 UNIVERSALSDK=
3063 enable_universalsdk=
3064 ;;
3065 *)
3066 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003067 if test ! -d "${UNIVERSALSDK}"
3068 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003069 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003070 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071 ;;
3072 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003073
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003074
Thomas Wouters477c8d52006-05-27 19:21:47 +00003075else
3076
3077 UNIVERSALSDK=
3078 enable_universalsdk=
3079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003080fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003081
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082if test -n "${UNIVERSALSDK}"
3083then
Matthias Kloseb9621712010-04-24 17:59:49 +00003084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3085$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086else
Matthias Kloseb9621712010-04-24 17:59:49 +00003087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3088$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003089fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003092
Ned Deily87adb6e2013-10-18 21:09:56 -07003093ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003094
Ned Deilycbfb9a52012-06-23 16:02:19 -07003095# For backward compatibility reasons we prefer to select '32-bit' if available,
3096# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003097UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003098if test "`uname -s`" = "Darwin"
3099then
3100 if test -n "${UNIVERSALSDK}"
3101 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003102 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003103 then
3104 UNIVERSAL_ARCHS="intel"
3105 fi
3106 fi
3107fi
3108
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003109
Matthias Kloseb9621712010-04-24 17:59:49 +00003110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3111$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003112
3113# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003114if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003116 UNIVERSAL_ARCHS="$withval"
3117
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118fi
3119
Ned Deily87adb6e2013-10-18 21:09:56 -07003120if test -n "${UNIVERSALSDK}"
3121then
3122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3123$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3124else
3125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3126$as_echo "no" >&6; }
3127fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003129
3130# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003131if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003132 withval=$with_framework_name;
3133 PYTHONFRAMEWORK=${withval}
3134 PYTHONFRAMEWORKDIR=${withval}.framework
3135 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3136
3137else
3138
3139 PYTHONFRAMEWORK=Python
3140 PYTHONFRAMEWORKDIR=Python.framework
3141 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3142
3143fi
3144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003145# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003146if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003148 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003149 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003150 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003151 esac
3152 case $enableval in
3153 no)
3154 PYTHONFRAMEWORK=
3155 PYTHONFRAMEWORKDIR=no-framework
3156 PYTHONFRAMEWORKPREFIX=
3157 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003158 FRAMEWORKINSTALLFIRST=
3159 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 FRAMEWORKALTINSTALLFIRST=
3161 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003162 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003163 if test "x${prefix}" = "xNONE"; then
3164 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3165 else
3166 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3167 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003168 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003169 ;;
3170 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003171 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003172 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003173 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003174 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003175 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3176 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003177 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003178 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003179
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003180 if test "x${prefix}" = "xNONE" ; then
3181 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003182
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003183 else
3184 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3185 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003186
3187 case "${enableval}" in
3188 /System*)
3189 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3190 if test "${prefix}" = "NONE" ; then
3191 # See below
3192 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3193 fi
3194 ;;
3195
3196 /Library*)
3197 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3198 ;;
3199
3200 */Library/Frameworks)
3201 MDIR="`dirname "${enableval}"`"
3202 MDIR="`dirname "${MDIR}"`"
3203 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3204
3205 if test "${prefix}" = "NONE"; then
3206 # User hasn't specified the
3207 # --prefix option, but wants to install
3208 # the framework in a non-default location,
3209 # ensure that the compatibility links get
3210 # installed relative to that prefix as well
3211 # instead of in /usr/local.
3212 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3213 fi
3214 ;;
3215
3216 *)
3217 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3218 ;;
3219 esac
3220
Jack Jansen127e56e2001-09-11 14:41:54 +00003221 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003223 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003227 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3230
3231 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003234
Guido van Rossum563e7081996-09-10 18:20:48 +00003235else
Martin v. Löwis11437992002-04-12 09:54:03 +00003236
Jack Jansene578a632001-08-15 01:27:14 +00003237 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003238 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003239 PYTHONFRAMEWORKPREFIX=
3240 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003241 FRAMEWORKINSTALLFIRST=
3242 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003243 FRAMEWORKALTINSTALLFIRST=
3244 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003245 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003246 if test "x${prefix}" = "xNONE" ; then
3247 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3248 else
3249 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3250 fi
Jack Jansene578a632001-08-15 01:27:14 +00003251 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003252
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254fi
3255
Thomas Wouters477c8d52006-05-27 19:21:47 +00003256
3257
Michael W. Hudson54241132001-12-07 15:38:26 +00003258
3259
3260
3261
Jack Jansene578a632001-08-15 01:27:14 +00003262
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003263
3264
3265
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003266
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003267
Ned Deilyb8f944f2013-11-21 22:42:25 -08003268
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003269
3270cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003271#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003272_ACEOF
3273
3274
Jack Jansene578a632001-08-15 01:27:14 +00003275##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003276## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003277## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003278##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279# Set name for machine-dependent library files
3280
Matthias Kloseb9621712010-04-24 17:59:49 +00003281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3282$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283if test -z "$MACHDEP"
3284then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 # avoid using uname for cross builds
3286 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003287 # ac_sys_system and ac_sys_release are used for setting
3288 # a lot of different things including 'define_xopen_source'
3289 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003291 *-*-linux-android*)
3292 ac_sys_system=Linux-android
3293 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003294 *-*-linux*)
3295 ac_sys_system=Linux
3296 ;;
3297 *-*-cygwin*)
3298 ac_sys_system=Cygwin
3299 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003300 *-*-vxworks*)
3301 ac_sys_system=VxWorks
3302 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003303 *)
3304 # for now, limit cross builds to known configurations
3305 MACHDEP="unknown"
3306 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3307 esac
3308 ac_sys_release=
3309 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003310 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003311 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003312 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003313 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003314 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003315 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003316 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 fi
3318 ac_md_system=`echo $ac_sys_system |
3319 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3320 ac_md_release=`echo $ac_sys_release |
3321 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3322 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003323
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003325 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003326 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003327 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003328 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003329 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003331fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3333$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003334
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003335
3336if test "$cross_compiling" = yes; then
3337 case "$host" in
3338 *-*-linux*)
3339 case "$host_cpu" in
3340 arm*)
3341 _host_cpu=arm
3342 ;;
3343 *)
3344 _host_cpu=$host_cpu
3345 esac
3346 ;;
3347 *-*-cygwin*)
3348 _host_cpu=
3349 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003350 *-*-vxworks*)
3351 _host_cpu=$host_cpu
3352 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003353 *)
3354 # for now, limit cross builds to known configurations
3355 MACHDEP="unknown"
3356 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3357 esac
3358 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3359fi
3360
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003361# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3362# disable features if it is defined, without any means to access these
3363# features as extensions. For these systems, we skip the definition of
3364# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3365# some feature, make sure there is no alternative way to access this
3366# feature. Also, when using wildcards, make sure you have verified the
3367# need for not defining _XOPEN_SOURCE on all systems matching the
3368# wildcard, and that the wildcard does not include future systems
3369# (which may remove their limitations).
3370case $ac_sys_system/$ac_sys_release in
3371 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3372 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003373 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003374 # In addition, Stefan Krah confirms that issue #1244610 exists through
3375 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003376 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003377 define_xopen_source=no
3378 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3379 # also defined. This can be overridden by defining _BSD_SOURCE
3380 # As this has a different meaning on Linux, only define it on OpenBSD
3381
Matthias Kloseb9621712010-04-24 17:59:49 +00003382$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003383
3384 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003385 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003386 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3387 # also defined. This can be overridden by defining _BSD_SOURCE
3388 # As this has a different meaning on Linux, only define it on OpenBSD
3389
Matthias Kloseb9621712010-04-24 17:59:49 +00003390$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003391
3392 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003393 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3394 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3395 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003396 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 +00003397 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003398 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3399 # request to enable features supported by the standard as a request
3400 # to disable features not supported by the standard. The best way
3401 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3402 # entirely and define __EXTENSIONS__ instead.
3403 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003404 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003405 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3406 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003407 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003408 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003409 define_xopen_source=no;;
3410 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003411 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003412 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003413 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003414 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3415 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3416 # identifies itself as Darwin/7.*
3417 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3418 # disables platform specific features beyond repair.
3419 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3420 # has no effect, don't bother defining them
3421 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003422 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003423 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003424 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003425 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3426 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3427 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003428 AIX/4)
3429 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003430 AIX/5)
3431 if test `uname -r` -eq 1; then
3432 define_xopen_source=no
3433 fi
3434 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003435 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3436 # defining NI_NUMERICHOST.
3437 QNX/6.3.2)
3438 define_xopen_source=no
3439 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003440 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3441 # in network headers still using system V types.
3442 VxWorks/*)
3443 define_xopen_source=no
3444 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003445
Ian Nortona9edf442020-02-14 03:09:11 +00003446 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3447 # chroot() and other functions
3448 hp*|HP*)
3449 define_xopen_source=no
3450 ;;
3451
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003452esac
3453
3454if test $define_xopen_source = yes
3455then
Victor Stinner14d098d2011-09-07 22:29:43 +02003456 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003457
Victor Stinner14d098d2011-09-07 22:29:43 +02003458$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003459
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003460
3461 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3462 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3463 # several APIs are not declared. Since this is also needed in some
3464 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Matthias Kloseb9621712010-04-24 17:59:49 +00003466$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003467
3468
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003469
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003470$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003471
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003472fi
3473
Christian Heimes647cd872013-12-07 23:39:33 +01003474# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3475case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003476 hp*|HP*)
3477 define_stdc_a1=yes;;
3478 *)
3479 define_stdc_a1=no;;
3480esac
3481
3482if test $define_stdc_a1 = yes
3483then
Christian Heimes647cd872013-12-07 23:39:33 +01003484
3485$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3486
Christian Heimesb02bcae2013-12-08 15:21:08 +01003487fi
Christian Heimes647cd872013-12-07 23:39:33 +01003488
Jack Jansen6b08a402004-06-03 12:41:45 +00003489# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3490# it may influence the way we can build extensions, so distutils
3491# needs to check it
3492
Thomas Wouters477c8d52006-05-27 19:21:47 +00003493
Jack Jansen6b08a402004-06-03 12:41:45 +00003494CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003495EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003496
Guido van Rossum627b2d71993-12-24 10:39:16 +00003497# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003498
3499# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3500# for debug/optimization stuff. BASECFLAGS is for flags that are required
3501# just to get things to compile and link. Users are free to override OPT
3502# when running configure or make. The build should not break if they do.
3503# BASECFLAGS should generally not be messed with, however.
3504
Guido van Rossum8b131c51995-03-09 14:10:13 +00003505# If the user switches compilers, we can't believe the cache
3506if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3507then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003508 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003509(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003510fi
3511
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003512# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3513# when the compiler supports them, but we don't always want -O2, and
3514# we set -g later.
3515if test -z "$CFLAGS"; then
3516 CFLAGS=
3517fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003518
3519if test "$ac_sys_system" = "Darwin"
3520then
3521 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003522 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003523 # information
3524 if test -z "${CC}"
3525 then
3526 found_gcc=
3527 found_clang=
3528 as_save_IFS=$IFS; IFS=:
3529 for as_dir in $PATH
3530 do
3531 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003532 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003533 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003534 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003535 fi
3536 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003537 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003538 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003539 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540 fi
3541 fi
3542 done
3543 IFS=$as_save_IFS
3544
3545 if test -n "$found_gcc" -a -n "$found_clang"
3546 then
3547 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3548 then
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3550$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3551 CC="$found_clang"
3552 CXX="$found_clang++"
3553 fi
3554
3555
3556 elif test -z "$found_gcc" -a -n "$found_clang"
3557 then
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3559$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3560 CC="$found_clang"
3561 CXX="$found_clang++"
3562
3563 elif test -z "$found_gcc" -a -z "$found_clang"
3564 then
3565 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3566 if test -n "${found_clang}"
3567 then
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3569$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3570 CC="${found_clang}"
3571 CXX="`/usr/bin/xcrun -find clang++`"
3572
3573 # else: use default behaviour
3574 fi
3575 fi
3576 fi
3577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003578ac_ext=c
3579ac_cpp='$CPP $CPPFLAGS'
3580ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3581ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3582ac_compiler_gnu=$ac_cv_c_compiler_gnu
3583if test -n "$ac_tool_prefix"; then
3584 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3585set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3587$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003588if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003590else
3591 if test -n "$CC"; then
3592 ac_cv_prog_CC="$CC" # Let the user override the test.
3593else
Martin v. Löwis11437992002-04-12 09:54:03 +00003594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3595for as_dir in $PATH
3596do
3597 IFS=$as_save_IFS
3598 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 $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 +00003603 break 2
3604 fi
3605done
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003608
Jack Jansendd19cf82001-12-06 22:36:17 +00003609fi
3610fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003611CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003612if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3614$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003615else
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3617$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003618fi
3619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621fi
3622if test -z "$ac_cv_prog_CC"; then
3623 ac_ct_CC=$CC
3624 # Extract the first word of "gcc", so it can be a program name with args.
3625set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3627$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003628if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003630else
3631 if test -n "$ac_ct_CC"; then
3632 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3633else
3634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3635for as_dir in $PATH
3636do
3637 IFS=$as_save_IFS
3638 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 $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 +00003643 break 2
3644 fi
3645done
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003648
3649fi
3650fi
3651ac_ct_CC=$ac_cv_prog_ac_ct_CC
3652if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3654$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3657$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658fi
3659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 if test "x$ac_ct_CC" = x; then
3661 CC=""
3662 else
3663 case $cross_compiling:$ac_tool_warned in
3664yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667ac_tool_warned=yes ;;
3668esac
3669 CC=$ac_ct_CC
3670 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003671else
3672 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003673fi
3674
Jack Jansendd19cf82001-12-06 22:36:17 +00003675if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 if test -n "$ac_tool_prefix"; then
3677 # 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 +00003678set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3680$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003681if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003683else
3684 if test -n "$CC"; then
3685 ac_cv_prog_CC="$CC" # Let the user override the test.
3686else
Martin v. Löwis11437992002-04-12 09:54:03 +00003687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3688for as_dir in $PATH
3689do
3690 IFS=$as_save_IFS
3691 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $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 +00003696 break 2
3697 fi
3698done
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
3702fi
3703fi
3704CC=$ac_cv_prog_CC
3705if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3707$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003708else
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3710$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003711fi
3712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713
Martin v. Löwis11437992002-04-12 09:54:03 +00003714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716if test -z "$CC"; then
3717 # Extract the first word of "cc", so it can be a program name with args.
3718set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3720$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003721if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003723else
3724 if test -n "$CC"; then
3725 ac_cv_prog_CC="$CC" # Let the user override the test.
3726else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003727 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731 IFS=$as_save_IFS
3732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3736 ac_prog_rejected=yes
3737 continue
3738 fi
3739 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 $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 +00003741 break 2
3742 fi
3743done
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003746
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747if test $ac_prog_rejected = yes; then
3748 # We found a bogon in the path, so make sure we never use it.
3749 set dummy $ac_cv_prog_CC
3750 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 # We chose a different compiler from the bogus one.
3753 # However, it has the same basename, so the bogon will be chosen
3754 # first if we set CC to just the basename; use the full file name.
3755 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003756 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757 fi
3758fi
3759fi
3760fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003761CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3764$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003765else
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3767$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768fi
3769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770
Martin v. Löwis11437992002-04-12 09:54:03 +00003771fi
3772if test -z "$CC"; then
3773 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 do
3776 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3777set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3779$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003780if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003782else
3783 if test -n "$CC"; then
3784 ac_cv_prog_CC="$CC" # Let the user override the test.
3785else
Martin v. Löwis11437992002-04-12 09:54:03 +00003786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3787for as_dir in $PATH
3788do
3789 IFS=$as_save_IFS
3790 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $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 +00003795 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003797done
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003800
3801fi
3802fi
3803CC=$ac_cv_prog_CC
3804if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3806$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3809$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003810fi
3811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 test -n "$CC" && break
3814 done
3815fi
3816if test -z "$CC"; then
3817 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003819do
3820 # Extract the first word of "$ac_prog", so it can be a program name with args.
3821set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3823$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003824if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003826else
3827 if test -n "$ac_ct_CC"; then
3828 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3829else
3830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3831for as_dir in $PATH
3832do
3833 IFS=$as_save_IFS
3834 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003837 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 $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 +00003839 break 2
3840 fi
3841done
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846fi
3847ac_ct_CC=$ac_cv_prog_ac_ct_CC
3848if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3850$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3853$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003854fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857 test -n "$ac_ct_CC" && break
3858done
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860 if test "x$ac_ct_CC" = x; then
3861 CC=""
3862 else
3863 case $cross_compiling:$ac_tool_warned in
3864yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3866$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867ac_tool_warned=yes ;;
3868esac
3869 CC=$ac_ct_CC
3870 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
3872
3873fi
3874
3875
Matthias Kloseb9621712010-04-24 17:59:49 +00003876test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003878as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003879See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880
3881# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003882$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3883set X $ac_compile
3884ac_compiler=$2
3885for ac_option in --version -v -V -qversion; do
3886 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887case "(($ac_try" in
3888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3889 *) ac_try_echo=$ac_try;;
3890esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003891eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3892$as_echo "$ac_try_echo"; } >&5
3893 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 if test -s conftest.err; then
3896 sed '10a\
3897... rest of stderr output deleted ...
3898 10q' conftest.err >conftest.er1
3899 cat conftest.er1 >&5
3900 fi
3901 rm -f conftest.er1 conftest.err
3902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3903 test $ac_status = 0; }
3904done
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
Matthias Kloseb9621712010-04-24 17:59:49 +00003906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003907/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003908
Martin v. Löwis11437992002-04-12 09:54:03 +00003909int
3910main ()
3911{
3912
3913 ;
3914 return 0;
3915}
3916_ACEOF
3917ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003918ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003919# Try to create an executable without -o first, disregard a.out.
3920# It will help us diagnose broken compilers, and finding out an intuition
3921# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3923$as_echo_n "checking whether the C compiler works... " >&6; }
3924ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3925
3926# The possible output files:
3927ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929ac_rmfiles=
3930for ac_file in $ac_files
3931do
3932 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3935 esac
3936done
3937rm -f $ac_rmfiles
3938
Matthias Kloseb9621712010-04-24 17:59:49 +00003939if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940case "(($ac_try" in
3941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3942 *) ac_try_echo=$ac_try;;
3943esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3945$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003947 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3951# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3952# in a Makefile. We should not override ac_cv_exeext if it was cached,
3953# so that the user can short-circuit this test for compilers unknown to
3954# Autoconf.
3955for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003956do
3957 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003958 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003960 ;;
3961 [ab].out )
3962 # We found the default executable, but exeext='' is most
3963 # certainly right.
3964 break;;
3965 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 then :; else
3968 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3969 fi
3970 # We set ac_cv_exeext here because the later test for it is not
3971 # safe: cross compilers may not add the suffix if given an `-o'
3972 # argument, so we may need to know it at that point already.
3973 # Even if this section looks crufty: it has the advantage of
3974 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975 break;;
3976 * )
3977 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003978 esac
3979done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003980test "$ac_cv_exeext" = no && ac_cv_exeext=
3981
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003982else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983 ac_file=''
3984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003985if test -z "$ac_file"; then :
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3987$as_echo "no" >&6; }
3988$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003989sed 's/^/| /' conftest.$ac_ext >&5
3990
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003993as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003994See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003995else
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3997$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4000$as_echo_n "checking for C compiler default output file name... " >&6; }
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4002$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4008$as_echo_n "checking for suffix of executables... " >&6; }
4009if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004017 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4021# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4022# work properly (i.e., refer to `conftest.exe'), while it won't with
4023# `rm'.
4024for ac_file in conftest.exe conftest conftest.*; do
4025 test -f "$ac_file" || continue
4026 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4029 break;;
4030 * ) break;;
4031 esac
4032done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033else
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004036as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004037See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004039rm -f conftest conftest$ac_cv_exeext
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4041$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042
4043rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004044EXEEXT=$ac_cv_exeext
4045ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4047/* end confdefs.h. */
4048#include <stdio.h>
4049int
4050main ()
4051{
4052FILE *f = fopen ("conftest.out", "w");
4053 return ferror (f) || fclose (f) != 0;
4054
4055 ;
4056 return 0;
4057}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004059ac_clean_files="$ac_clean_files conftest.out"
4060# Check that the compiler produces executables we can run. If not, either
4061# the compiler is broken, or we cross compile.
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4063$as_echo_n "checking whether we are cross compiling... " >&6; }
4064if test "$cross_compiling" != yes; then
4065 { { ac_try="$ac_link"
4066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
4070eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4071$as_echo "$ac_try_echo"; } >&5
4072 (eval "$ac_link") 2>&5
4073 ac_status=$?
4074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4075 test $ac_status = 0; }
4076 if { ac_try='./conftest$ac_cv_exeext'
4077 { { case "(($ac_try" in
4078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4079 *) ac_try_echo=$ac_try;;
4080esac
4081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4082$as_echo "$ac_try_echo"; } >&5
4083 (eval "$ac_try") 2>&5
4084 ac_status=$?
4085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4086 test $ac_status = 0; }; }; then
4087 cross_compiling=no
4088 else
4089 if test "$cross_compiling" = maybe; then
4090 cross_compiling=yes
4091 else
4092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004094as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004095If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004096See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 fi
4098 fi
4099fi
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4101$as_echo "$cross_compiling" >&6; }
4102
4103rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4104ac_clean_files=$ac_clean_files_save
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4106$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004107if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 $as_echo_n "(cached) " >&6
4109else
4110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004111/* end confdefs.h. */
4112
4113int
4114main ()
4115{
4116
4117 ;
4118 return 0;
4119}
4120_ACEOF
4121rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004122if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123case "(($ac_try" in
4124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4125 *) ac_try_echo=$ac_try;;
4126esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004127eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4128$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4132 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133 for ac_file in conftest.o conftest.obj conftest.*; do
4134 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4138 break;;
4139 esac
4140done
4141else
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004143sed 's/^/| /' conftest.$ac_ext >&5
4144
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004147as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004148See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004149fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004150rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4153$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004154OBJEXT=$ac_cv_objext
4155ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4157$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004158if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004160else
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004163
Martin v. Löwis11437992002-04-12 09:54:03 +00004164int
4165main ()
4166{
4167#ifndef __GNUC__
4168 choke me
4169#endif
4170
4171 ;
4172 return 0;
4173}
4174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004175if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 ac_compiler_gnu=yes
4177else
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004181ac_cv_c_compiler_gnu=$ac_compiler_gnu
4182
4183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4185$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4186if test $ac_compiler_gnu = yes; then
4187 GCC=yes
4188else
4189 GCC=
4190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004191ac_test_CFLAGS=${CFLAGS+set}
4192ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4194$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004195if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004197else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198 ac_save_c_werror_flag=$ac_c_werror_flag
4199 ac_c_werror_flag=yes
4200 ac_cv_prog_cc_g=no
4201 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004204
Martin v. Löwis11437992002-04-12 09:54:03 +00004205int
4206main ()
4207{
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004214 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004215else
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 CFLAGS=""
4217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218/* end confdefs.h. */
4219
4220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004228if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229
Matthias Kloseb9621712010-04-24 17:59:49 +00004230else
4231 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234/* end confdefs.h. */
4235
4236int
4237main ()
4238{
4239
4240 ;
4241 return 0;
4242}
4243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004244if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4252 ac_c_werror_flag=$ac_save_c_werror_flag
4253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4255$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258elif test $ac_cv_prog_cc_g = yes; then
4259 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004260 CFLAGS="-g -O2"
4261 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263 fi
4264else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004265 if test "$GCC" = yes; then
4266 CFLAGS="-O2"
4267 else
4268 CFLAGS=
4269 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4272$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004273if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004275else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004277ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* end confdefs.h. */
4280#include <stdarg.h>
4281#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004282struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004283/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4284struct buf { int x; };
4285FILE * (*rcsopen) (struct buf *, struct stat *, int);
4286static char *e (p, i)
4287 char **p;
4288 int i;
4289{
4290 return p[i];
4291}
4292static char *f (char * (*g) (char **, int), char **p, ...)
4293{
4294 char *s;
4295 va_list v;
4296 va_start (v,p);
4297 s = g (p, va_arg (v,int));
4298 va_end (v);
4299 return s;
4300}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301
4302/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4303 function prototypes and stuff, but not '\xHH' hex character constants.
4304 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4307 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004309int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4312 inside strings and character constants. */
4313#define FOO(x) 'x'
4314int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4315
Skip Montanaro6dead952003-09-25 14:50:04 +00004316int test (int i, double x);
4317struct s1 {int (*f) (int a);};
4318struct s2 {int (*f) (double a);};
4319int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4320int argc;
4321char **argv;
4322int
4323main ()
4324{
4325return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4326 ;
4327 return 0;
4328}
4329_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4331 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004332do
4333 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337rm -f core conftest.err conftest.$ac_objext
4338 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004339done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004341CC=$ac_save_CC
4342
4343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344# AC_CACHE_VAL
4345case "x$ac_cv_prog_cc_c89" in
4346 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4348$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4351$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004352 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4355$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004356esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004358
Matthias Kloseb9621712010-04-24 17:59:49 +00004359fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004360
Martin v. Löwis11437992002-04-12 09:54:03 +00004361ac_ext=c
4362ac_cpp='$CPP $CPPFLAGS'
4363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4365ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004366
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004367ac_ext=c
4368ac_cpp='$CPP $CPPFLAGS'
4369ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4370ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4371ac_compiler_gnu=$ac_cv_c_compiler_gnu
4372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4373$as_echo_n "checking how to run the C preprocessor... " >&6; }
4374# On Suns, sometimes $CPP names a directory.
4375if test -n "$CPP" && test -d "$CPP"; then
4376 CPP=
4377fi
4378if test -z "$CPP"; then
4379 if ${ac_cv_prog_CPP+:} false; then :
4380 $as_echo_n "(cached) " >&6
4381else
4382 # Double quotes because CPP needs to be expanded
4383 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4384 do
4385 ac_preproc_ok=false
4386for ac_c_preproc_warn_flag in '' yes
4387do
4388 # Use a header file that comes with gcc, so configuring glibc
4389 # with a fresh cross-compiler works.
4390 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4391 # <limits.h> exists even on freestanding compilers.
4392 # On the NeXT, cc -E runs the code through the compiler's parser,
4393 # not just through cpp. "Syntax error" is here to catch this case.
4394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4395/* end confdefs.h. */
4396#ifdef __STDC__
4397# include <limits.h>
4398#else
4399# include <assert.h>
4400#endif
4401 Syntax error
4402_ACEOF
4403if ac_fn_c_try_cpp "$LINENO"; then :
4404
4405else
4406 # Broken: fails on valid input.
4407continue
4408fi
4409rm -f conftest.err conftest.i conftest.$ac_ext
4410
4411 # OK, works on sane cases. Now check whether nonexistent headers
4412 # can be detected and how.
4413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4414/* end confdefs.h. */
4415#include <ac_nonexistent.h>
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418 # Broken: success on invalid input.
4419continue
4420else
4421 # Passes both tests.
4422ac_preproc_ok=:
4423break
4424fi
4425rm -f conftest.err conftest.i conftest.$ac_ext
4426
4427done
4428# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4429rm -f conftest.i conftest.err conftest.$ac_ext
4430if $ac_preproc_ok; then :
4431 break
4432fi
4433
4434 done
4435 ac_cv_prog_CPP=$CPP
4436
4437fi
4438 CPP=$ac_cv_prog_CPP
4439else
4440 ac_cv_prog_CPP=$CPP
4441fi
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4443$as_echo "$CPP" >&6; }
4444ac_preproc_ok=false
4445for ac_c_preproc_warn_flag in '' yes
4446do
4447 # Use a header file that comes with gcc, so configuring glibc
4448 # with a fresh cross-compiler works.
4449 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4450 # <limits.h> exists even on freestanding compilers.
4451 # On the NeXT, cc -E runs the code through the compiler's parser,
4452 # not just through cpp. "Syntax error" is here to catch this case.
4453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4454/* end confdefs.h. */
4455#ifdef __STDC__
4456# include <limits.h>
4457#else
4458# include <assert.h>
4459#endif
4460 Syntax error
4461_ACEOF
4462if ac_fn_c_try_cpp "$LINENO"; then :
4463
4464else
4465 # Broken: fails on valid input.
4466continue
4467fi
4468rm -f conftest.err conftest.i conftest.$ac_ext
4469
4470 # OK, works on sane cases. Now check whether nonexistent headers
4471 # can be detected and how.
4472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4473/* end confdefs.h. */
4474#include <ac_nonexistent.h>
4475_ACEOF
4476if ac_fn_c_try_cpp "$LINENO"; then :
4477 # Broken: success on invalid input.
4478continue
4479else
4480 # Passes both tests.
4481ac_preproc_ok=:
4482break
4483fi
4484rm -f conftest.err conftest.i conftest.$ac_ext
4485
4486done
4487# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4488rm -f conftest.i conftest.err conftest.$ac_ext
4489if $ac_preproc_ok; then :
4490
4491else
4492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4493$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4494as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4495See \`config.log' for more details" "$LINENO" 5; }
4496fi
4497
4498ac_ext=c
4499ac_cpp='$CPP $CPPFLAGS'
4500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4502ac_compiler_gnu=$ac_cv_c_compiler_gnu
4503
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4505$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4506if ${ac_cv_path_GREP+:} false; then :
4507 $as_echo_n "(cached) " >&6
4508else
4509 if test -z "$GREP"; then
4510 ac_path_GREP_found=false
4511 # Loop through the user's path and test for each of PROGNAME-LIST
4512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4513for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4514do
4515 IFS=$as_save_IFS
4516 test -z "$as_dir" && as_dir=.
4517 for ac_prog in grep ggrep; do
4518 for ac_exec_ext in '' $ac_executable_extensions; do
4519 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4520 as_fn_executable_p "$ac_path_GREP" || continue
4521# Check for GNU ac_path_GREP and select it if it is found.
4522 # Check for GNU $ac_path_GREP
4523case `"$ac_path_GREP" --version 2>&1` in
4524*GNU*)
4525 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4526*)
4527 ac_count=0
4528 $as_echo_n 0123456789 >"conftest.in"
4529 while :
4530 do
4531 cat "conftest.in" "conftest.in" >"conftest.tmp"
4532 mv "conftest.tmp" "conftest.in"
4533 cp "conftest.in" "conftest.nl"
4534 $as_echo 'GREP' >> "conftest.nl"
4535 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4536 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4537 as_fn_arith $ac_count + 1 && ac_count=$as_val
4538 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4539 # Best one so far, save it but keep looking for a better one
4540 ac_cv_path_GREP="$ac_path_GREP"
4541 ac_path_GREP_max=$ac_count
4542 fi
4543 # 10*(2^10) chars as input seems more than enough
4544 test $ac_count -gt 10 && break
4545 done
4546 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4547esac
4548
4549 $ac_path_GREP_found && break 3
4550 done
4551 done
4552 done
4553IFS=$as_save_IFS
4554 if test -z "$ac_cv_path_GREP"; then
4555 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4556 fi
4557else
4558 ac_cv_path_GREP=$GREP
4559fi
4560
4561fi
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4563$as_echo "$ac_cv_path_GREP" >&6; }
4564 GREP="$ac_cv_path_GREP"
4565
4566
Łukasz Langaa785c872016-09-09 17:37:37 -07004567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4568$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4569if ${ac_cv_path_SED+:} false; then :
4570 $as_echo_n "(cached) " >&6
4571else
4572 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4573 for ac_i in 1 2 3 4 5 6 7; do
4574 ac_script="$ac_script$as_nl$ac_script"
4575 done
4576 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4577 { ac_script=; unset ac_script;}
4578 if test -z "$SED"; then
4579 ac_path_SED_found=false
4580 # Loop through the user's path and test for each of PROGNAME-LIST
4581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4582for as_dir in $PATH
4583do
4584 IFS=$as_save_IFS
4585 test -z "$as_dir" && as_dir=.
4586 for ac_prog in sed gsed; do
4587 for ac_exec_ext in '' $ac_executable_extensions; do
4588 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4589 as_fn_executable_p "$ac_path_SED" || continue
4590# Check for GNU ac_path_SED and select it if it is found.
4591 # Check for GNU $ac_path_SED
4592case `"$ac_path_SED" --version 2>&1` in
4593*GNU*)
4594 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4595*)
4596 ac_count=0
4597 $as_echo_n 0123456789 >"conftest.in"
4598 while :
4599 do
4600 cat "conftest.in" "conftest.in" >"conftest.tmp"
4601 mv "conftest.tmp" "conftest.in"
4602 cp "conftest.in" "conftest.nl"
4603 $as_echo '' >> "conftest.nl"
4604 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4605 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4606 as_fn_arith $ac_count + 1 && ac_count=$as_val
4607 if test $ac_count -gt ${ac_path_SED_max-0}; then
4608 # Best one so far, save it but keep looking for a better one
4609 ac_cv_path_SED="$ac_path_SED"
4610 ac_path_SED_max=$ac_count
4611 fi
4612 # 10*(2^10) chars as input seems more than enough
4613 test $ac_count -gt 10 && break
4614 done
4615 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4616esac
4617
4618 $ac_path_SED_found && break 3
4619 done
4620 done
4621 done
4622IFS=$as_save_IFS
4623 if test -z "$ac_cv_path_SED"; then
4624 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4625 fi
4626else
4627 ac_cv_path_SED=$SED
4628fi
4629
4630fi
4631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4632$as_echo "$ac_cv_path_SED" >&6; }
4633 SED="$ac_cv_path_SED"
4634 rm -f conftest.sed
4635
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004636
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4640$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004642# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004643if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004644 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
4646 case $withval in
4647 no) with_cxx_main=no
4648 MAINCC='$(CC)';;
4649 yes) with_cxx_main=yes
4650 MAINCC='$(CXX)';;
4651 *) with_cxx_main=yes
4652 MAINCC=$withval
4653 if test -z "$CXX"
4654 then
4655 CXX=$withval
4656 fi;;
4657 esac
4658else
4659
4660 with_cxx_main=no
4661 MAINCC='$(CC)'
4662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004663fi
4664
Matthias Kloseb9621712010-04-24 17:59:49 +00004665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4666$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
4668preset_cxx="$CXX"
4669if test -z "$CXX"
4670then
4671 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004672 gcc) if test -n "$ac_tool_prefix"; then
4673 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4674set dummy ${ac_tool_prefix}g++; ac_word=$2
4675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4676$as_echo_n "checking for $ac_word... " >&6; }
4677if ${ac_cv_path_CXX+:} false; then :
4678 $as_echo_n "(cached) " >&6
4679else
4680 case $CXX in
4681 [\\/]* | ?:[\\/]*)
4682 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4683 ;;
4684 *)
4685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4686for as_dir in notfound
4687do
4688 IFS=$as_save_IFS
4689 test -z "$as_dir" && as_dir=.
4690 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004692 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4694 break 2
4695 fi
4696done
4697 done
4698IFS=$as_save_IFS
4699
4700 ;;
4701esac
4702fi
4703CXX=$ac_cv_path_CXX
4704if test -n "$CXX"; then
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4706$as_echo "$CXX" >&6; }
4707else
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4709$as_echo "no" >&6; }
4710fi
4711
4712
4713fi
4714if test -z "$ac_cv_path_CXX"; then
4715 ac_pt_CXX=$CXX
4716 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004717set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4719$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004720if ${ac_cv_path_ac_pt_CXX+:} false; then :
4721 $as_echo_n "(cached) " >&6
4722else
4723 case $ac_pt_CXX in
4724 [\\/]* | ?:[\\/]*)
4725 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4726 ;;
4727 *)
4728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729for as_dir in notfound
4730do
4731 IFS=$as_save_IFS
4732 test -z "$as_dir" && as_dir=.
4733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004735 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4737 break 2
4738 fi
4739done
4740 done
4741IFS=$as_save_IFS
4742
4743 ;;
4744esac
4745fi
4746ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4747if test -n "$ac_pt_CXX"; then
4748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4749$as_echo "$ac_pt_CXX" >&6; }
4750else
4751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752$as_echo "no" >&6; }
4753fi
4754
4755 if test "x$ac_pt_CXX" = x; then
4756 CXX="g++"
4757 else
4758 case $cross_compiling:$ac_tool_warned in
4759yes:)
4760{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4761$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4762ac_tool_warned=yes ;;
4763esac
4764 CXX=$ac_pt_CXX
4765 fi
4766else
4767 CXX="$ac_cv_path_CXX"
4768fi
4769 ;;
4770 cc) if test -n "$ac_tool_prefix"; then
4771 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4772set dummy ${ac_tool_prefix}c++; ac_word=$2
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004775if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777else
4778 case $CXX in
4779 [\\/]* | ?:[\\/]*)
4780 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4781 ;;
4782 *)
4783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in notfound
4785do
4786 IFS=$as_save_IFS
4787 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004789 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792 break 2
4793 fi
4794done
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004796IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 ;;
4799esac
4800fi
4801CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004802if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4804$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004805else
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004809
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004810
4811fi
4812if test -z "$ac_cv_path_CXX"; then
4813 ac_pt_CXX=$CXX
4814 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004819 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823 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 +00004824 ;;
4825 *)
4826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827for as_dir in notfound
4828do
4829 IFS=$as_save_IFS
4830 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004833 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835 break 2
4836 fi
4837done
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004839IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841 ;;
4842esac
4843fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4845if test -n "$ac_pt_CXX"; then
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4847$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004848else
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004852
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004853 if test "x$ac_pt_CXX" = x; then
4854 CXX="c++"
4855 else
4856 case $cross_compiling:$ac_tool_warned in
4857yes:)
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4860ac_tool_warned=yes ;;
4861esac
4862 CXX=$ac_pt_CXX
4863 fi
4864else
4865 CXX="$ac_cv_path_CXX"
4866fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004867 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004868 clang|*/clang) if test -n "$ac_tool_prefix"; then
4869 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4870set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4872$as_echo_n "checking for $ac_word... " >&6; }
4873if ${ac_cv_path_CXX+:} false; then :
4874 $as_echo_n "(cached) " >&6
4875else
4876 case $CXX in
4877 [\\/]* | ?:[\\/]*)
4878 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4879 ;;
4880 *)
4881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4882for as_dir in notfound
4883do
4884 IFS=$as_save_IFS
4885 test -z "$as_dir" && as_dir=.
4886 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004887 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004888 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4890 break 2
4891 fi
4892done
4893 done
4894IFS=$as_save_IFS
4895
Ned Deilycbfb9a52012-06-23 16:02:19 -07004896 ;;
4897esac
4898fi
4899CXX=$ac_cv_path_CXX
4900if test -n "$CXX"; then
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4902$as_echo "$CXX" >&6; }
4903else
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4905$as_echo "no" >&6; }
4906fi
4907
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004908
4909fi
4910if test -z "$ac_cv_path_CXX"; then
4911 ac_pt_CXX=$CXX
4912 # Extract the first word of "clang++", so it can be a program name with args.
4913set dummy clang++; ac_word=$2
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915$as_echo_n "checking for $ac_word... " >&6; }
4916if ${ac_cv_path_ac_pt_CXX+:} false; then :
4917 $as_echo_n "(cached) " >&6
4918else
4919 case $ac_pt_CXX in
4920 [\\/]* | ?:[\\/]*)
4921 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4922 ;;
4923 *)
4924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4925for as_dir in notfound
4926do
4927 IFS=$as_save_IFS
4928 test -z "$as_dir" && as_dir=.
4929 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004930 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004931 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4932 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4933 break 2
4934 fi
4935done
4936 done
4937IFS=$as_save_IFS
4938
4939 ;;
4940esac
4941fi
4942ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4943if test -n "$ac_pt_CXX"; then
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4945$as_echo "$ac_pt_CXX" >&6; }
4946else
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4948$as_echo "no" >&6; }
4949fi
4950
4951 if test "x$ac_pt_CXX" = x; then
4952 CXX="clang++"
4953 else
4954 case $cross_compiling:$ac_tool_warned in
4955yes:)
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4958ac_tool_warned=yes ;;
4959esac
4960 CXX=$ac_pt_CXX
4961 fi
4962else
4963 CXX="$ac_cv_path_CXX"
4964fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004965 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004966 icc|*/icc) if test -n "$ac_tool_prefix"; then
4967 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4968set dummy ${ac_tool_prefix}icpc; ac_word=$2
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4970$as_echo_n "checking for $ac_word... " >&6; }
4971if ${ac_cv_path_CXX+:} false; then :
4972 $as_echo_n "(cached) " >&6
4973else
4974 case $CXX in
4975 [\\/]* | ?:[\\/]*)
4976 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4977 ;;
4978 *)
4979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in notfound
4981do
4982 IFS=$as_save_IFS
4983 test -z "$as_dir" && as_dir=.
4984 for ac_exec_ext in '' $ac_executable_extensions; do
4985 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4986 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4988 break 2
4989 fi
4990done
4991 done
4992IFS=$as_save_IFS
4993
4994 ;;
4995esac
4996fi
4997CXX=$ac_cv_path_CXX
4998if test -n "$CXX"; then
4999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5000$as_echo "$CXX" >&6; }
5001else
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003$as_echo "no" >&6; }
5004fi
5005
5006
5007fi
5008if test -z "$ac_cv_path_CXX"; then
5009 ac_pt_CXX=$CXX
5010 # Extract the first word of "icpc", so it can be a program name with args.
5011set dummy icpc; ac_word=$2
5012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5013$as_echo_n "checking for $ac_word... " >&6; }
5014if ${ac_cv_path_ac_pt_CXX+:} false; then :
5015 $as_echo_n "(cached) " >&6
5016else
5017 case $ac_pt_CXX in
5018 [\\/]* | ?:[\\/]*)
5019 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5020 ;;
5021 *)
5022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5023for as_dir in notfound
5024do
5025 IFS=$as_save_IFS
5026 test -z "$as_dir" && as_dir=.
5027 for ac_exec_ext in '' $ac_executable_extensions; do
5028 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5029 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5031 break 2
5032 fi
5033done
5034 done
5035IFS=$as_save_IFS
5036
5037 ;;
5038esac
5039fi
5040ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5041if test -n "$ac_pt_CXX"; then
5042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5043$as_echo "$ac_pt_CXX" >&6; }
5044else
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5046$as_echo "no" >&6; }
5047fi
5048
5049 if test "x$ac_pt_CXX" = x; then
5050 CXX="icpc"
5051 else
5052 case $cross_compiling:$ac_tool_warned in
5053yes:)
5054{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5055$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5056ac_tool_warned=yes ;;
5057esac
5058 CXX=$ac_pt_CXX
5059 fi
5060else
5061 CXX="$ac_cv_path_CXX"
5062fi
5063 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005064 esac
5065 if test "$CXX" = "notfound"
5066 then
5067 CXX=""
5068 fi
5069fi
5070if test -z "$CXX"
5071then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005072 if test -n "$ac_tool_prefix"; then
5073 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5074 do
5075 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5076set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5078$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005079if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005081else
5082 if test -n "$CXX"; then
5083 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5084else
5085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5086for as_dir in $PATH
5087do
5088 IFS=$as_save_IFS
5089 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005092 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005094 break 2
5095 fi
5096done
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099
5100fi
5101fi
5102CXX=$ac_cv_prog_CXX
5103if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5105$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106else
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5108$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005109fi
5110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005111
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005112 test -n "$CXX" && break
5113 done
5114fi
5115if test -z "$CXX"; then
5116 ac_ct_CXX=$CXX
5117 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5118do
5119 # Extract the first word of "$ac_prog", so it can be a program name with args.
5120set dummy $ac_prog; ac_word=$2
5121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5122$as_echo_n "checking for $ac_word... " >&6; }
5123if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5124 $as_echo_n "(cached) " >&6
5125else
5126 if test -n "$ac_ct_CXX"; then
5127 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5128else
5129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130for as_dir in $PATH
5131do
5132 IFS=$as_save_IFS
5133 test -z "$as_dir" && as_dir=.
5134 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005136 ac_cv_prog_ac_ct_CXX="$ac_prog"
5137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138 break 2
5139 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005140done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005141 done
5142IFS=$as_save_IFS
5143
5144fi
5145fi
5146ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5147if test -n "$ac_ct_CXX"; then
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5149$as_echo "$ac_ct_CXX" >&6; }
5150else
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5152$as_echo "no" >&6; }
5153fi
5154
5155
5156 test -n "$ac_ct_CXX" && break
5157done
5158
5159 if test "x$ac_ct_CXX" = x; then
5160 CXX="notfound"
5161 else
5162 case $cross_compiling:$ac_tool_warned in
5163yes:)
5164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5166ac_tool_warned=yes ;;
5167esac
5168 CXX=$ac_ct_CXX
5169 fi
5170fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005171
5172 if test "$CXX" = "notfound"
5173 then
5174 CXX=""
5175 fi
5176fi
5177if test "$preset_cxx" != "$CXX"
5178then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005179 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005180
5181 By default, distutils will build C++ extension modules with \"$CXX\".
5182 If this is not intended, then set CXX on the configure command line.
5183 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005184$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185
5186 By default, distutils will build C++ extension modules with \"$CXX\".
5187 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005188 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005189fi
5190
5191
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005192MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5193
5194
5195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5196$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5197cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef bfin
5199#undef cris
5200#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005201#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005202#undef hppa
5203#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005205#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005206#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005207#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005209#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005210 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005211#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005212# if defined(__x86_64__) && defined(__LP64__)
5213 x86_64-linux-gnu
5214# elif defined(__x86_64__) && defined(__ILP32__)
5215 x86_64-linux-gnux32
5216# elif defined(__i386__)
5217 i386-linux-gnu
5218# elif defined(__aarch64__) && defined(__AARCH64EL__)
5219# if defined(__ILP32__)
5220 aarch64_ilp32-linux-gnu
5221# else
5222 aarch64-linux-gnu
5223# endif
5224# elif defined(__aarch64__) && defined(__AARCH64EB__)
5225# if defined(__ILP32__)
5226 aarch64_be_ilp32-linux-gnu
5227# else
5228 aarch64_be-linux-gnu
5229# endif
5230# elif defined(__alpha__)
5231 alpha-linux-gnu
5232# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5233# if defined(__ARMEL__)
5234 arm-linux-gnueabihf
5235# else
5236 armeb-linux-gnueabihf
5237# endif
5238# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5239# if defined(__ARMEL__)
5240 arm-linux-gnueabi
5241# else
5242 armeb-linux-gnueabi
5243# endif
5244# elif defined(__hppa__)
5245 hppa-linux-gnu
5246# elif defined(__ia64__)
5247 ia64-linux-gnu
5248# elif defined(__m68k__) && !defined(__mcoldfire__)
5249 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005250# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5251# if _MIPS_SIM == _ABIO32
5252 mipsisa32r6el-linux-gnu
5253# elif _MIPS_SIM == _ABIN32
5254 mipsisa64r6el-linux-gnuabin32
5255# elif _MIPS_SIM == _ABI64
5256 mipsisa64r6el-linux-gnuabi64
5257# else
5258# error unknown platform triplet
5259# endif
5260# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5261# if _MIPS_SIM == _ABIO32
5262 mipsisa32r6-linux-gnu
5263# elif _MIPS_SIM == _ABIN32
5264 mipsisa64r6-linux-gnuabin32
5265# elif _MIPS_SIM == _ABI64
5266 mipsisa64r6-linux-gnuabi64
5267# else
5268# error unknown platform triplet
5269# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005270# elif defined(__mips_hard_float) && defined(_MIPSEL)
5271# if _MIPS_SIM == _ABIO32
5272 mipsel-linux-gnu
5273# elif _MIPS_SIM == _ABIN32
5274 mips64el-linux-gnuabin32
5275# elif _MIPS_SIM == _ABI64
5276 mips64el-linux-gnuabi64
5277# else
5278# error unknown platform triplet
5279# endif
5280# elif defined(__mips_hard_float)
5281# if _MIPS_SIM == _ABIO32
5282 mips-linux-gnu
5283# elif _MIPS_SIM == _ABIN32
5284 mips64-linux-gnuabin32
5285# elif _MIPS_SIM == _ABI64
5286 mips64-linux-gnuabi64
5287# else
5288# error unknown platform triplet
5289# endif
5290# elif defined(__or1k__)
5291 or1k-linux-gnu
5292# elif defined(__powerpc__) && defined(__SPE__)
5293 powerpc-linux-gnuspe
5294# elif defined(__powerpc64__)
5295# if defined(__LITTLE_ENDIAN__)
5296 powerpc64le-linux-gnu
5297# else
5298 powerpc64-linux-gnu
5299# endif
5300# elif defined(__powerpc__)
5301 powerpc-linux-gnu
5302# elif defined(__s390x__)
5303 s390x-linux-gnu
5304# elif defined(__s390__)
5305 s390-linux-gnu
5306# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5307 sh4-linux-gnu
5308# elif defined(__sparc__) && defined(__arch64__)
5309 sparc64-linux-gnu
5310# elif defined(__sparc__)
5311 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005312# elif defined(__riscv)
5313# if __riscv_xlen == 32
5314 riscv32-linux-gnu
5315# elif __riscv_xlen == 64
5316 riscv64-linux-gnu
5317# else
5318# error unknown platform triplet
5319# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005320# else
5321# error unknown platform triplet
5322# endif
5323#elif defined(__FreeBSD_kernel__)
5324# if defined(__LP64__)
5325 x86_64-kfreebsd-gnu
5326# elif defined(__i386__)
5327 i386-kfreebsd-gnu
5328# else
5329# error unknown platform triplet
5330# endif
5331#elif defined(__gnu_hurd__)
5332 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005333#elif defined(__APPLE__)
5334 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005335#elif defined(__VXWORKS__)
5336 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005337#else
5338# error unknown platform triplet
5339#endif
5340
5341EOF
5342
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005343if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005344 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5346$as_echo "$PLATFORM_TRIPLET" >&6; }
5347else
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5349$as_echo "none" >&6; }
5350fi
5351rm -f conftest.c conftest.out
5352
5353if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5354 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5355 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5356 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005357elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5358 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005360
doko@ubuntu.com55532312016-06-14 08:55:19 +02005361if test x$MULTIARCH != x; then
5362 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5363fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005364
5365
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5367$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5368save_LDFLAGS="$LDFLAGS"
5369LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005370
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5372/* end confdefs.h. */
5373
5374int
5375main ()
5376{
5377
5378 ;
5379 return 0;
5380}
5381_ACEOF
5382if ac_fn_c_try_link "$LINENO"; then :
5383 NO_AS_NEEDED="-Wl,--no-as-needed"
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5385$as_echo "yes" >&6; }
5386else
5387 NO_AS_NEEDED=""
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391rm -f core conftest.err conftest.$ac_objext \
5392 conftest$ac_exeext conftest.$ac_ext
5393LDFLAGS="$save_LDFLAGS"
5394
5395
5396
5397# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398
Matthias Kloseb9621712010-04-24 17:59:49 +00005399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5400$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005401if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403else
5404 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5405 then ac_cv_path_EGREP="$GREP -E"
5406 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 # Loop through the user's path and test for each of PROGNAME-LIST
5410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5412do
5413 IFS=$as_save_IFS
5414 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 for ac_prog in egrep; do
5416 for ac_exec_ext in '' $ac_executable_extensions; do
5417 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005418 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005419# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 # Check for GNU $ac_path_EGREP
5421case `"$ac_path_EGREP" --version 2>&1` in
5422*GNU*)
5423 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5424*)
5425 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 while :
5428 do
5429 cat "conftest.in" "conftest.in" >"conftest.tmp"
5430 mv "conftest.tmp" "conftest.in"
5431 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5434 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5437 # Best one so far, save it but keep looking for a better one
5438 ac_cv_path_EGREP="$ac_path_EGREP"
5439 ac_path_EGREP_max=$ac_count
5440 fi
5441 # 10*(2^10) chars as input seems more than enough
5442 test $ac_count -gt 10 && break
5443 done
5444 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5445esac
5446
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $ac_path_EGREP_found && break 3
5448 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005453 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 +00005454 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455else
5456 ac_cv_path_EGREP=$EGREP
5457fi
5458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459 fi
5460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5462$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005463 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005464
5465
Matthias Kloseb9621712010-04-24 17:59:49 +00005466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5467$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005468if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 $as_echo_n "(cached) " >&6
5470else
5471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005472/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005473#include <stdlib.h>
5474#include <stdarg.h>
5475#include <string.h>
5476#include <float.h>
5477
5478int
5479main ()
5480{
5481
5482 ;
5483 return 0;
5484}
5485_ACEOF
5486if ac_fn_c_try_compile "$LINENO"; then :
5487 ac_cv_header_stdc=yes
5488else
5489 ac_cv_header_stdc=no
5490fi
5491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5492
5493if test $ac_cv_header_stdc = yes; then
5494 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5496/* end confdefs.h. */
5497#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005498
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005499_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005501 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005503else
Matthias Kloseb9621712010-04-24 17:59:49 +00005504 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005505fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005506rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507
Matthias Kloseb9621712010-04-24 17:59:49 +00005508fi
5509
5510if test $ac_cv_header_stdc = yes; then
5511 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5513/* end confdefs.h. */
5514#include <stdlib.h>
5515
5516_ACEOF
5517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5518 $EGREP "free" >/dev/null 2>&1; then :
5519
5520else
5521 ac_cv_header_stdc=no
5522fi
5523rm -f conftest*
5524
5525fi
5526
5527if test $ac_cv_header_stdc = yes; then
5528 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5529 if test "$cross_compiling" = yes; then :
5530 :
5531else
5532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5533/* end confdefs.h. */
5534#include <ctype.h>
5535#include <stdlib.h>
5536#if ((' ' & 0x0FF) == 0x020)
5537# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5538# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5539#else
5540# define ISLOWER(c) \
5541 (('a' <= (c) && (c) <= 'i') \
5542 || ('j' <= (c) && (c) <= 'r') \
5543 || ('s' <= (c) && (c) <= 'z'))
5544# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5545#endif
5546
5547#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5548int
5549main ()
5550{
5551 int i;
5552 for (i = 0; i < 256; i++)
5553 if (XOR (islower (i), ISLOWER (i))
5554 || toupper (i) != TOUPPER (i))
5555 return 2;
5556 return 0;
5557}
5558_ACEOF
5559if ac_fn_c_try_run "$LINENO"; then :
5560
5561else
5562 ac_cv_header_stdc=no
5563fi
5564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5565 conftest.$ac_objext conftest.beam conftest.$ac_ext
5566fi
5567
5568fi
5569fi
5570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5571$as_echo "$ac_cv_header_stdc" >&6; }
5572if test $ac_cv_header_stdc = yes; then
5573
5574$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5575
5576fi
5577
5578# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5579for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5580 inttypes.h stdint.h unistd.h
5581do :
5582 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5583ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5584"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005585if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005586 cat >>confdefs.h <<_ACEOF
5587#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5588_ACEOF
5589
5590fi
5591
5592done
5593
5594
5595
5596 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 +02005597if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005598 MINIX=yes
5599else
5600 MINIX=
5601fi
5602
5603
5604 if test "$MINIX" = yes; then
5605
5606$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5607
5608
5609$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5610
5611
5612$as_echo "#define _MINIX 1" >>confdefs.h
5613
5614 fi
5615
5616
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5618$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005619if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005620 $as_echo_n "(cached) " >&6
5621else
5622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5623/* end confdefs.h. */
5624
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005625# define __EXTENSIONS__ 1
5626 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005627int
5628main ()
5629{
5630
5631 ;
5632 return 0;
5633}
5634_ACEOF
5635if ac_fn_c_try_compile "$LINENO"; then :
5636 ac_cv_safe_to_define___extensions__=yes
5637else
5638 ac_cv_safe_to_define___extensions__=no
5639fi
5640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5641fi
5642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5643$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5644 test $ac_cv_safe_to_define___extensions__ = yes &&
5645 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5646
5647 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5648
5649 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5650
5651 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5652
5653 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5654
5655
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656
Xavier de Gaye95750b12016-07-09 11:05:42 +02005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5658$as_echo_n "checking for the Android API level... " >&6; }
5659cat >> conftest.c <<EOF
5660#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005661android_api = __ANDROID_API__
5662arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005663#else
5664#error not Android
5665#endif
5666EOF
5667
5668if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005669 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5670 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5672$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005673 if test -z "$ANDROID_API_LEVEL"; then
5674 echo 'Fatal: you must define __ANDROID_API__'
5675 exit 1
5676 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005677
5678cat >>confdefs.h <<_ACEOF
5679#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5680_ACEOF
5681
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005682
5683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5684$as_echo_n "checking for the Android arm ABI... " >&6; }
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5686$as_echo "$_arm_arch" >&6; }
5687 if test "$_arm_arch" = 7; then
5688 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5689 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5690 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005691else
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5693$as_echo "not Android" >&6; }
5694fi
5695rm -f conftest.c conftest.out
5696
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697# Check for unsupported systems
5698case $ac_sys_system/$ac_sys_release in
5699atheos*|Linux*/1*)
5700 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5701 echo See README for details.
5702 exit 1;;
5703esac
5704
5705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5707$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
5709# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005710if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711 withval=$with_suffix;
5712 case $withval in
5713 no) EXEEXT=;;
5714 yes) EXEEXT=.exe;;
5715 *) EXEEXT=$withval;;
5716 esac
5717fi
5718
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5720$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721
5722# Test whether we're running on a non-case-sensitive system, in which
5723# case we give a warning if no ext is given
5724
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5726$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727if test ! -d CaseSensitiveTestDir; then
5728mkdir CaseSensitiveTestDir
5729fi
5730
5731if test -d casesensitivetestdir
5732then
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5734$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735 BUILDEXEEXT=.exe
5736else
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739 BUILDEXEEXT=$EXEEXT
5740fi
5741rmdir CaseSensitiveTestDir
5742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743case $ac_sys_system in
5744hp*|HP*)
5745 case $CC in
5746 cc|*/cc) CC="$CC -Ae";;
5747 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748esac
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5752$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753if test -z "$LIBRARY"
5754then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005755 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5758$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# LDLIBRARY is the name of the library to link against (as opposed to the
5761# name of the library into which to insert object files). BLDLIBRARY is also
5762# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5763# is blank as the main program is not linked directly against LDLIBRARY.
5764# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5765# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5766# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5767# DLLLIBRARY is the shared (i.e., DLL) library.
5768#
5769# RUNSHARED is used to run shared python without installed libraries
5770#
5771# INSTSONAME is the name of the shared library that will be use to install
5772# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005773#
5774# LDVERSION is the shared library version number, normally the Python version
5775# with the ABI build flags appended.
5776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
5778
5779
5780
5781
5782
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784LDLIBRARY="$LIBRARY"
5785BLDLIBRARY='$(LDLIBRARY)'
5786INSTSONAME='$(LDLIBRARY)'
5787DLLLIBRARY=''
5788LDLIBRARYDIR=''
5789RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005790LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791
5792# LINKCC is the command that links the python executable -- default is $(CC).
5793# If CXX is set, and if it is needed to link a main function that was
5794# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5795# python might then depend on the C++ runtime
5796# This is altered for AIX in order to build the export list before
5797# linking.
5798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5800$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801if test -z "$LINKCC"
5802then
5803 LINKCC='$(PURIFY) $(MAINCC)'
5804 case $ac_sys_system in
5805 AIX*)
5806 exp_extra="\"\""
5807 if test $ac_sys_release -ge 5 -o \
5808 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5809 exp_extra="."
5810 fi
5811 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 QNX*)
5813 # qcc must be used because the other compilers do not
5814 # support -N.
5815 LINKCC=qcc;;
5816 esac
5817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5819$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820
5821# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5822# make sure we default having it set to "no": this is used by
5823# distutils.unixccompiler to know if it should add --enable-new-dtags
5824# to linker command lines, and failing to detect GNU ld simply results
5825# in the same bahaviour as before.
5826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5828$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829ac_prog=ld
5830if test "$GCC" = yes; then
5831 ac_prog=`$CC -print-prog-name=ld`
5832fi
5833case `"$ac_prog" -V 2>&1 < /dev/null` in
5834 *GNU*)
5835 GNULD=yes;;
5836 *)
5837 GNULD=no;;
5838esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5840$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5843$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005845if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 enableval=$enable_shared;
5847fi
5848
5849
5850if test -z "$enable_shared"
5851then
5852 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005853 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854 enable_shared="yes";;
5855 *)
5856 enable_shared="no";;
5857 esac
5858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5860$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5863$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005865if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866 enableval=$enable_profiling;
5867fi
5868
5869if test "x$enable_profiling" = xyes; then
5870 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005871 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873/* end confdefs.h. */
5874int main() { return 0; }
5875_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876if ac_fn_c_try_link "$LINENO"; then :
5877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881rm -f core conftest.err conftest.$ac_objext \
5882 conftest$ac_exeext conftest.$ac_ext
5883 CC="$ac_save_cc"
5884else
5885 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5888$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890if test "x$enable_profiling" = xyes; then
5891 BASECFLAGS="-pg $BASECFLAGS"
5892 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893fi
5894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5896$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897
5898# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5899# library that we build, but we do not want to link against it (we
5900# will find it with a -framework option). For this reason there is an
5901# extra variable BLDLIBRARY against which Python and the extension
5902# modules are linked, BLDLIBRARY. This is normally the same as
5903# LDLIBRARY, but empty for MacOSX framework builds.
5904if test "$enable_framework"
5905then
5906 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005907 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 BLDLIBRARY=''
5909else
5910 BLDLIBRARY='$(LDLIBRARY)'
5911fi
5912
5913# Other platforms follow
5914if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005915 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916
Matthias Kloseb9621712010-04-24 17:59:49 +00005917$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918
5919 case $ac_sys_system in
5920 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 LDLIBRARY='libpython$(LDVERSION).dll.a'
5922 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
5924 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
5926 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005929 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005930 then
5931 PY3LIBRARY=libpython3.so
5932 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005934 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).so'
5936 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005937 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005939 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005940 then
5941 PY3LIBRARY=libpython3.so
5942 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
5944 hp*|HP*)
5945 case `uname -m` in
5946 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
5949 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
5952 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005954 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005957 LDLIBRARY='libpython$(LDVERSION).dylib'
5958 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005959 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005961 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005963 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005964 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965
5966 esac
5967else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005968 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 case $ac_sys_system in
5970 CYGWIN*)
5971 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 ;;
5974 esac
5975fi
5976
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005977if test "$cross_compiling" = yes; then
5978 RUNSHARED=
5979fi
5980
Matthias Kloseb9621712010-04-24 17:59:49 +00005981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5982$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005985if test -n "$ac_tool_prefix"; then
5986 for ac_prog in ar aal
5987 do
5988 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5989set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005992if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994else
5995 if test -n "$AR"; then
5996 ac_cv_prog_AR="$AR" # Let the user override the test.
5997else
5998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999for as_dir in $PATH
6000do
6001 IFS=$as_save_IFS
6002 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006005 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 break 2
6008 fi
6009done
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011IFS=$as_save_IFS
6012
6013fi
6014fi
6015AR=$ac_cv_prog_AR
6016if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6018$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019else
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022fi
6023
6024
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006025 test -n "$AR" && break
6026 done
6027fi
6028if test -z "$AR"; then
6029 ac_ct_AR=$AR
6030 for ac_prog in ar aal
6031do
6032 # Extract the first word of "$ac_prog", so it can be a program name with args.
6033set dummy $ac_prog; ac_word=$2
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6035$as_echo_n "checking for $ac_word... " >&6; }
6036if ${ac_cv_prog_ac_ct_AR+:} false; then :
6037 $as_echo_n "(cached) " >&6
6038else
6039 if test -n "$ac_ct_AR"; then
6040 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6041else
6042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH
6044do
6045 IFS=$as_save_IFS
6046 test -z "$as_dir" && as_dir=.
6047 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006049 ac_cv_prog_ac_ct_AR="$ac_prog"
6050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6051 break 2
6052 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006054 done
6055IFS=$as_save_IFS
6056
6057fi
6058fi
6059ac_ct_AR=$ac_cv_prog_ac_ct_AR
6060if test -n "$ac_ct_AR"; then
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6062$as_echo "$ac_ct_AR" >&6; }
6063else
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067
6068
6069 test -n "$ac_ct_AR" && break
6070done
6071
6072 if test "x$ac_ct_AR" = x; then
6073 AR="ar"
6074 else
6075 case $cross_compiling:$ac_tool_warned in
6076yes:)
6077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6079ac_tool_warned=yes ;;
6080esac
6081 AR=$ac_ct_AR
6082 fi
6083fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084
6085
6086# tweak ARFLAGS only if the user didn't set it on the command line
6087
6088if test -z "$ARFLAGS"
6089then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006090 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091fi
6092
doko@ubuntu.com58844492012-06-30 18:25:32 +02006093if test -n "$ac_tool_prefix"; then
6094 for ac_prog in readelf
6095 do
6096 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6097set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if ${ac_cv_prog_READELF+:} false; then :
6101 $as_echo_n "(cached) " >&6
6102else
6103 if test -n "$READELF"; then
6104 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6105else
6106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH
6108do
6109 IFS=$as_save_IFS
6110 test -z "$as_dir" && as_dir=.
6111 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006113 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6115 break 2
6116 fi
6117done
6118 done
6119IFS=$as_save_IFS
6120
6121fi
6122fi
6123READELF=$ac_cv_prog_READELF
6124if test -n "$READELF"; then
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6126$as_echo "$READELF" >&6; }
6127else
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
6130fi
6131
6132
6133 test -n "$READELF" && break
6134 done
6135fi
6136if test -z "$READELF"; then
6137 ac_ct_READELF=$READELF
6138 for ac_prog in readelf
6139do
6140 # Extract the first word of "$ac_prog", so it can be a program name with args.
6141set dummy $ac_prog; ac_word=$2
6142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6143$as_echo_n "checking for $ac_word... " >&6; }
6144if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6145 $as_echo_n "(cached) " >&6
6146else
6147 if test -n "$ac_ct_READELF"; then
6148 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6149else
6150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6151for as_dir in $PATH
6152do
6153 IFS=$as_save_IFS
6154 test -z "$as_dir" && as_dir=.
6155 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006156 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006157 ac_cv_prog_ac_ct_READELF="$ac_prog"
6158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6159 break 2
6160 fi
6161done
6162 done
6163IFS=$as_save_IFS
6164
6165fi
6166fi
6167ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6168if test -n "$ac_ct_READELF"; then
6169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6170$as_echo "$ac_ct_READELF" >&6; }
6171else
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6173$as_echo "no" >&6; }
6174fi
6175
6176
6177 test -n "$ac_ct_READELF" && break
6178done
6179
6180 if test "x$ac_ct_READELF" = x; then
6181 READELF=":"
6182 else
6183 case $cross_compiling:$ac_tool_warned in
6184yes:)
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6186$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6187ac_tool_warned=yes ;;
6188esac
6189 READELF=$ac_ct_READELF
6190 fi
6191fi
6192
6193if test "$cross_compiling" = yes; then
6194 case "$READELF" in
6195 readelf|:)
6196 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6197 ;;
6198 esac
6199fi
6200
6201
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006204hp*|HP*)
6205 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006206 if test -z "$INSTALL"
6207 then
6208 INSTALL="${srcdir}/install-sh -c"
6209 fi
6210esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211# Find a good install program. We prefer a C program (faster),
6212# so one script is as good as another. But avoid the broken or
6213# incompatible versions:
6214# SysV /etc/install, /usr/sbin/install
6215# SunOS /usr/etc/install
6216# IRIX /sbin/install
6217# AIX /bin/install
6218# AmigaOS /C/install, which installs bootblocks on floppy discs
6219# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6220# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6221# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6222# OS/2's system install, which has a completely different semantic
6223# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006224# Reject install programs that cannot install multiple files.
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6226$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006228if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006229 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230else
6231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232for as_dir in $PATH
6233do
6234 IFS=$as_save_IFS
6235 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 # Account for people who put trailing slashes in PATH elements.
6237case $as_dir/ in #((
6238 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006240 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241 /usr/ucb/* ) ;;
6242 *)
6243 # OSF1 and SCO ODT 3.0 have their own names for install.
6244 # Don't use installbsd from OSF since it installs stuff as root
6245 # by default.
6246 for ac_prog in ginstall scoinst install; do
6247 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006248 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249 if test $ac_prog = install &&
6250 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6251 # AIX install. It has an incompatible calling convention.
6252 :
6253 elif test $ac_prog = install &&
6254 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6255 # program-specific install script used by HP pwplus--don't use.
6256 :
6257 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006258 rm -rf conftest.one conftest.two conftest.dir
6259 echo one > conftest.one
6260 echo two > conftest.two
6261 mkdir conftest.dir
6262 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6263 test -s conftest.one && test -s conftest.two &&
6264 test -s conftest.dir/conftest.one &&
6265 test -s conftest.dir/conftest.two
6266 then
6267 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6268 break 3
6269 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270 fi
6271 fi
6272 done
6273 done
6274 ;;
6275esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006276
6277 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278IFS=$as_save_IFS
6279
Matthias Kloseb9621712010-04-24 17:59:49 +00006280rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281
6282fi
6283 if test "${ac_cv_path_install+set}" = set; then
6284 INSTALL=$ac_cv_path_install
6285 else
6286 # As a last resort, use the slow shell script. Don't cache a
6287 # value for INSTALL within a source directory, because that will
6288 # break other packages using the cache if that directory is
6289 # removed, or if the value is a relative name.
6290 INSTALL=$ac_install_sh
6291 fi
6292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6294$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295
6296# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6297# It thinks the first close brace ends the variable substitution.
6298test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6299
6300test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6301
6302test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6303
Matthias Klose93a0ef12012-03-15 18:08:34 +01006304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6305$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6306if test -z "$MKDIR_P"; then
6307 if ${ac_cv_path_mkdir+:} false; then :
6308 $as_echo_n "(cached) " >&6
6309else
6310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6311for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6312do
6313 IFS=$as_save_IFS
6314 test -z "$as_dir" && as_dir=.
6315 for ac_prog in mkdir gmkdir; do
6316 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006317 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006318 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6319 'mkdir (GNU coreutils) '* | \
6320 'mkdir (coreutils) '* | \
6321 'mkdir (fileutils) '4.1*)
6322 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6323 break 3;;
6324 esac
6325 done
6326 done
6327 done
6328IFS=$as_save_IFS
6329
6330fi
6331
6332 test -d ./--version && rmdir ./--version
6333 if test "${ac_cv_path_mkdir+set}" = set; then
6334 MKDIR_P="$ac_cv_path_mkdir -p"
6335 else
6336 # As a last resort, use the slow shell script. Don't cache a
6337 # value for MKDIR_P within a source directory, because that will
6338 # break other packages using the cache if that directory is
6339 # removed, or if the value is a relative name.
6340 MKDIR_P="$ac_install_sh -d"
6341 fi
6342fi
6343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6344$as_echo "$MKDIR_P" >&6; }
6345
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346
6347# Not every filesystem supports hard links
6348
6349if test -z "$LN" ; then
6350 case $ac_sys_system in
6351 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352 *) LN=ln;;
6353 esac
6354fi
6355
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006356# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006357
6358ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6362$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363
6364# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006365if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366 withval=$with_pydebug;
6367if test "$withval" != no
6368then
6369
Matthias Kloseb9621712010-04-24 17:59:49 +00006370$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6373$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006375 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006376else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378fi
6379else
Matthias Kloseb9621712010-04-24 17:59:49 +00006380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6381$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382fi
6383
6384
Victor Stinnerf4e47032019-04-25 00:56:28 +02006385# Check for --with-trace-refs
6386# --with-trace-refs
6387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6388$as_echo_n "checking for --with-trace-refs... " >&6; }
6389
6390# Check whether --with-trace-refs was given.
6391if test "${with_trace_refs+set}" = set; then :
6392 withval=$with_trace_refs;
6393else
6394 with_trace_refs=no
6395fi
6396
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6398$as_echo "$with_trace_refs" >&6; }
6399
6400if test "$with_trace_refs" = "yes"
6401then
6402
6403$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6404
6405fi
6406
6407# Check for --with-assertions.
6408# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006409assertions='false'
6410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6411$as_echo_n "checking for --with-assertions... " >&6; }
6412
6413# Check whether --with-assertions was given.
6414if test "${with_assertions+set}" = set; then :
6415 withval=$with_assertions;
6416if test "$withval" != no
6417then
6418 assertions='true'
6419fi
6420fi
6421
6422if test "$assertions" = 'true'; then
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6424$as_echo "yes" >&6; }
6425elif test "$Py_DEBUG" = 'true'; then
6426 assertions='true'
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6428$as_echo "implied by --with-pydebug" >&6; }
6429else
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6431$as_echo "no" >&6; }
6432fi
6433
Brett Cannon63d98bc2016-09-06 17:12:40 -07006434# Enable optimization flags
6435
6436
6437Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6439$as_echo_n "checking for --enable-optimizations... " >&6; }
6440# Check whether --enable-optimizations was given.
6441if test "${enable_optimizations+set}" = set; then :
6442 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006443if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006444then
6445 Py_OPT='true'
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6447$as_echo "yes" >&6; };
6448else
6449 Py_OPT='false'
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; };
6452fi
6453else
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6455$as_echo "no" >&6; }
6456fi
6457
6458if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006459 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6460 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006461 # 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 +00006462 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006463 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006464 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006465 DEF_MAKE_RULE="build_all"
6466else
6467 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006468 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006469 DEF_MAKE_RULE="all"
6470fi
6471
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006472
6473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6474$as_echo_n "checking PROFILE_TASK... " >&6; }
6475if test -z "$PROFILE_TASK"
6476then
6477 PROFILE_TASK='-m test --pgo'
6478fi
6479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6480$as_echo "$PROFILE_TASK" >&6; }
6481
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006482# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6483# normal names in the default $PATH (ie: Ubuntu). They exist under the
6484# non-suffixed name in their versioned llvm directory.
6485
6486llvm_bin_dir=''
6487llvm_path="${PATH}"
6488if test "${CC}" = "clang"
6489then
6490 clang_bin=`which clang`
6491 # Some systems install clang elsewhere as a symlink to the real path
6492 # which is where the related llvm tools are located.
6493 if test -L "${clang_bin}"
6494 then
6495 clang_dir=`dirname "${clang_bin}"`
6496 clang_bin=`readlink "${clang_bin}"`
6497 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6498 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6499 fi
6500fi
6501
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006502# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6504$as_echo_n "checking for --with-lto... " >&6; }
6505
6506# Check whether --with-lto was given.
6507if test "${with_lto+set}" = set; then :
6508 withval=$with_lto;
6509if test "$withval" != no
6510then
6511 Py_LTO='true'
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6513$as_echo "yes" >&6; };
6514else
6515 Py_LTO='false'
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517$as_echo "no" >&6; };
6518fi
6519else
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524if test "$Py_LTO" = 'true' ; then
6525 case $CC in
6526 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006527
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006528 if test -n "$ac_tool_prefix"; then
6529 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6530set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532$as_echo_n "checking for $ac_word... " >&6; }
6533if ${ac_cv_path_LLVM_AR+:} false; then :
6534 $as_echo_n "(cached) " >&6
6535else
6536 case $LLVM_AR in
6537 [\\/]* | ?:[\\/]*)
6538 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6539 ;;
6540 *)
6541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542for as_dir in ${llvm_path}
6543do
6544 IFS=$as_save_IFS
6545 test -z "$as_dir" && as_dir=.
6546 for ac_exec_ext in '' $ac_executable_extensions; do
6547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550 break 2
6551 fi
6552done
6553 done
6554IFS=$as_save_IFS
6555
6556 ;;
6557esac
6558fi
6559LLVM_AR=$ac_cv_path_LLVM_AR
6560if test -n "$LLVM_AR"; then
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6562$as_echo "$LLVM_AR" >&6; }
6563else
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565$as_echo "no" >&6; }
6566fi
6567
6568
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006569fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006570if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006571 ac_pt_LLVM_AR=$LLVM_AR
6572 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006573set dummy llvm-ar; ac_word=$2
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6575$as_echo_n "checking for $ac_word... " >&6; }
6576if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6577 $as_echo_n "(cached) " >&6
6578else
6579 case $ac_pt_LLVM_AR in
6580 [\\/]* | ?:[\\/]*)
6581 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6582 ;;
6583 *)
6584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6585for as_dir in ${llvm_path}
6586do
6587 IFS=$as_save_IFS
6588 test -z "$as_dir" && as_dir=.
6589 for ac_exec_ext in '' $ac_executable_extensions; do
6590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6591 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6593 break 2
6594 fi
6595done
6596 done
6597IFS=$as_save_IFS
6598
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006599 ;;
6600esac
6601fi
6602ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6603if test -n "$ac_pt_LLVM_AR"; then
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6605$as_echo "$ac_pt_LLVM_AR" >&6; }
6606else
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6608$as_echo "no" >&6; }
6609fi
6610
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006611 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006612 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006613 else
6614 case $cross_compiling:$ac_tool_warned in
6615yes:)
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6617$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6618ac_tool_warned=yes ;;
6619esac
6620 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006621 fi
6622else
6623 LLVM_AR="$ac_cv_path_LLVM_AR"
6624fi
6625
6626
6627 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6628 then
6629 LLVM_AR_FOUND="found"
6630 else
6631 LLVM_AR_FOUND="not-found"
6632 fi
6633 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6634 then
6635 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6636 if test -n "${found_llvm_ar}"
6637 then
6638 LLVM_AR='/usr/bin/xcrun llvm-ar'
6639 LLVM_AR_FOUND=found
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6641$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6642 fi
6643 fi
6644 if test $LLVM_AR_FOUND = not-found
6645 then
6646 LLVM_PROFR_ERR=yes
6647 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6648 else
6649 LLVM_AR_ERR=no
6650 fi
6651 AR="${LLVM_AR}"
6652 case $ac_sys_system in
6653 Darwin*)
6654 # Any changes made here should be reflected in the GCC+Darwin case below
6655 LTOFLAGS="-flto -Wl,-export_dynamic"
6656 ;;
6657 *)
6658 LTOFLAGS="-flto"
6659 ;;
6660 esac
6661 ;;
6662 *gcc*)
6663 case $ac_sys_system in
6664 Darwin*)
6665 LTOFLAGS="-flto -Wl,-export_dynamic"
6666 ;;
6667 *)
6668 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6669 ;;
6670 esac
6671 ;;
6672 esac
6673
6674 if test "$ac_cv_prog_cc_g" = "yes"
6675 then
6676 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6677 # to get debug symbols.
6678 LTOFLAGS="$LTOFLAGS -g"
6679 fi
6680
stratakisf92c7aa2018-12-04 15:54:01 +01006681 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006682 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006683fi
6684
6685# Enable PGO flags.
6686
6687
6688
6689
6690
6691
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006692if test -n "$ac_tool_prefix"; then
6693 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6694set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6696$as_echo_n "checking for $ac_word... " >&6; }
6697if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6698 $as_echo_n "(cached) " >&6
6699else
6700 case $LLVM_PROFDATA in
6701 [\\/]* | ?:[\\/]*)
6702 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6703 ;;
6704 *)
6705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6706for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006707do
6708 IFS=$as_save_IFS
6709 test -z "$as_dir" && as_dir=.
6710 for ac_exec_ext in '' $ac_executable_extensions; do
6711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6714 break 2
6715 fi
6716done
6717 done
6718IFS=$as_save_IFS
6719
Gregory P. Smith799520c2016-09-07 16:10:00 -07006720 ;;
6721esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006722fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006723LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6724if test -n "$LLVM_PROFDATA"; then
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6726$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006727else
6728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6729$as_echo "no" >&6; }
6730fi
6731
6732
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006733fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006734if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006735 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6736 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006737set dummy llvm-profdata; ac_word=$2
6738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6739$as_echo_n "checking for $ac_word... " >&6; }
6740if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6741 $as_echo_n "(cached) " >&6
6742else
6743 case $ac_pt_LLVM_PROFDATA in
6744 [\\/]* | ?:[\\/]*)
6745 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6746 ;;
6747 *)
6748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6749for as_dir in ${llvm_path}
6750do
6751 IFS=$as_save_IFS
6752 test -z "$as_dir" && as_dir=.
6753 for ac_exec_ext in '' $ac_executable_extensions; do
6754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6755 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6757 break 2
6758 fi
6759done
6760 done
6761IFS=$as_save_IFS
6762
Gregory P. Smith799520c2016-09-07 16:10:00 -07006763 ;;
6764esac
6765fi
6766ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6767if test -n "$ac_pt_LLVM_PROFDATA"; then
6768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6769$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6770else
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6772$as_echo "no" >&6; }
6773fi
6774
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006775 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006777 else
6778 case $cross_compiling:$ac_tool_warned in
6779yes:)
6780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6782ac_tool_warned=yes ;;
6783esac
6784 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006785 fi
6786else
6787 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6788fi
6789
6790
6791if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6792then
6793 LLVM_PROF_FOUND="found"
6794else
6795 LLVM_PROF_FOUND="not-found"
6796fi
6797if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6798then
6799 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6800 if test -n "${found_llvm_profdata}"
6801 then
6802 # llvm-profdata isn't directly in $PATH in some cases.
6803 # https://apple.stackexchange.com/questions/197053/
6804 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6805 LLVM_PROF_FOUND=found
6806 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6807$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6808 fi
6809fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006810LLVM_PROF_ERR=no
6811case $CC in
6812 *clang*)
6813 # Any changes made here should be reflected in the GCC+Darwin case below
6814 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6815 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006816 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006817 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6818 if test $LLVM_PROF_FOUND = not-found
6819 then
6820 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006821 if test "${REQUIRE_PGO}" = "yes"
6822 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006823 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 -07006824 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825 fi
6826 ;;
6827 *gcc*)
6828 case $ac_sys_system in
6829 Darwin*)
6830 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6831 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006832 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006833 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006834 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006835 then
6836 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006837 if test "${REQUIRE_PGO}" = "yes"
6838 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006839 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 -07006840 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006841 fi
6842 ;;
6843 *)
6844 PGO_PROF_GEN_FLAG="-fprofile-generate"
6845 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6846 LLVM_PROF_MERGER="true"
6847 LLVM_PROF_FILE=""
6848 ;;
6849 esac
6850 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006851 *icc*)
6852 PGO_PROF_GEN_FLAG="-prof-gen"
6853 PGO_PROF_USE_FLAG="-prof-use"
6854 LLVM_PROF_MERGER="true"
6855 LLVM_PROF_FILE=""
6856 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006857esac
6858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6860# merged with this chunk of code?
6861
6862# Optimizer/debugger flags
6863# ------------------------
6864# (The following bit of code is complicated enough - please keep things
6865# indented properly. Just pretend you're editing Python code. ;-)
6866
6867# There are two parallel sets of case statements below, one that checks to
6868# see if OPT was set and one that does BASECFLAGS setting based upon
6869# compiler and platform. BASECFLAGS tweaks need to be made even if the
6870# user set OPT.
6871
Victor Stinner23a683a2019-04-12 21:27:37 +02006872case $CC in
6873 *clang*)
6874 cc_is_clang=1
6875 ;;
6876 *)
6877 if $CC --version 2>&1 | grep -q clang
6878 then
6879 cc_is_clang=1
6880 else
6881 cc_is_clang=
6882 fi
6883esac
6884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885# tweak OPT based on compiler and platform, only if the user didn't set
6886# it on the command line
6887
Victor Stinner9ed34a82017-05-02 22:35:58 +02006888
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006889if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890then
6891 case $GCC in
6892 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6894 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6895 WRAP="-fwrapv"
6896 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006897
Victor Stinner35f3d242017-04-21 12:35:24 +02006898 if test -n "${cc_is_clang}"
6899 then
6900 # Clang also needs -fwrapv
6901 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006902 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6903 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006904 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006905 fi
6906
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907 case $ac_cv_prog_cc_g in
6908 yes)
6909 if test "$Py_DEBUG" = 'true' ; then
6910 # Optimization messes up debuggers, so turn it off for
6911 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006912 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006913 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006914 else
Victor Stinner28205b22017-04-21 11:24:34 +02006915 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006916 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917 else
Victor Stinner28205b22017-04-21 11:24:34 +02006918 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919 fi
6920 ;;
6921 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006922 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006923 ;;
6924 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926 case $ac_sys_system in
6927 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6928 ;;
6929 esac
6930 ;;
6931
6932 *)
6933 OPT="-O"
6934 ;;
6935 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936fi
6937
6938
6939
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006940
stratakiscf10a752018-12-19 18:19:01 +01006941
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942# The -arch flags for universal builds on OSX
6943UNIVERSAL_ARCH_FLAGS=
6944
6945
6946# tweak BASECFLAGS based on compiler and platform
6947case $GCC in
6948yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006949 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006950
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6952$as_echo_n "checking for -Wextra... " >&6; }
6953 ac_save_cc="$CC"
6954 CC="$CC -Wextra -Werror"
6955 if ${ac_cv_extra_warnings+:} false; then :
6956 $as_echo_n "(cached) " >&6
6957else
6958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6959/* end confdefs.h. */
6960
6961
6962int
6963main ()
6964{
6965
6966 ;
6967 return 0;
6968}
6969
6970_ACEOF
6971if ac_fn_c_try_compile "$LINENO"; then :
6972
6973 ac_cv_extra_warnings=yes
6974
6975else
6976
6977 ac_cv_extra_warnings=no
6978
6979fi
6980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6981fi
6982
6983 CC="$ac_save_cc"
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6985$as_echo "$ac_cv_extra_warnings" >&6; }
6986
6987 if test $ac_cv_extra_warnings = yes
6988 then
6989 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6990 fi
6991
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992 # Python doesn't violate C99 aliasing rules, but older versions of
6993 # GCC produce warnings for legal Python code. Enable
6994 # -fno-strict-aliasing on versions of GCC that support but produce
6995 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6997$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006998 ac_save_cc="$CC"
6999 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007000 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007001 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007003else
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007006
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007008int
7009main ()
7010{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007011
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007012 ;
7013 return 0;
7014}
Matthias Kloseb159a552010-04-25 21:00:44 +00007015
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007017if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007018
7019 CC="$ac_save_cc -fstrict-aliasing"
7020 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007022/* end confdefs.h. */
7023
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007024 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025int
7026main ()
7027{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007028double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029 ;
7030 return 0;
7031}
Matthias Kloseb159a552010-04-25 21:00:44 +00007032
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007034if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007035
7036 ac_cv_no_strict_aliasing=no
7037
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007038else
Matthias Kloseb159a552010-04-25 21:00:44 +00007039
7040 ac_cv_no_strict_aliasing=yes
7041
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007042fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007044
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007045else
Matthias Kloseb159a552010-04-25 21:00:44 +00007046
7047 ac_cv_no_strict_aliasing=no
7048
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007049fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007051fi
7052
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007053 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007054 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7056$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007057 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058 then
7059 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7060 fi
7061
Zachary Ware5af85642015-12-21 12:09:17 -06007062 # ICC doesn't recognize the option, but only emits a warning
7063 ## XXX does it emit an unused result warning and can it be disabled?
7064 case "$CC" in
7065 *icc*)
7066 ac_cv_disable_unused_result_warning=no
7067 ;;
7068 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7070$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7071 ac_save_cc="$CC"
7072 CC="$CC -Wunused-result -Werror"
7073 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007074 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007075 $as_echo_n "(cached) " >&6
7076else
7077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078/* end confdefs.h. */
7079
7080
7081int
7082main ()
7083{
7084
7085 ;
7086 return 0;
7087}
7088
7089_ACEOF
7090if ac_fn_c_try_compile "$LINENO"; then :
7091
7092 ac_cv_disable_unused_result_warning=yes
7093
7094else
7095
7096 ac_cv_disable_unused_result_warning=no
7097
7098fi
7099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7100fi
7101
7102 CFLAGS="$save_CFLAGS"
7103 CC="$ac_save_cc"
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7105$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007106 ;;
7107 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007108
7109 if test $ac_cv_disable_unused_result_warning = yes
7110 then
7111 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007112 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7113 fi
7114
7115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7116$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7117 ac_save_cc="$CC"
7118 CC="$CC -Wunused-parameter -Werror"
7119 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7120 $as_echo_n "(cached) " >&6
7121else
7122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7123/* end confdefs.h. */
7124
7125
7126int
7127main ()
7128{
7129
7130 ;
7131 return 0;
7132}
7133
7134_ACEOF
7135if ac_fn_c_try_compile "$LINENO"; then :
7136
7137 ac_cv_disable_unused_parameter_warning=yes
7138
7139else
7140
7141 ac_cv_disable_unused_parameter_warning=no
7142
7143fi
7144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7145fi
7146
7147 CC="$ac_save_cc"
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7149$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7150
7151 if test $ac_cv_disable_unused_parameter_warning = yes
7152 then
7153 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7154 fi
7155
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7157$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7158 ac_save_cc="$CC"
7159 CC="$CC -Wmissing-field-initializers -Werror"
7160 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7161 $as_echo_n "(cached) " >&6
7162else
7163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7164/* end confdefs.h. */
7165
7166
7167int
7168main ()
7169{
7170
7171 ;
7172 return 0;
7173}
7174
7175_ACEOF
7176if ac_fn_c_try_compile "$LINENO"; then :
7177
7178 ac_cv_disable_missing_field_initializers=yes
7179
7180else
7181
7182 ac_cv_disable_missing_field_initializers=no
7183
7184fi
7185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7186fi
7187
7188 CC="$ac_save_cc"
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7190$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7191
7192 if test $ac_cv_disable_missing_field_initializers = yes
7193 then
7194 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007195 fi
7196
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7198$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7199 ac_save_cc="$CC"
7200 CC="$CC -Wsign-compare"
7201 save_CFLAGS="$CFLAGS"
7202 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7203 $as_echo_n "(cached) " >&6
7204else
7205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7206/* end confdefs.h. */
7207
7208
7209int
7210main ()
7211{
7212
7213 ;
7214 return 0;
7215}
7216
7217_ACEOF
7218if ac_fn_c_try_compile "$LINENO"; then :
7219
7220 ac_cv_enable_sign_compare_warning=yes
7221
7222else
7223
7224 ac_cv_enable_sign_compare_warning=no
7225
7226fi
7227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7228fi
7229
7230 CFLAGS="$save_CFLAGS"
7231 CC="$ac_save_cc"
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7233$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7234
7235 if test $ac_cv_enable_sign_compare_warning = yes
7236 then
7237 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7238 fi
7239
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7241$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7242 ac_save_cc="$CC"
7243 CC="$CC -Wunreachable-code"
7244 save_CFLAGS="$CFLAGS"
7245 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7246 $as_echo_n "(cached) " >&6
7247else
7248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7249/* end confdefs.h. */
7250
7251
7252int
7253main ()
7254{
7255
7256 ;
7257 return 0;
7258}
7259
7260_ACEOF
7261if ac_fn_c_try_compile "$LINENO"; then :
7262
7263 ac_cv_enable_unreachable_code_warning=yes
7264
7265else
7266
7267 ac_cv_enable_unreachable_code_warning=no
7268
7269fi
7270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7271fi
7272
7273 CFLAGS="$save_CFLAGS"
7274 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007275
7276 # Don't enable unreachable code warning in debug mode, since it usually
7277 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007278 # Issue #24324: Unfortunately, the unreachable code warning does not work
7279 # correctly on gcc and has been silently removed from the compiler.
7280 # It is supported on clang but on OS X systems gcc may be an alias
7281 # for clang. Try to determine if the compiler is not really gcc and,
7282 # if so, only then enable the warning.
7283 if test $ac_cv_enable_unreachable_code_warning = yes && \
7284 test "$Py_DEBUG" != "true" && \
7285 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007286 then
7287 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007288 else
7289 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007290 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7292$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007293
INADA Naokie3364842018-06-05 20:40:53 +09007294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7295$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7296 ac_save_cc="$CC"
7297 CC="$CC -Werror -Wstrict-prototypes"
7298 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7299 $as_echo_n "(cached) " >&6
7300else
7301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7302/* end confdefs.h. */
7303
7304
7305int
7306main ()
7307{
7308
7309 ;
7310 return 0;
7311}
7312
7313_ACEOF
7314if ac_fn_c_try_compile "$LINENO"; then :
7315
7316 ac_cv_enable_strict_prototypes_warning=yes
7317
7318else
7319
7320 ac_cv_enable_strict_prototypes_warning=no
7321
7322fi
7323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7324fi
7325
7326 CC="$ac_save_cc"
7327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7328$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7329
7330 if test $ac_cv_enable_strict_prototypes_warning = yes
7331 then
7332 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7333 fi
7334
Victor Stinner193ee0a2017-02-06 14:24:00 +01007335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7336$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7337 ac_save_cc="$CC"
7338 CC="$CC -Werror=implicit-function-declaration"
7339 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7340 $as_echo_n "(cached) " >&6
7341else
7342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343/* end confdefs.h. */
7344
7345
7346int
7347main ()
7348{
7349
7350 ;
7351 return 0;
7352}
7353
7354_ACEOF
7355if ac_fn_c_try_compile "$LINENO"; then :
7356
7357 ac_cv_enable_implicit_function_declaration_error=yes
7358
7359else
7360
7361 ac_cv_enable_implicit_function_declaration_error=no
7362
7363fi
7364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7365fi
7366
7367 CC="$ac_save_cc"
7368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7369$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7370
7371 if test $ac_cv_enable_implicit_function_declaration_error = yes
7372 then
7373 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7374 fi
7375
Vinay Sajip0b60f642019-10-15 08:26:12 +01007376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7377$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7378 ac_save_cc="$CC"
7379 CC="$CC -fvisibility=hidden"
7380 if ${ac_cv_enable_visibility+:} false; then :
7381 $as_echo_n "(cached) " >&6
7382else
7383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7384/* end confdefs.h. */
7385
7386
7387int
7388main ()
7389{
7390
7391 ;
7392 return 0;
7393}
7394
7395_ACEOF
7396if ac_fn_c_try_compile "$LINENO"; then :
7397
7398 ac_cv_enable_visibility=yes
7399
7400else
7401
7402 ac_cv_enable_visibility=no
7403
7404fi
7405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7406fi
7407
7408 CC="$ac_save_cc"
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7410$as_echo "$ac_cv_enable_visibility" >&6; }
7411
7412 if test $ac_cv_enable_visibility = yes
7413 then
7414 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7415 fi
7416
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7418 # support. Without this, treatment of subnormals doesn't follow
7419 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007420 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007421 alpha*)
7422 BASECFLAGS="$BASECFLAGS -mieee"
7423 ;;
7424 esac
7425
7426 case $ac_sys_system in
7427 SCO_SV*)
7428 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7429 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007430
Ned Deily87adb6e2013-10-18 21:09:56 -07007431 Darwin*)
7432 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7433 # used to be here, but non-Apple gcc doesn't accept them.
7434 if test "${CC}" = gcc
7435 then
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007437$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007438 case "${UNIVERSALSDK}" in
7439 */MacOSX10.4u.sdk)
7440 # Build using 10.4 SDK, force usage of gcc when the
7441 # compiler is gcc, otherwise the user will get very
7442 # confusing error messages when building on OSX 10.6
7443 CC=gcc-4.0
7444 CPP=cpp-4.0
7445 ;;
7446 esac
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007448$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007449 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450
Ned Deily87adb6e2013-10-18 21:09:56 -07007451 if test "${enable_universalsdk}"
7452 then
7453 case "$UNIVERSAL_ARCHS" in
7454 32-bit)
7455 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7456 LIPO_32BIT_FLAGS=""
7457 ARCH_RUN_32BIT=""
7458 ;;
7459 64-bit)
7460 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7461 LIPO_32BIT_FLAGS=""
7462 ARCH_RUN_32BIT="true"
7463 ;;
7464 all)
7465 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7466 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7467 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7468 ;;
7469 intel)
7470 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7471 LIPO_32BIT_FLAGS="-extract i386"
7472 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7473 ;;
7474 intel-32)
7475 UNIVERSAL_ARCH_FLAGS="-arch i386"
7476 LIPO_32BIT_FLAGS=""
7477 ARCH_RUN_32BIT=""
7478 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007479 intel-64)
7480 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7481 LIPO_32BIT_FLAGS=""
7482 ARCH_RUN_32BIT="true"
7483 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007484 3-way)
7485 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7486 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7487 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7488 ;;
7489 *)
7490 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7491 ;;
7492 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493
Ned Deily87adb6e2013-10-18 21:09:56 -07007494 if test "${UNIVERSALSDK}" != "/"
7495 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007496 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7497 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007499 else
7500 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7501 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007502 fi
7503 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504
Ned Deily87adb6e2013-10-18 21:09:56 -07007505 # Calculate an appropriate deployment target for this build:
7506 # The deployment target value is used explicitly to enable certain
7507 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007508 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007509 # component of the string returned by distutils.get_platform().
7510 #
7511 # Use the value from:
7512 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7513 # 2. the operating system version of the build machine if >= 10.6
7514 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7515 # below to pick either 10.3, 10.4, or 10.5 as the target.
7516 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517
Ned Deily87adb6e2013-10-18 21:09:56 -07007518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7519$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007520 cur_target_major=`sw_vers -productVersion | \
7521 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7522 cur_target_minor=`sw_vers -productVersion | \
7523 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7524 cur_target="${cur_target_major}.${cur_target_minor}"
7525 if test ${cur_target_major} -eq 10 && \
7526 test ${cur_target_minor} -ge 3 && \
7527 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007528 then
Ned Deily36820b62014-06-25 13:44:22 -07007529 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007530 cur_target=10.3
7531 if test ${enable_universalsdk}
7532 then
7533 case "$UNIVERSAL_ARCHS" in
7534 all|3-way|intel|64-bit)
7535 # These configurations were first supported in 10.5
7536 cur_target='10.5'
7537 ;;
7538 esac
7539 else
7540 if test `/usr/bin/arch` = "i386"
7541 then
7542 # 10.4 was the first release to support Intel archs
7543 cur_target="10.4"
7544 fi
7545 fi
7546 fi
7547 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007548
Ned Deily87adb6e2013-10-18 21:09:56 -07007549 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7550 # environment with a value that is the same as what we'll use
7551 # in the Makefile to ensure that we'll get the same compiler
7552 # environment during configure and build time.
7553 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7554 export MACOSX_DEPLOYMENT_TARGET
7555 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7557$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007558
Ned Deily87adb6e2013-10-18 21:09:56 -07007559 # end of Darwin* tests
7560 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561 esac
7562 ;;
7563
7564*)
7565 case $ac_sys_system in
7566 OpenUNIX*|UnixWare*)
7567 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7568 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569 SCO_SV*)
7570 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7571 ;;
7572 esac
7573 ;;
7574esac
7575
Zachary Ware5af85642015-12-21 12:09:17 -06007576# ICC needs -fp-model strict or floats behave badly
7577case "$CC" in
7578*icc*)
7579 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7580 ;;
7581esac
7582
T. Woutersddbfa2c2017-05-23 01:30:49 +02007583if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584 :
7585else
7586 OPT="-DNDEBUG $OPT"
7587fi
7588
7589if test "$ac_arch_flags"
7590then
7591 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7592fi
7593
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594# On some compilers, pthreads are available without further options
7595# (e.g. MacOS X). On some of these systems, the compiler will not
7596# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7597# So we have to see first whether pthreads are available without
7598# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7600$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007601if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603else
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605 ac_cv_pthread_is_default=no
7606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608/* end confdefs.h. */
7609
Stefan Krah7dba5942012-11-22 22:49:11 +01007610#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611#include <pthread.h>
7612
7613void* routine(void* p){return NULL;}
7614
7615int main(){
7616 pthread_t p;
7617 if(pthread_create(&p,NULL,routine,NULL)!=0)
7618 return 1;
7619 (void)pthread_detach(p);
7620 return 0;
7621}
7622
7623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007624if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625
7626 ac_cv_pthread_is_default=yes
7627 ac_cv_kthread=no
7628 ac_cv_pthread=no
7629
7630else
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635fi
7636
7637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638fi
7639
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7641$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642
7643
7644if test $ac_cv_pthread_is_default = yes
7645then
7646 ac_cv_kpthread=no
7647else
7648# -Kpthread, if available, provides the right #defines
7649# and linker options to make pthread_create available
7650# Some compilers won't report that they do not support -Kpthread,
7651# so we need to run a program to see whether it really made the
7652# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7654$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007655if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657else
7658 ac_save_cc="$CC"
7659CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007660if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661 ac_cv_kpthread=no
7662else
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664/* end confdefs.h. */
7665
Stefan Krah7dba5942012-11-22 22:49:11 +01007666#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667#include <pthread.h>
7668
7669void* routine(void* p){return NULL;}
7670
7671int main(){
7672 pthread_t p;
7673 if(pthread_create(&p,NULL,routine,NULL)!=0)
7674 return 1;
7675 (void)pthread_detach(p);
7676 return 0;
7677}
7678
7679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007680if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681 ac_cv_kpthread=yes
7682else
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7686 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687fi
7688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689CC="$ac_save_cc"
7690fi
7691
Matthias Kloseb9621712010-04-24 17:59:49 +00007692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7693$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694fi
7695
7696if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7697then
7698# -Kthread, if available, provides the right #defines
7699# and linker options to make pthread_create available
7700# Some compilers won't report that they do not support -Kthread,
7701# so we need to run a program to see whether it really made the
7702# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7704$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007705if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707else
7708 ac_save_cc="$CC"
7709CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007710if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711 ac_cv_kthread=no
7712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714/* end confdefs.h. */
7715
Stefan Krah7dba5942012-11-22 22:49:11 +01007716#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717#include <pthread.h>
7718
7719void* routine(void* p){return NULL;}
7720
7721int main(){
7722 pthread_t p;
7723 if(pthread_create(&p,NULL,routine,NULL)!=0)
7724 return 1;
7725 (void)pthread_detach(p);
7726 return 0;
7727}
7728
7729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007730if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731 ac_cv_kthread=yes
7732else
Matthias Kloseb9621712010-04-24 17:59:49 +00007733 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737fi
7738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739CC="$ac_save_cc"
7740fi
7741
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7743$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744fi
7745
7746if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7747then
7748# -pthread, if available, provides the right #defines
7749# and linker options to make pthread_create available
7750# Some compilers won't report that they do not support -pthread,
7751# so we need to run a program to see whether it really made the
7752# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7754$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007755if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757else
7758 ac_save_cc="$CC"
7759CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761 ac_cv_pthread=no
7762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764/* end confdefs.h. */
7765
Stefan Krah7dba5942012-11-22 22:49:11 +01007766#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767#include <pthread.h>
7768
7769void* routine(void* p){return NULL;}
7770
7771int main(){
7772 pthread_t p;
7773 if(pthread_create(&p,NULL,routine,NULL)!=0)
7774 return 1;
7775 (void)pthread_detach(p);
7776 return 0;
7777}
7778
7779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007780if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781 ac_cv_pthread=yes
7782else
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787fi
7788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789CC="$ac_save_cc"
7790fi
7791
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7793$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794fi
7795
7796# If we have set a CC compiler flag for thread support then
7797# check if it works for CXX, too.
7798ac_cv_cxx_thread=no
7799if test ! -z "$CXX"
7800then
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7802$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803ac_save_cxx="$CXX"
7804
7805if test "$ac_cv_kpthread" = "yes"
7806then
7807 CXX="$CXX -Kpthread"
7808 ac_cv_cxx_thread=yes
7809elif test "$ac_cv_kthread" = "yes"
7810then
7811 CXX="$CXX -Kthread"
7812 ac_cv_cxx_thread=yes
7813elif test "$ac_cv_pthread" = "yes"
7814then
7815 CXX="$CXX -pthread"
7816 ac_cv_cxx_thread=yes
7817fi
7818
7819if test $ac_cv_cxx_thread = yes
7820then
7821 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7822 $CXX -c conftest.$ac_ext 2>&5
7823 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7824 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7825 then
7826 ac_cv_cxx_thread=yes
7827 else
7828 ac_cv_cxx_thread=no
7829 fi
7830 rm -fr conftest*
7831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7833$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007834fi
7835CXX="$ac_save_cxx"
7836
7837
7838# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7840$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007841if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007843else
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007845/* end confdefs.h. */
7846#include <stdlib.h>
7847#include <stdarg.h>
7848#include <string.h>
7849#include <float.h>
7850
7851int
7852main ()
7853{
7854
7855 ;
7856 return 0;
7857}
7858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007859if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007860 ac_cv_header_stdc=yes
7861else
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7865
7866if test $ac_cv_header_stdc = yes; then
7867 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007869/* end confdefs.h. */
7870#include <string.h>
7871
7872_ACEOF
7873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 $EGREP "memchr" >/dev/null 2>&1; then :
7875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007876else
7877 ac_cv_header_stdc=no
7878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007879rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007880
7881fi
7882
7883if test $ac_cv_header_stdc = yes; then
7884 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007886/* end confdefs.h. */
7887#include <stdlib.h>
7888
7889_ACEOF
7890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 $EGREP "free" >/dev/null 2>&1; then :
7892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893else
7894 ac_cv_header_stdc=no
7895fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007896rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007897
7898fi
7899
7900if test $ac_cv_header_stdc = yes; then
7901 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007902 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007903 :
7904else
Matthias Kloseb9621712010-04-24 17:59:49 +00007905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007906/* end confdefs.h. */
7907#include <ctype.h>
7908#include <stdlib.h>
7909#if ((' ' & 0x0FF) == 0x020)
7910# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7911# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7912#else
7913# define ISLOWER(c) \
7914 (('a' <= (c) && (c) <= 'i') \
7915 || ('j' <= (c) && (c) <= 'r') \
7916 || ('s' <= (c) && (c) <= 'z'))
7917# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7918#endif
7919
7920#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7921int
7922main ()
7923{
7924 int i;
7925 for (i = 0; i < 256; i++)
7926 if (XOR (islower (i), ISLOWER (i))
7927 || toupper (i) != TOUPPER (i))
7928 return 2;
7929 return 0;
7930}
7931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007932if ac_fn_c_try_run "$LINENO"; then :
7933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007939fi
7940
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007941fi
7942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7944$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007945if test $ac_cv_header_stdc = yes; then
7946
Matthias Kloseb9621712010-04-24 17:59:49 +00007947$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007948
7949fi
7950
stratakise768c862018-01-23 16:11:24 +01007951for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007952fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007953ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007954sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007955utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007956poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007957sys/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 +01007958sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007959sys/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 +01007960sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007961sys/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 -07007962libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007963linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007964sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007965do :
7966 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7967ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007968if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007970#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007971_ACEOF
7972
7973fi
7974
Guido van Rossum627b2d71993-12-24 10:39:16 +00007975done
7976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007977ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007978for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7981$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007982if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007984else
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007986/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007987#include <sys/types.h>
7988#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
Martin v. Löwis11437992002-04-12 09:54:03 +00007990int
7991main ()
7992{
7993if ((DIR *) 0)
7994return 0;
7995 ;
7996 return 0;
7997}
7998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007999if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008001else
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006eval ac_res=\$$as_ac_Header
8007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8008$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008009if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008010 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008011#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008012_ACEOF
8013
8014ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008015fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008017done
8018# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8019if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8021$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008022if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008024else
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029/* Override any GCC internal prototype to avoid an error.
8030 Use char because int might match the return type of a GCC
8031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032#ifdef __cplusplus
8033extern "C"
8034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008035char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008036int
8037main ()
8038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 ;
8041 return 0;
8042}
8043_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044for ac_lib in '' dir; do
8045 if test -z "$ac_lib"; then
8046 ac_res="none required"
8047 else
8048 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008049 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054rm -f core conftest.err conftest.$ac_objext \
8055 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008056 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059done
Victor Stinnere0be4232011-10-25 13:06:09 +02008060if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062else
8063 ac_cv_search_opendir=no
8064fi
8065rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008066LIBS=$ac_func_search_save_LIBS
8067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8069$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008071if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Michael W. Hudson54241132001-12-07 15:38:26 +00008076else
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8078$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008079if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008080 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008081else
8082 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008086/* Override any GCC internal prototype to avoid an error.
8087 Use char because int might match the return type of a GCC
8088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008089#ifdef __cplusplus
8090extern "C"
8091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008092char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008093int
8094main ()
8095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ;
8098 return 0;
8099}
8100_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101for ac_lib in '' x; do
8102 if test -z "$ac_lib"; then
8103 ac_res="none required"
8104 else
8105 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008106 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008108 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008111rm -f core conftest.err conftest.$ac_objext \
8112 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008113 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116done
Victor Stinnere0be4232011-10-25 13:06:09 +02008117if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119else
8120 ac_cv_search_opendir=no
8121fi
8122rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008123LIBS=$ac_func_search_save_LIBS
8124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8126$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008127ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008128if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008130
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008131fi
8132
8133fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8136$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008137if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008138 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008139else
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008141/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008142#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008143int
8144main ()
8145{
8146return makedev(0, 0);
8147 ;
8148 return 0;
8149}
8150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008152 ac_cv_header_sys_types_h_makedev=yes
8153else
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008156rm -f core conftest.err conftest.$ac_objext \
8157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008158
8159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8161$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008162
8163if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008164ac_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 +02008165if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008168
8169fi
8170
8171
8172
8173 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008174 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 +02008175if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008176
Matthias Kloseb9621712010-04-24 17:59:49 +00008177$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008178
8179fi
8180
8181
8182 fi
8183fi
8184
Michael W. Hudson54241132001-12-07 15:38:26 +00008185
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008186# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8187# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8188SAVE_CFLAGS=$CFLAGS
8189CFLAGS="-std=c99 $CFLAGS"
8190for ac_header in bluetooth/bluetooth.h
8191do :
8192 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8193if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8194 cat >>confdefs.h <<_ACEOF
8195#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8196_ACEOF
8197
8198fi
8199
8200done
8201
8202CFLAGS=$SAVE_CFLAGS
8203
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008204# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8205for ac_header in net/if.h
8206do :
8207 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8208#ifdef STDC_HEADERS
8209# include <stdlib.h>
8210# include <stddef.h>
8211#else
8212# ifdef HAVE_STDLIB_H
8213# include <stdlib.h>
8214# endif
8215#endif
8216#ifdef HAVE_SYS_SOCKET_H
8217# include <sys/socket.h>
8218#endif
8219
8220"
Victor Stinnere0be4232011-10-25 13:06:09 +02008221if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008222 cat >>confdefs.h <<_ACEOF
8223#define HAVE_NET_IF_H 1
8224_ACEOF
8225
8226fi
8227
8228done
8229
8230
Martin v. Löwis11017b12006-01-14 18:12:57 +00008231# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008232for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008233do :
8234 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 +00008235#ifdef HAVE_ASM_TYPES_H
8236#include <asm/types.h>
8237#endif
8238#ifdef HAVE_SYS_SOCKET_H
8239#include <sys/socket.h>
8240#endif
8241
Matthias Kloseb9621712010-04-24 17:59:49 +00008242"
Victor Stinnere0be4232011-10-25 13:06:09 +02008243if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008244 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008245#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008246_ACEOF
8247
8248fi
8249
8250done
8251
8252
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008253# On Linux, qrtr.h requires asm/types.h
8254for ac_header in linux/qrtr.h
8255do :
8256 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8257#ifdef HAVE_ASM_TYPES_H
8258#include <asm/types.h>
8259#endif
8260#ifdef HAVE_SYS_SOCKET_H
8261#include <sys/socket.h>
8262#endif
8263
8264"
8265if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8266 cat >>confdefs.h <<_ACEOF
8267#define HAVE_LINUX_QRTR_H 1
8268_ACEOF
8269
8270fi
8271
8272done
8273
8274
caaveryeffc12f2017-09-06 18:18:10 -04008275for ac_header in linux/vm_sockets.h
8276do :
8277 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8278#ifdef HAVE_SYS_SOCKET_H
8279#include <sys/socket.h>
8280#endif
8281
8282"
8283if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8284 cat >>confdefs.h <<_ACEOF
8285#define HAVE_LINUX_VM_SOCKETS_H 1
8286_ACEOF
8287
8288fi
8289
8290done
8291
8292
Charles-François Natali47413c12011-10-06 19:47:44 +02008293# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008294for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008295do :
8296 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8297ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8298#ifdef HAVE_SYS_SOCKET_H
8299#include <sys/socket.h>
8300#endif
8301
8302"
8303if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8304 cat >>confdefs.h <<_ACEOF
8305#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8306_ACEOF
8307
8308fi
8309
8310done
8311
8312
Guido van Rossum627b2d71993-12-24 10:39:16 +00008313# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008314was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8316$as_echo_n "checking for clock_t in time.h... " >&6; }
8317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008318/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008319#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008320
8321_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008324 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008325else
Martin v. Löwis11437992002-04-12 09:54:03 +00008326
8327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008329
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008330
Guido van Rossum627b2d71993-12-24 10:39:16 +00008331fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008332rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008333
Matthias Kloseb9621712010-04-24 17:59:49 +00008334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8335$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8338$as_echo_n "checking for makedev... " >&6; }
8339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008340/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008341
Jesus Cea740f53a2010-04-28 11:35:30 +00008342#if defined(MAJOR_IN_MKDEV)
8343#include <sys/mkdev.h>
8344#elif defined(MAJOR_IN_SYSMACROS)
8345#include <sys/sysmacros.h>
8346#else
8347#include <sys/types.h>
8348#endif
8349
Neal Norwitz11690112002-07-30 01:08:28 +00008350int
8351main ()
8352{
Jesus Cea740f53a2010-04-28 11:35:30 +00008353
8354 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008355 ;
8356 return 0;
8357}
Matthias Kloseb159a552010-04-25 21:00:44 +00008358
Neal Norwitz11690112002-07-30 01:08:28 +00008359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008360if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008361 ac_cv_has_makedev=yes
8362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008365rm -f core conftest.err conftest.$ac_objext \
8366 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8368$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008369if test "$ac_cv_has_makedev" = "yes"; then
8370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008372
8373fi
8374
Christian Heimes985ecdc2013-11-20 11:46:18 +01008375# byte swapping
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8377$as_echo_n "checking for le64toh... " >&6; }
8378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8379/* end confdefs.h. */
8380
8381#ifdef HAVE_ENDIAN_H
8382#include <endian.h>
8383#elif defined(HAVE_SYS_ENDIAN_H)
8384#include <sys/endian.h>
8385#endif
8386
8387int
8388main ()
8389{
8390
8391 le64toh(1)
8392 ;
8393 return 0;
8394}
8395
8396_ACEOF
8397if ac_fn_c_try_link "$LINENO"; then :
8398 ac_cv_has_le64toh=yes
8399else
8400 ac_cv_has_le64toh=no
8401fi
8402rm -f core conftest.err conftest.$ac_objext \
8403 conftest$ac_exeext conftest.$ac_ext
8404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8405$as_echo "$ac_cv_has_le64toh" >&6; }
8406if test "$ac_cv_has_le64toh" = "yes"; then
8407
8408$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8409
8410fi
8411
Martin v. Löwis399a6892002-10-04 10:22:02 +00008412use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008413# Don't use largefile support for GNU/Hurd
8414case $ac_sys_system in GNU*)
8415 use_lfs=no
8416esac
8417
Martin v. Löwis399a6892002-10-04 10:22:02 +00008418if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008419# Two defines needed to enable largefile support on various platforms
8420# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008421case $ac_sys_system/$ac_sys_release in
8422AIX*)
8423
8424$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8425
8426 ;;
8427esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
8431
Matthias Kloseb9621712010-04-24 17:59:49 +00008432$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008433
Martin v. Löwis399a6892002-10-04 10:22:02 +00008434fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008435
Guido van Rossum84e7b241996-08-19 21:59:00 +00008436# Add some code to confdefs.h so that the test for off_t works on SCO
8437cat >> confdefs.h <<\EOF
8438#if defined(SCO_DS)
8439#undef _OFF_T
8440#endif
8441EOF
8442
Guido van Rossumef2255b2000-03-10 22:30:29 +00008443# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008444ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008445if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008447else
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
8449cat >>confdefs.h <<_ACEOF
8450#define mode_t int
8451_ACEOF
8452
8453fi
8454
Matthias Kloseb9621712010-04-24 17:59:49 +00008455ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008456if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008457
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008458else
Martin v. Löwis11437992002-04-12 09:54:03 +00008459
8460cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008462_ACEOF
8463
8464fi
8465
Matthias Kloseb9621712010-04-24 17:59:49 +00008466ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008467if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008469else
Martin v. Löwis11437992002-04-12 09:54:03 +00008470
8471cat >>confdefs.h <<_ACEOF
8472#define pid_t int
8473_ACEOF
8474
8475fi
8476
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008479#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008480_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008481
Matthias Kloseb9621712010-04-24 17:59:49 +00008482ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008483if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008484
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008485else
Martin v. Löwis11437992002-04-12 09:54:03 +00008486
8487cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008489_ACEOF
8490
8491fi
8492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8494$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008495if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008499/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008500#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008501
8502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008505 ac_cv_type_uid_t=yes
8506else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507 ac_cv_type_uid_t=no
8508fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008509rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008510
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8513$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008514if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008515
Matthias Kloseb9621712010-04-24 17:59:49 +00008516$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008517
8518
Matthias Kloseb9621712010-04-24 17:59:49 +00008519$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008520
8521fi
8522
Mark Dickinson983bc162012-12-02 12:11:38 +00008523
Matthias Kloseb9621712010-04-24 17:59:49 +00008524ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008525if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526
Matthias Kloseb9621712010-04-24 17:59:49 +00008527$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008528
8529fi
8530
Stefan Krah1919b7e2012-03-21 18:25:23 +01008531ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8532if test "x$ac_cv_type___uint128_t" = xyes; then :
8533
8534$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8535
8536fi
8537
Jack Jansendd19cf82001-12-06 22:36:17 +00008538
Michael W. Hudson54241132001-12-07 15:38:26 +00008539# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008540# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541# The cast to long int works around a bug in the HP C Compiler
8542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8544# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8546$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008547if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008549else
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 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 +00008551
Martin v. Löwis11437992002-04-12 09:54:03 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 if test "$ac_cv_type_int" = yes; then
8554 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8555$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008556as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008557See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 else
8559 ac_cv_sizeof_int=0
8560 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8565$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566
8567
8568
Martin v. Löwis11437992002-04-12 09:54:03 +00008569cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008570#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008571_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008572
8573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574# The cast to long int works around a bug in the HP C Compiler
8575# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8576# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8577# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8579$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008580if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008582else
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 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 +00008584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 if test "$ac_cv_type_long" = yes; then
8587 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008589as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008590See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591 else
8592 ac_cv_sizeof_long=0
8593 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8598$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599
8600
8601
Martin v. Löwis11437992002-04-12 09:54:03 +00008602cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008603#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008604_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008605
8606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607# The cast to long int works around a bug in the HP C Compiler
8608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8610# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8612$as_echo_n "checking size of long long... " >&6; }
8613if ${ac_cv_sizeof_long_long+:} false; then :
8614 $as_echo_n "(cached) " >&6
8615else
8616 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8617
8618else
8619 if test "$ac_cv_type_long_long" = yes; then
8620 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8622as_fn_error 77 "cannot compute sizeof (long long)
8623See \`config.log' for more details" "$LINENO" 5; }
8624 else
8625 ac_cv_sizeof_long_long=0
8626 fi
8627fi
8628
8629fi
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8631$as_echo "$ac_cv_sizeof_long_long" >&6; }
8632
8633
8634
8635cat >>confdefs.h <<_ACEOF
8636#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8637_ACEOF
8638
8639
8640# The cast to long int works around a bug in the HP C Compiler
8641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8643# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8645$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008646if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008648else
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 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 +00008650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 if test "$ac_cv_type_void_p" = yes; then
8653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008655as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008656See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657 else
8658 ac_cv_sizeof_void_p=0
8659 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8664$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665
8666
8667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008669#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008670_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008671
8672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008673# The cast to long int works around a bug in the HP C Compiler
8674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8676# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8678$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008679if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 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 +00008683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 if test "$ac_cv_type_short" = yes; then
8686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008688as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008689See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690 else
8691 ac_cv_sizeof_short=0
8692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8697$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698
8699
8700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008702#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008703_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008704
8705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706# The cast to long int works around a bug in the HP C Compiler
8707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8709# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8711$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008712if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008714else
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 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 +00008716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$ac_cv_type_float" = yes; then
8719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008722See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723 else
8724 ac_cv_sizeof_float=0
8725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8730$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731
8732
8733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008735#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008736_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008737
8738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008739# The cast to long int works around a bug in the HP C Compiler
8740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8742# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8744$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008745if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 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 +00008749
Martin v. Löwis11437992002-04-12 09:54:03 +00008750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 if test "$ac_cv_type_double" = yes; then
8752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008754as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008755See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756 else
8757 ac_cv_sizeof_double=0
8758 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760
Martin v. Löwis11437992002-04-12 09:54:03 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8763$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764
8765
8766
Martin v. Löwis11437992002-04-12 09:54:03 +00008767cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008768#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008769_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008770
8771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008772# The cast to long int works around a bug in the HP C Compiler
8773# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8774# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8775# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8777$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008778if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 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 +00008782
Martin v. Löwis11437992002-04-12 09:54:03 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 if test "$ac_cv_type_fpos_t" = yes; then
8785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008787as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008788See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789 else
8790 ac_cv_sizeof_fpos_t=0
8791 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8796$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008797
8798
8799
Martin v. Löwis11437992002-04-12 09:54:03 +00008800cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008801#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008802_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008803
Michael W. Hudson54241132001-12-07 15:38:26 +00008804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008805# The cast to long int works around a bug in the HP C Compiler
8806# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8807# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8808# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8810$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008811if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 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 +00008815
Martin v. Löwis18e16552006-02-15 17:27:45 +00008816else
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 if test "$ac_cv_type_size_t" = yes; then
8818 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008820as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008821See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822 else
8823 ac_cv_sizeof_size_t=0
8824 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826
Martin v. Löwis18e16552006-02-15 17:27:45 +00008827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8829$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008830
8831
8832
Martin v. Löwis18e16552006-02-15 17:27:45 +00008833cat >>confdefs.h <<_ACEOF
8834#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8835_ACEOF
8836
8837
Christian Heimes400adb02008-02-01 08:12:03 +00008838# The cast to long int works around a bug in the HP C Compiler
8839# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8840# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8841# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8843$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008844if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 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 +00008848
Christian Heimes400adb02008-02-01 08:12:03 +00008849else
Matthias Kloseb9621712010-04-24 17:59:49 +00008850 if test "$ac_cv_type_pid_t" = yes; then
8851 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008853as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008854See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008855 else
8856 ac_cv_sizeof_pid_t=0
8857 fi
8858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008859
Christian Heimes400adb02008-02-01 08:12:03 +00008860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8862$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008863
8864
8865
8866cat >>confdefs.h <<_ACEOF
8867#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8868_ACEOF
8869
8870
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008871# The cast to long int works around a bug in the HP C Compiler
8872# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8873# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8874# This bug is HP SR number 8606223364.
8875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8876$as_echo_n "checking size of uintptr_t... " >&6; }
8877if ${ac_cv_sizeof_uintptr_t+:} false; then :
8878 $as_echo_n "(cached) " >&6
8879else
8880 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8881
8882else
8883 if test "$ac_cv_type_uintptr_t" = yes; then
8884 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8886as_fn_error 77 "cannot compute sizeof (uintptr_t)
8887See \`config.log' for more details" "$LINENO" 5; }
8888 else
8889 ac_cv_sizeof_uintptr_t=0
8890 fi
8891fi
8892
8893fi
8894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8895$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8896
8897
8898
8899cat >>confdefs.h <<_ACEOF
8900#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8901_ACEOF
8902
8903
Michael W. Hudson54241132001-12-07 15:38:26 +00008904
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008905
Eitan Adler3055c942018-05-15 22:58:09 -07008906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8907$as_echo_n "checking for long double... " >&6; }
8908if ${ac_cv_type_long_double+:} false; then :
8909 $as_echo_n "(cached) " >&6
8910else
8911 if test "$GCC" = yes; then
8912 ac_cv_type_long_double=yes
8913 else
8914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8915/* end confdefs.h. */
8916/* The Stardent Vistra knows sizeof (long double), but does
8917 not support it. */
8918 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008919int
8920main ()
8921{
Eitan Adler3055c942018-05-15 22:58:09 -07008922static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8923 sizeof (double) <= sizeof (long double))];
8924test_array [0] = 0;
8925return test_array [0];
8926
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008927 ;
8928 return 0;
8929}
8930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008931if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008932 ac_cv_type_long_double=yes
8933else
8934 ac_cv_type_long_double=no
8935fi
8936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8937 fi
8938fi
8939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8940$as_echo "$ac_cv_type_long_double" >&6; }
8941 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008944
Eitan Adler3055c942018-05-15 22:58:09 -07008945 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008946
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008947# The cast to long int works around a bug in the HP C Compiler
8948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8950# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8952$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008953if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008955else
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 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 +00008957
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008958else
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 if test "$ac_cv_type_long_double" = yes; then
8960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008962as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008963See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008964 else
8965 ac_cv_sizeof_long_double=0
8966 fi
8967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008968
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8971$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008972
8973
8974
8975cat >>confdefs.h <<_ACEOF
8976#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8977_ACEOF
8978
8979
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008981# The cast to long int works around a bug in the HP C Compiler
8982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8984# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8986$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008987if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008989else
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 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 +00008991
Thomas Woutersb2137042007-02-01 18:02:27 +00008992else
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 if test "$ac_cv_type__Bool" = yes; then
8994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008996as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008997See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998 else
8999 ac_cv_sizeof__Bool=0
9000 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002
Thomas Woutersb2137042007-02-01 18:02:27 +00009003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9005$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006
9007
9008
Thomas Woutersb2137042007-02-01 18:02:27 +00009009cat >>confdefs.h <<_ACEOF
9010#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9011_ACEOF
9012
9013
Thomas Woutersb2137042007-02-01 18:02:27 +00009014
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015# The cast to long int works around a bug in the HP C Compiler
9016# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9017# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9018# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9020$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009021if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023else
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009025#ifdef HAVE_SYS_TYPES_H
9026#include <sys/types.h>
9027#endif
9028
Matthias Kloseb9621712010-04-24 17:59:49 +00009029"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 if test "$ac_cv_type_off_t" = yes; then
9033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009035as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009036See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009037 else
9038 ac_cv_sizeof_off_t=0
9039 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009041
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9044$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046
9047
Martin v. Löwis11437992002-04-12 09:54:03 +00009048cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009049#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009050_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009051
Michael W. Hudson54241132001-12-07 15:38:26 +00009052
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009053
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9055$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009056if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009057 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009060
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9062$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009063else
Matthias Kloseb9621712010-04-24 17:59:49 +00009064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009066fi
9067
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068# The cast to long int works around a bug in the HP C Compiler
9069# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9070# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9071# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9073$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009074if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009076else
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009078#ifdef HAVE_SYS_TYPES_H
9079#include <sys/types.h>
9080#endif
9081#ifdef HAVE_TIME_H
9082#include <time.h>
9083#endif
9084
Matthias Kloseb9621712010-04-24 17:59:49 +00009085"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009086
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009087else
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 if test "$ac_cv_type_time_t" = yes; then
9089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009091as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009092See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009093 else
9094 ac_cv_sizeof_time_t=0
9095 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009097
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9100$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009102
9103
Martin v. Löwis11437992002-04-12 09:54:03 +00009104cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009105#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009106_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009107
Michael W. Hudson54241132001-12-07 15:38:26 +00009108
9109
Trent Mick635f6fb2000-08-23 21:33:05 +00009110# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009111ac_save_cc="$CC"
9112if test "$ac_cv_kpthread" = "yes"
9113then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009114elif test "$ac_cv_kthread" = "yes"
9115then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009116elif test "$ac_cv_pthread" = "yes"
9117then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009118fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9121$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009122have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009124/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009125
9126 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009127int
9128main ()
9129{
Guido van Rossum12580492000-09-24 16:47:19 +00009130pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ;
9132 return 0;
9133}
Matthias Kloseb159a552010-04-25 21:00:44 +00009134
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009136if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009137 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9141$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009142if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009143 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9146# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9148$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009149if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009151else
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009153#ifdef HAVE_PTHREAD_H
9154#include <pthread.h>
9155#endif
9156
Matthias Kloseb9621712010-04-24 17:59:49 +00009157"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009158
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009159else
Matthias Kloseb9621712010-04-24 17:59:49 +00009160 if test "$ac_cv_type_pthread_t" = yes; then
9161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009163as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009164See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009165 else
9166 ac_cv_sizeof_pthread_t=0
9167 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009169
Trent Mick635f6fb2000-08-23 21:33:05 +00009170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9172$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009174
9175
Martin v. Löwis11437992002-04-12 09:54:03 +00009176cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009177#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009178_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009180
Trent Mick635f6fb2000-08-23 21:33:05 +00009181fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009182
9183# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9184# This checking will be unnecessary after removing deprecated TLS API.
9185# The cast to long int works around a bug in the HP C Compiler
9186# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9187# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9188# This bug is HP SR number 8606223364.
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9190$as_echo_n "checking size of pthread_key_t... " >&6; }
9191if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9192 $as_echo_n "(cached) " >&6
9193else
9194 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9195"; then :
9196
9197else
9198 if test "$ac_cv_type_pthread_key_t" = yes; then
9199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9201as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9202See \`config.log' for more details" "$LINENO" 5; }
9203 else
9204 ac_cv_sizeof_pthread_key_t=0
9205 fi
9206fi
9207
9208fi
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9210$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9211
9212
9213
9214cat >>confdefs.h <<_ACEOF
9215#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9216_ACEOF
9217
9218
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9220$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9221if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9223/* end confdefs.h. */
9224#include <pthread.h>
9225int
9226main ()
9227{
9228pthread_key_t k; k * 1;
9229 ;
9230 return 0;
9231}
9232_ACEOF
9233if ac_fn_c_try_compile "$LINENO"; then :
9234 ac_pthread_key_t_is_arithmetic_type=yes
9235else
9236 ac_pthread_key_t_is_arithmetic_type=no
9237
9238fi
9239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9241$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9242 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9243
9244$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9245
9246 fi
9247else
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9249$as_echo "no" >&6; }
9250fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009251CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009252
Michael W. Hudson54241132001-12-07 15:38:26 +00009253
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009254case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009255 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009256 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9257 ;;
9258 Darwin/*)
9259 OTHER_LIBTOOL_OPT=""
9260 ;;
9261esac
9262
9263
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009264
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009265case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009266 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009267 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9268 if test "${enable_universalsdk}"; then
9269 :
9270 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009271 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009272 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009274 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009275 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009276 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009277 if test ${gcc_version} '<' 4.0
9278 then
9279 LIBTOOL_CRUFT="-lcc_dynamic"
9280 else
9281 LIBTOOL_CRUFT=""
9282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009283 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009284 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009285else
Matthias Kloseb9621712010-04-24 17:59:49 +00009286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009287/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009288
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009289 #include <unistd.h>
9290 int main(int argc, char*argv[])
9291 {
9292 if (sizeof(long) == 4) {
9293 return 0;
9294 } else {
9295 return 1;
9296 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009297 }
9298
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009300if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009301 ac_osx_32bit=yes
9302else
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009307fi
9308
9309
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009310 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009311 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009312 i386)
9313 MACOSX_DEFAULT_ARCH="i386"
9314 ;;
9315 ppc)
9316 MACOSX_DEFAULT_ARCH="ppc"
9317 ;;
9318 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009319 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009320 ;;
9321 esac
9322 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009323 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009324 i386)
9325 MACOSX_DEFAULT_ARCH="x86_64"
9326 ;;
9327 ppc)
9328 MACOSX_DEFAULT_ARCH="ppc64"
9329 ;;
9330 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009331 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009332 ;;
9333 esac
9334
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009335 fi
9336
9337 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009338 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009340esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9342$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009343if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009344then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009345 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009346 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009347 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009348
Matthias Kloseb9621712010-04-24 17:59:49 +00009349$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009350
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9352$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009353 if test $enable_shared = "yes"
9354 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009355 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 +00009356 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009357else
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9359$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009360fi
9361
Matthias Kloseb9621712010-04-24 17:59:49 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9363$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009364case $ac_sys_system/$ac_sys_release in
9365 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9370$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009371 ;;
9372 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9374$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009375 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009376esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009377
Guido van Rossum0a516c91994-09-12 10:58:40 +00009378# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009379
Michael W. Hudson54241132001-12-07 15:38:26 +00009380
9381
9382
9383
Benjamin Peterson99f03762010-04-11 22:15:28 +00009384
Thomas Wouters477c8d52006-05-27 19:21:47 +00009385
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009386# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9387# -- usually .so, .sl on HP-UX, .dll on Cygwin
9388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9389$as_echo_n "checking the extension of shared libraries... " >&6; }
9390if test -z "$SHLIB_SUFFIX"; then
9391 case $ac_sys_system in
9392 hp*|HP*)
9393 case `uname -m` in
9394 ia64) SHLIB_SUFFIX=.so;;
9395 *) SHLIB_SUFFIX=.sl;;
9396 esac
9397 ;;
9398 CYGWIN*) SHLIB_SUFFIX=.dll;;
9399 *) SHLIB_SUFFIX=.so;;
9400 esac
9401fi
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9403$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009404
Guido van Rossum0a516c91994-09-12 10:58:40 +00009405# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009406# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009407# (Shared libraries in this instance are shared modules to be loaded into
9408# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9410$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009411if test -z "$LDSHARED"
9412then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009413 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009414 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009415 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009416 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009417 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009419 if test "$GCC" = "yes" ; then
9420 LDSHARED='$(CC) -shared'
9421 LDCXXSHARED='$(CXX) -shared'
9422 else
9423 LDSHARED='$(CC) -G'
9424 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009425 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009426 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009427 if test "$GCC" = "yes" ; then
9428 LDSHARED='$(CC) -shared'
9429 LDCXXSHARED='$(CXX) -shared'
9430 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009431 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009432 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009433 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009434 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009435 LDSHARED='$(CC) -bundle'
9436 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009437 if test "$enable_framework" ; then
9438 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009439 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9440 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009441 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009442 else
9443 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009444 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009445 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009446 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009447 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009448 LDSHARED='$(CC) -bundle'
9449 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009450 if test "$enable_framework" ; then
9451 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009452 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9453 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009454 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009455 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009456 # No framework, use the Python app as bundle-loader
9457 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009458 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009459 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009460 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009461 Darwin/*)
9462 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9463 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009464
Ned Deily36820b62014-06-25 13:44:22 -07009465 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9466 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9467 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9468 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9469 if test ${dep_target_major} -eq 10 && \
9470 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009471 then
Ned Deily36820b62014-06-25 13:44:22 -07009472 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009473 LDSHARED='$(CC) -bundle'
9474 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009475 if test "$enable_framework" ; then
9476 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009477 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9478 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009479 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009480 else
9481 # No framework, use the Python app as bundle-loader
9482 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9483 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009484 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009485 fi
Ned Deily36820b62014-06-25 13:44:22 -07009486 else
9487 # building for OS X 10.3 and later
9488 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9489 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9490 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009491 fi
9492 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009493 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009494 LDSHARED='$(CC) -shared'
9495 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009496 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009497 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009498 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009499 LDSHARED='$(CC) -shared'
9500 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009501 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009502 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009503 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009504 OpenBSD*)
9505 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9506 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009507 LDSHARED='$(CC) -shared $(CCSHARED)'
9508 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009509 else
9510 case `uname -r` in
9511 [01].* | 2.[0-7] | 2.[0-7].*)
9512 LDSHARED="ld -Bshareable ${LDFLAGS}"
9513 ;;
9514 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009515 LDSHARED='$(CC) -shared $(CCSHARED)'
9516 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009517 ;;
9518 esac
9519 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009520 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009521 LDSHARED='$(CC) -shared'
9522 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009523 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009524 if test "$GCC" = "yes" ; then
9525 LDSHARED='$(CC) -shared'
9526 LDCXXSHARED='$(CXX) -shared'
9527 else
9528 LDSHARED='$(CC) -G'
9529 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009530 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009531 SCO_SV*)
9532 LDSHARED='$(CC) -Wl,-G,-Bexport'
9533 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9534 CYGWIN*)
9535 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9536 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009537 *) LDSHARED="ld";;
9538 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9541$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009542LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009543BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009544# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009545# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9547$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009548if test -z "$CCSHARED"
9549then
Guido van Rossum07397971997-04-29 21:49:50 +00009550 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009551 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009552 then CCSHARED="-fPIC";
9553 elif test `uname -p` = sparc;
9554 then CCSHARED="-xcode=pic32";
9555 else CCSHARED="-Kpic";
9556 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009557 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009558 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009559 else CCSHARED="+z";
9560 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009561 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009562 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009563 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009564 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009565 if test "$GCC" = "yes"
9566 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009567 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009568 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009569 SCO_SV*)
9570 if test "$GCC" = "yes"
9571 then CCSHARED="-fPIC"
9572 else CCSHARED="-Kpic -belf"
9573 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009574 VxWorks*)
9575 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009576 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9579$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009580# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009581# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9583$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009584if test -z "$LINKFORSHARED"
9585then
Guido van Rossum07397971997-04-29 21:49:50 +00009586 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009587 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009588 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009589 LINKFORSHARED="-Wl,-E -Wl,+s";;
9590# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009591 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009592 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009593 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009595 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009596
9597 # Issue #18075: the default maximum stack size (8MBytes) is too
9598 # small for the default recursion limit. Increase the stack size
9599 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009600 # Note: This matches the value of THREAD_STACK_SIZE in
9601 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009602 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9603
Jack Jansene578a632001-08-15 01:27:14 +00009604 if test "$enable_framework"
9605 then
Jack Jansenda49e192005-01-07 13:08:22 +00009606 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009607 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009608 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009609 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009610 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009611 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009612 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009613 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9614 then
9615 LINKFORSHARED="-Wl,--export-dynamic"
9616 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009617 SunOS/5*) case $CC in
9618 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009619 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009620 then
9621 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009622 fi;;
9623 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009624 CYGWIN*)
9625 if test $enable_shared = "no"
9626 then
9627 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9628 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009629 QNX*)
9630 # -Wl,-E causes the symbols to be added to the dynamic
9631 # symbol table so that they can be found when a module
9632 # is loaded. -N 2048K causes the stack size to be set
9633 # to 2048 kilobytes so that the stack doesn't overflow
9634 # when running test_compile.py.
9635 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009636 VxWorks*)
9637 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009638 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9641$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009642
Michael W. Hudson54241132001-12-07 15:38:26 +00009643
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009644
Matthias Kloseb9621712010-04-24 17:59:49 +00009645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9646$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009647if test ! "$LIBRARY" = "$LDLIBRARY"
9648then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009649 case $ac_sys_system in
9650 CYGWIN*)
9651 # Cygwin needs CCSHARED when building extension DLLs
9652 # but not when building the interpreter DLL.
9653 CFLAGSFORSHARED='';;
9654 *)
9655 CFLAGSFORSHARED='$(CCSHARED)'
9656 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9659$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009660
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009661# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9662# library (with --enable-shared).
9663# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009664# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9665# if it is not required, since it creates a dependency of the shared library
9666# to LIBS. This, in turn, means that applications linking the shared libpython
9667# don't need to link LIBS explicitly. The default should be only changed
9668# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009669
Matthias Kloseb9621712010-04-24 17:59:49 +00009670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9671$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009672case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009673 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009674 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009675esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9677$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009678
9679
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9682$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009683if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009684 $as_echo_n "(cached) " >&6
9685else
9686 ac_check_lib_save_LIBS=$LIBS
9687LIBS="-lsendfile $LIBS"
9688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9689/* end confdefs.h. */
9690
9691/* Override any GCC internal prototype to avoid an error.
9692 Use char because int might match the return type of a GCC
9693 builtin and then its argument prototype would still apply. */
9694#ifdef __cplusplus
9695extern "C"
9696#endif
9697char sendfile ();
9698int
9699main ()
9700{
9701return sendfile ();
9702 ;
9703 return 0;
9704}
9705_ACEOF
9706if ac_fn_c_try_link "$LINENO"; then :
9707 ac_cv_lib_sendfile_sendfile=yes
9708else
9709 ac_cv_lib_sendfile_sendfile=no
9710fi
9711rm -f core conftest.err conftest.$ac_objext \
9712 conftest$ac_exeext conftest.$ac_ext
9713LIBS=$ac_check_lib_save_LIBS
9714fi
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9716$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009717if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009718 cat >>confdefs.h <<_ACEOF
9719#define HAVE_LIBSENDFILE 1
9720_ACEOF
9721
9722 LIBS="-lsendfile $LIBS"
9723
9724fi
9725
Matthias Kloseb9621712010-04-24 17:59:49 +00009726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9727$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009728if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009729 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009730else
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009732LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736/* Override any GCC internal prototype to avoid an error.
9737 Use char because int might match the return type of a GCC
9738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739#ifdef __cplusplus
9740extern "C"
9741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009742char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009743int
9744main ()
9745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009746return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 ;
9748 return 0;
9749}
9750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009751if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009753else
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009756rm -f core conftest.err conftest.$ac_objext \
9757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009758LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9761$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009762if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 cat >>confdefs.h <<_ACEOF
9764#define HAVE_LIBDL 1
9765_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009766
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009767 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009768
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009769fi
9770 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9772$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009773if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009775else
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009777LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781/* Override any GCC internal prototype to avoid an error.
9782 Use char because int might match the return type of a GCC
9783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009784#ifdef __cplusplus
9785extern "C"
9786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009787char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009788int
9789main ()
9790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 ;
9793 return 0;
9794}
9795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009798else
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009801rm -f core conftest.err conftest.$ac_objext \
9802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9806$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009807if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 cat >>confdefs.h <<_ACEOF
9809#define HAVE_LIBDLD 1
9810_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009811
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009812 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009814fi
9815 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009816
Michael Felt0d3ccb42017-12-30 22:39:20 +01009817# checks for uuid.h location
9818for ac_header in uuid/uuid.h uuid.h
9819do :
9820 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9821ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9822if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9823 cat >>confdefs.h <<_ACEOF
9824#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9825_ACEOF
9826
9827fi
9828
9829done
9830
9831
Berker Peksag9a10ff42017-11-08 23:09:16 +03009832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9833$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9835/* end confdefs.h. */
9836#include <uuid/uuid.h>
9837int
9838main ()
9839{
9840
9841#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009842void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009843#endif
9844
9845 ;
9846 return 0;
9847}
9848_ACEOF
9849if ac_fn_c_try_compile "$LINENO"; then :
9850
9851$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9852
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9854$as_echo "yes" >&6; }
9855else
9856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9857$as_echo "no" >&6; }
9858
9859fi
9860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9861
Michael Felt0d3ccb42017-12-30 22:39:20 +01009862# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009863# FreeBSD and OpenBSD provides support as well
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9865$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9867/* end confdefs.h. */
9868#include <uuid.h>
9869int
9870main ()
9871{
9872
9873#ifndef uuid_create
9874void *x = uuid_create
9875#endif
9876
9877 ;
9878 return 0;
9879}
9880_ACEOF
9881if ac_fn_c_try_compile "$LINENO"; then :
9882
9883$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9884
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9886$as_echo "yes" >&6; }
9887else
9888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9889$as_echo "no" >&6; }
9890
9891fi
9892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9893
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009894# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9895# stream in big-endian byte-order
9896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9897$as_echo_n "checking for uuid_enc_be... " >&6; }
9898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9899/* end confdefs.h. */
9900#include <uuid.h>
9901int
9902main ()
9903{
9904
9905#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009906void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009907#endif
9908
9909 ;
9910 return 0;
9911}
9912_ACEOF
9913if ac_fn_c_try_compile "$LINENO"; then :
9914
9915$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9916
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9918$as_echo "yes" >&6; }
9919else
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9921$as_echo "no" >&6; }
9922
9923fi
9924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9925
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009926# 'Real Time' functions on Solaris
9927# posix4 on Solaris 2.6
9928# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009930$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009931if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009933else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009934 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938/* Override any GCC internal prototype to avoid an error.
9939 Use char because int might match the return type of a GCC
9940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009941#ifdef __cplusplus
9942extern "C"
9943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009944char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009945int
9946main ()
9947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009949 ;
9950 return 0;
9951}
9952_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953for ac_lib in '' pthread rt posix4; do
9954 if test -z "$ac_lib"; then
9955 ac_res="none required"
9956 else
9957 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009958 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009963rm -f core conftest.err conftest.$ac_objext \
9964 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009965 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968done
Victor Stinnere0be4232011-10-25 13:06:09 +02009969if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971else
9972 ac_cv_search_sem_init=no
9973fi
9974rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009975LIBS=$ac_func_search_save_LIBS
9976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9978$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009979ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009980if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009982
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009983fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009984
Martin v. Löwis519adae2003-09-20 10:47:47 +00009985
Martin v. Löwis19d17342003-06-14 21:03:05 +00009986# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9988$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009989if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009991else
9992 ac_check_lib_save_LIBS=$LIBS
9993LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009995/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997/* Override any GCC internal prototype to avoid an error.
9998 Use char because int might match the return type of a GCC
9999 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010000#ifdef __cplusplus
10001extern "C"
10002#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010003char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010004int
10005main ()
10006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010007return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010008 ;
10009 return 0;
10010}
10011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010012if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010013 ac_cv_lib_intl_textdomain=yes
10014else
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010017rm -f core conftest.err conftest.$ac_objext \
10018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010019LIBS=$ac_check_lib_save_LIBS
10020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10022$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010023if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010026
Brett Cannonc6d936e2009-06-07 20:09:53 +000010027 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010028fi
10029
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010030
10031# checks for system dependent C++ extensions support
10032case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10034$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010036/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010037
Georg Brandl59e87bd2011-02-15 19:48:59 +000010038 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010039int
10040main ()
10041{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010042loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ;
10044 return 0;
10045}
Matthias Kloseb159a552010-04-25 21:00:44 +000010046
Martin v. Löwis11437992002-04-12 09:54:03 +000010047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010048if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010049
Matthias Kloseb159a552010-04-25 21:00:44 +000010050
Matthias Kloseb9621712010-04-24 17:59:49 +000010051$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010052
Matthias Kloseb159a552010-04-25 21:00:44 +000010053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010054$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010055
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010056else
Matthias Kloseb159a552010-04-25 21:00:44 +000010057
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010059$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010060
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010062rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010063 conftest$ac_exeext conftest.$ac_ext
10064# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10065# of the AIX system used to build/package Python executable. This tag serves
10066# as a baseline for bdist module packages
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10068$as_echo_n "checking for the system builddate... " >&6; }
10069 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10070
10071cat >>confdefs.h <<_ACEOF
10072#define AIX_BUILDDATE $AIX_BUILDDATE
10073_ACEOF
10074
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10076$as_echo "$AIX_BUILDDATE" >&6; }
10077 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010078 *) ;;
10079esac
10080
Christian Heimes985ecdc2013-11-20 11:46:18 +010010081# check for systems that require aligned memory access
10082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10083$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010084if ${ac_cv_aligned_required+:} false; then :
10085 $as_echo_n "(cached) " >&6
10086else
10087 if test "$cross_compiling" = yes; then :
10088 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010089else
10090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10091/* end confdefs.h. */
10092
10093int main()
10094{
10095 char s[16];
10096 int i, *p1, *p2;
10097 for (i=0; i < 16; i++)
10098 s[i] = i;
10099 p1 = (int*)(s+1);
10100 p2 = (int*)(s+2);
10101 if (*p1 == *p2)
10102 return 1;
10103 return 0;
10104}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010105_ACEOF
10106if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010107 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010108else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010109 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010110fi
10111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10112 conftest.$ac_objext conftest.beam conftest.$ac_ext
10113fi
10114
10115
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010116fi
10117
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10119$as_echo "$ac_cv_aligned_required" >&6; }
10120if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010121
10122$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10123
10124fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010125
10126# str, bytes and memoryview hash algorithm
10127
10128
10129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10130$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10131
10132# Check whether --with-hash_algorithm was given.
10133if test "${with_hash_algorithm+set}" = set; then :
10134 withval=$with_hash_algorithm;
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10136$as_echo "$withval" >&6; }
10137case "$withval" in
10138 siphash24)
10139 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10140
10141 ;;
10142 fnv)
10143 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10144
10145 ;;
10146 *)
10147 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10148 ;;
10149esac
10150
10151else
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10153$as_echo "default" >&6; }
10154fi
10155
10156
Charles-François Natalid30b0222014-05-08 23:08:51 +010010157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10158$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10159
10160# Check whether --with-address_sanitizer was given.
10161if test "${with_address_sanitizer+set}" = set; then :
10162 withval=$with_address_sanitizer;
10163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10164$as_echo "$withval" >&6; }
10165BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10166LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010167# ASan works by controlling memory allocation, our own malloc interferes.
10168with_pymalloc="no"
10169
10170else
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10172$as_echo "no" >&6; }
10173fi
10174
10175
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10177$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10178
10179# Check whether --with-memory_sanitizer was given.
10180if test "${with_memory_sanitizer+set}" = set; then :
10181 withval=$with_memory_sanitizer;
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10183$as_echo "$withval" >&6; }
10184BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10185LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10186# MSan works by controlling memory allocation, our own malloc interferes.
10187with_pymalloc="no"
10188
10189else
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
10192fi
10193
10194
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10196$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10197
10198# Check whether --with-undefined_behavior_sanitizer was given.
10199if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10200 withval=$with_undefined_behavior_sanitizer;
10201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10202$as_echo "$withval" >&6; }
10203BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10204LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010205
10206else
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10208$as_echo "no" >&6; }
10209fi
10210
10211
Guido van Rossum70c7f481998-03-26 18:44:10 +000010212# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10214$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010215if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010217else
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010219LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223/* Override any GCC internal prototype to avoid an error.
10224 Use char because int might match the return type of a GCC
10225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010226#ifdef __cplusplus
10227extern "C"
10228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010229char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010230int
10231main ()
10232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010233return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ;
10235 return 0;
10236}
10237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010240else
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243rm -f core conftest.err conftest.$ac_objext \
10244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010245LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10248$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010249if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010250 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010251fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010252 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10254$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010255if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010257else
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010259LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263/* Override any GCC internal prototype to avoid an error.
10264 Use char because int might match the return type of a GCC
10265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010266#ifdef __cplusplus
10267extern "C"
10268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010269char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010270int
10271main ()
10272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 ;
10275 return 0;
10276}
10277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010280else
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010283rm -f core conftest.err conftest.$ac_objext \
10284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010285LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10288$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010289if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010290 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010291fi
10292 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010293
Matthias Kloseb9621712010-04-24 17:59:49 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10295$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010298if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10301$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010302LIBS="$withval $LIBS"
10303
10304else
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10306$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307fi
10308
Guido van Rossum7f43da71994-08-01 12:15:30 +000010309
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010310
10311
10312
10313
10314
10315
Victor Stinnerb477d192020-01-22 22:48:16 +010010316
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010317if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10318 if test -n "$ac_tool_prefix"; then
10319 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10320set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10322$as_echo_n "checking for $ac_word... " >&6; }
10323if ${ac_cv_path_PKG_CONFIG+:} false; then :
10324 $as_echo_n "(cached) " >&6
10325else
10326 case $PKG_CONFIG in
10327 [\\/]* | ?:[\\/]*)
10328 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10329 ;;
10330 *)
10331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332for as_dir in $PATH
10333do
10334 IFS=$as_save_IFS
10335 test -z "$as_dir" && as_dir=.
10336 for ac_exec_ext in '' $ac_executable_extensions; do
10337 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10338 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340 break 2
10341 fi
10342done
10343 done
10344IFS=$as_save_IFS
10345
10346 ;;
10347esac
10348fi
10349PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10350if test -n "$PKG_CONFIG"; then
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10352$as_echo "$PKG_CONFIG" >&6; }
10353else
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355$as_echo "no" >&6; }
10356fi
10357
10358
10359fi
10360if test -z "$ac_cv_path_PKG_CONFIG"; then
10361 ac_pt_PKG_CONFIG=$PKG_CONFIG
10362 # Extract the first word of "pkg-config", so it can be a program name with args.
10363set dummy pkg-config; ac_word=$2
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365$as_echo_n "checking for $ac_word... " >&6; }
10366if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10367 $as_echo_n "(cached) " >&6
10368else
10369 case $ac_pt_PKG_CONFIG in
10370 [\\/]* | ?:[\\/]*)
10371 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10372 ;;
10373 *)
10374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375for as_dir in $PATH
10376do
10377 IFS=$as_save_IFS
10378 test -z "$as_dir" && as_dir=.
10379 for ac_exec_ext in '' $ac_executable_extensions; do
10380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10381 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383 break 2
10384 fi
10385done
10386 done
10387IFS=$as_save_IFS
10388
10389 ;;
10390esac
10391fi
10392ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10393if test -n "$ac_pt_PKG_CONFIG"; then
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10395$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10396else
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399fi
10400
10401 if test "x$ac_pt_PKG_CONFIG" = x; then
10402 PKG_CONFIG=""
10403 else
10404 case $cross_compiling:$ac_tool_warned in
10405yes:)
10406{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10407$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10408ac_tool_warned=yes ;;
10409esac
10410 PKG_CONFIG=$ac_pt_PKG_CONFIG
10411 fi
10412else
10413 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10414fi
10415
10416fi
10417if test -n "$PKG_CONFIG"; then
10418 _pkg_min_version=0.9.0
10419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10420$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10421 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10423$as_echo "yes" >&6; }
10424 else
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427 PKG_CONFIG=""
10428 fi
10429fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010430
10431# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10433$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010434
10435# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010436if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010437 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010438else
10439 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010440fi
10441
10442
Matthias Kloseb9621712010-04-24 17:59:49 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10444$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010445
10446# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10448$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010449
10450# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010451if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010452 withval=$with_system_ffi;
10453fi
10454
10455
Zachary Waref40d4dd2016-09-17 01:25:24 -050010456if test "$ac_sys_system" = "Darwin"
10457then
10458 case "$with_system_ffi" in
10459 "")
10460 with_system_ffi="no"
10461 ;;
10462 yes|no)
10463 ;;
10464 *)
10465 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10466 ;;
10467 esac
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10469$as_echo "$with_system_ffi" >&6; }
10470else
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10472$as_echo "yes" >&6; }
10473 if test "$with_system_ffi" != ""
10474 then
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10476$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10477 fi
10478 with_system_ffi="yes"
10479fi
Zachary Ware935043d2016-09-09 17:01:21 -070010480
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010481if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010482 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10483else
10484 LIBFFI_INCLUDEDIR=""
10485fi
10486
10487
Stefan Krah60187b52012-03-23 19:06:27 +010010488# Check for use of the system libmpdec library
10489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10490$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10491
10492# Check whether --with-system_libmpdec was given.
10493if test "${with_system_libmpdec+set}" = set; then :
10494 withval=$with_system_libmpdec;
10495else
10496 with_system_libmpdec="no"
10497fi
10498
10499
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10501$as_echo "$with_system_libmpdec" >&6; }
10502
Stefan Krah815280e2020-02-29 19:43:42 +010010503# Check whether _decimal should use a coroutine-local or thread-local context
10504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10505$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10506
10507# Check whether --with-decimal_contextvar was given.
10508if test "${with_decimal_contextvar+set}" = set; then :
10509 withval=$with_decimal_contextvar;
10510else
10511 with_decimal_contextvar="yes"
10512fi
10513
10514
10515if test "$with_decimal_contextvar" != "no"
10516then
10517
10518$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10519
10520fi
10521
10522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10523$as_echo "$with_decimal_contextvar" >&6; }
10524
Benjamin Peterson076ed002010-10-31 17:11:02 +000010525# Check for support for loadable sqlite extensions
10526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10527$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10528# Check whether --enable-loadable-sqlite-extensions was given.
10529if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10530 enableval=$enable_loadable_sqlite_extensions;
10531else
10532 enable_loadable_sqlite_extensions="no"
10533fi
10534
10535
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10537$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10538
Ned Deilyd819b932013-09-06 01:07:05 -070010539# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10540
10541
10542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10543$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10544
10545# Check whether --with-tcltk-includes was given.
10546if test "${with_tcltk_includes+set}" = set; then :
10547 withval=$with_tcltk_includes;
10548else
10549 with_tcltk_includes="default"
10550fi
10551
10552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10553$as_echo "$with_tcltk_includes" >&6; }
10554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10555$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10556
10557# Check whether --with-tcltk-libs was given.
10558if test "${with_tcltk_libs+set}" = set; then :
10559 withval=$with_tcltk_libs;
10560else
10561 with_tcltk_libs="default"
10562fi
10563
10564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10565$as_echo "$with_tcltk_libs" >&6; }
10566if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10567then
10568 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10569 then
10570 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10571 fi
10572 TCLTK_INCLUDES=""
10573 TCLTK_LIBS=""
10574else
10575 TCLTK_INCLUDES="$with_tcltk_includes"
10576 TCLTK_LIBS="$with_tcltk_libs"
10577fi
10578
Matthias Klose55708cc2009-04-30 08:06:49 +000010579# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10581$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010582
10583# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010584if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010585 withval=$with_dbmliborder;
10586if test x$with_dbmliborder = xyes
10587then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010588as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010589else
10590 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10591 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10592 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010593 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010594 fi
10595 done
10596fi
10597fi
10598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10600$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010601
Martin v. Löwis11437992002-04-12 09:54:03 +000010602# Templates for things AC_DEFINEd more than once.
10603# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010604
10605
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010606if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010607then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010608 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010610
10611 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010612 if test "$ac_sys_system" = "SunOS"; then
10613 CFLAGS="$CFLAGS -D_REENTRANT"
10614 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010615elif test "$ac_cv_kpthread" = "yes"
10616then
10617 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010618 if test "$ac_cv_cxx_thread" = "yes"; then
10619 CXX="$CXX -Kpthread"
10620 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010621 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010622elif test "$ac_cv_kthread" = "yes"
10623then
10624 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010625 if test "$ac_cv_cxx_thread" = "yes"; then
10626 CXX="$CXX -Kthread"
10627 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010628 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010629elif test "$ac_cv_pthread" = "yes"
10630then
10631 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010632 if test "$ac_cv_cxx_thread" = "yes"; then
10633 CXX="$CXX -pthread"
10634 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010636else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010637 if test ! -z "$withval" -a -d "$withval"
10638 then LDFLAGS="$LDFLAGS -L$withval"
10639 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010640
10641 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010642 # define _POSIX_THREADS in unistd.h. Some apparently don't
10643 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10645$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010648
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010649#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010650#ifdef _POSIX_THREADS
10651yes
10652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
10654_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010657 unistd_defines_pthreads=yes
10658else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010659 unistd_defines_pthreads=no
10660fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010661rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10664$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010665
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010667
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010668 # Just looking for pthread_create in libpthread is not enough:
10669 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10670 # So we really have to include pthread.h, and then link.
10671 _libs=$LIBS
10672 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10674$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010676/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010677
10678#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010679#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010680
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010681void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010682int
10683main ()
10684{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010685
10686pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 ;
10688 return 0;
10689}
10690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010692
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10694$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010695 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010696
Guido van Rossum02a1c402000-02-25 19:26:31 +000010697else
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010699 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010701if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010702
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010703 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010704
Guido van Rossumad678af1998-10-02 14:42:15 +000010705else
Guido van Rossumad678af1998-10-02 14:42:15 +000010706
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10708$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010709if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010711else
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010713LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717/* Override any GCC internal prototype to avoid an error.
10718 Use char because int might match the return type of a GCC
10719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010720#ifdef __cplusplus
10721extern "C"
10722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010723char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010724int
10725main ()
10726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010732if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010734else
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010737rm -f core conftest.err conftest.$ac_objext \
10738 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010739LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10742$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010743if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010744
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010745 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010746 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010747
Greg Steinadf63d62000-07-05 10:38:09 +000010748else
Greg Steinadf63d62000-07-05 10:38:09 +000010749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10751$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010752if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010754else
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010756LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760/* Override any GCC internal prototype to avoid an error.
10761 Use char because int might match the return type of a GCC
10762 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010763#ifdef __cplusplus
10764extern "C"
10765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010766char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010767int
10768main ()
10769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010770return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 ;
10772 return 0;
10773}
10774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010776 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010777else
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010780rm -f core conftest.err conftest.$ac_objext \
10781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010782LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10785$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010786if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010787
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010788 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010789 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010790
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010791else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10794$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010795if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010797else
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010799LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803/* Override any GCC internal prototype to avoid an error.
10804 Use char because int might match the return type of a GCC
10805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010806#ifdef __cplusplus
10807extern "C"
10808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010809char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010810int
10811main ()
10812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 ;
10815 return 0;
10816}
10817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010820else
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010823rm -f core conftest.err conftest.$ac_objext \
10824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10828$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010829if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010830
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010831 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010832 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010833
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010834else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10837$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010838if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010840else
Martin v. Löwis11437992002-04-12 09:54:03 +000010841 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010842LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846/* Override any GCC internal prototype to avoid an error.
10847 Use char because int might match the return type of a GCC
10848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010849#ifdef __cplusplus
10850extern "C"
10851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010852char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010853int
10854main ()
10855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ;
10858 return 0;
10859}
10860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010863else
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010866rm -f core conftest.err conftest.$ac_objext \
10867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010868LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10871$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010872if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010873
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010874 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010875 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010876
Guido van Rossumb93a8621998-05-07 13:27:32 +000010877else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010878
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010879 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10880
Guido van Rossum2d38f911996-06-26 19:47:01 +000010881fi
10882
Guido van Rossum627b2d71993-12-24 10:39:16 +000010883
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010884fi
10885
Guido van Rossum0be3e491997-05-22 20:33:33 +000010886fi
10887
Guido van Rossum49545951997-12-02 19:28:29 +000010888fi
10889
Guido van Rossumb93a8621998-05-07 13:27:32 +000010890fi
10891
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010893rm -f core conftest.err conftest.$ac_objext \
10894 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10897$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010898if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010900else
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010902LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906/* Override any GCC internal prototype to avoid an error.
10907 Use char because int might match the return type of a GCC
10908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010909#ifdef __cplusplus
10910extern "C"
10911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010912char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010913int
10914main ()
10915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010922 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010923else
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010926rm -f core conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010928LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10931$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010932if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010933
Martin v. Löwis130fb172001-07-19 11:00:41 +000010934 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010935
Guido van Rossum627b2d71993-12-24 10:39:16 +000010936fi
10937
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010938
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010939fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010940
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010941if test "$posix_threads" = "yes"; then
10942 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010945
10946 fi
10947
10948 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10949 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010950 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010951$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010952
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010953 ;;
10954 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010956
10957 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010958 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010959$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010960
10961 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010962 esac
10963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10965$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010966 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010968else
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010970 ac_cv_pthread_system_supported=no
10971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010973/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010974
10975 #include <stdio.h>
10976 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010977 void *foo(void *parm) {
10978 return NULL;
10979 }
10980 main() {
10981 pthread_attr_t attr;
10982 pthread_t id;
10983 if (pthread_attr_init(&attr)) exit(-1);
10984 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10985 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10986 exit(0);
10987 }
10988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010989if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010990 ac_cv_pthread_system_supported=yes
10991else
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010996fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998
Guido van Rossum627b2d71993-12-24 10:39:16 +000010999fi
11000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11002$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011003 if test "$ac_cv_pthread_system_supported" = "yes"; then
11004
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011006
11007 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 for ac_func in pthread_sigmask
11009do :
11010 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011011if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011012 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011013#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011014_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011015 case $ac_sys_system in
11016 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011019
11020 ;;
11021 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011022fi
11023done
11024
pdoxe14679c2017-10-05 00:01:56 -070011025 for ac_func in pthread_getcpuclockid
11026do :
11027 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11028if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11029 cat >>confdefs.h <<_ACEOF
11030#define HAVE_PTHREAD_GETCPUCLOCKID 1
11031_ACEOF
11032
11033fi
11034done
11035
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011036fi
11037
11038
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011039# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11042$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011044if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11048$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011049 ipv6=no
11050 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11052$as_echo "yes" >&6; }
11053 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011054
11055 ipv6=yes
11056 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058else
Martin v. Löwis11437992002-04-12 09:54:03 +000011059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011061/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011062 /* AF_INET6 available check */
11063#include <sys/types.h>
11064#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011065int
11066main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011068int domain = AF_INET6;
11069 ;
11070 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071}
Martin v. Löwis11437992002-04-12 09:54:03 +000011072_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011073if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011074
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11076$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011078
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079else
Matthias Kloseb159a552010-04-25 21:00:44 +000011080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011083 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011087
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011088if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11090$as_echo_n "checking if RFC2553 API is available... " >&6; }
11091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011092/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011093
11094 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011095#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011096int
11097main ()
11098{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011099struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011100 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 ;
11102 return 0;
11103}
Matthias Kloseb159a552010-04-25 21:00:44 +000011104
Martin v. Löwis11437992002-04-12 09:54:03 +000011105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011106if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011107
11108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011110 ipv6=yes
11111
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011112else
Matthias Kloseb159a552010-04-25 21:00:44 +000011113
11114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011115$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011116 ipv6=no
11117
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011120fi
11121
11122if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011124
11125fi
11126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011127fi
11128
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129
11130ipv6type=unknown
11131ipv6lib=none
11132ipv6trylibc=no
11133
11134if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11136$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011137 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11138 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139 case $i in
11140 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011142/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011143
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144#include <netinet/in.h>
11145#ifdef IPV6_INRIA_VERSION
11146yes
11147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011148_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011151 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011153rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011154
11155 ;;
11156 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011158/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011159
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160#include <netinet/in.h>
11161#ifdef __KAME__
11162yes
11163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011164_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167 ipv6type=$i;
11168 ipv6lib=inet6
11169 ipv6libdir=/usr/local/v6/lib
11170 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011171fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011172rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011173
11174 ;;
11175 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011178
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011179#include <features.h>
11180#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11181yes
11182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011183_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011185 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186 ipv6type=$i;
11187 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011188fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011189rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011190
11191 ;;
11192 linux-inet6)
11193 if test -d /usr/inet6; then
11194 ipv6type=$i
11195 ipv6lib=inet6
11196 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011197 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011198 fi
11199 ;;
11200 solaris)
11201 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011202 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011203 ipv6type=$i
11204 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011205 fi
11206 fi
11207 ;;
11208 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011210/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011211
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011212#include <sys/param.h>
11213#ifdef _TOSHIBA_INET6
11214yes
11215#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011216_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011218 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011219 ipv6type=$i;
11220 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011221 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011222fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011223rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011224
11225 ;;
11226 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011228/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011229
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011230#include </usr/local/v6/include/sys/v6config.h>
11231#ifdef __V6D__
11232yes
11233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011234_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011236 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011237 ipv6type=$i;
11238 ipv6lib=v6;
11239 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011240 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011241fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011242rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011243
11244 ;;
11245 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011247/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011248
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011249#include <sys/param.h>
11250#ifdef _ZETA_MINAMI_INET6
11251yes
11252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011253_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011256 ipv6type=$i;
11257 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011258 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011260rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011261
11262 ;;
11263 esac
11264 if test "$ipv6type" != "unknown"; then
11265 break
11266 fi
11267 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11269$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011270fi
11271
11272if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11273 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11274 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11275 echo "using lib$ipv6lib"
11276 else
11277 if test $ipv6trylibc = "yes"; then
11278 echo "using libc"
11279 else
11280 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11281 echo "You need to fetch lib$ipv6lib.a from appropriate"
11282 echo 'ipv6 kit and compile beforehand.'
11283 exit 1
11284 fi
11285 fi
11286fi
11287
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11289$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11291/* end confdefs.h. */
11292 /* CAN_RAW_FD_FRAMES available check */
11293#include <linux/can/raw.h>
11294int
11295main ()
11296{
11297int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11298 ;
11299 return 0;
11300}
11301_ACEOF
11302if ac_fn_c_try_compile "$LINENO"; then :
11303
11304
11305$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11306
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11308$as_echo "yes" >&6; }
11309
11310else
11311
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
11314
11315fi
11316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11317
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011318# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11320$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011322# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011323if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011324 withval=$with_doc_strings;
11325fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011326
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011327
11328if test -z "$with_doc_strings"
11329then with_doc_strings="yes"
11330fi
11331if test "$with_doc_strings" != "no"
11332then
11333
Matthias Kloseb9621712010-04-24 17:59:49 +000011334$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011335
11336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11338$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011339
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011340# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11342$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011345if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011346 withval=$with_pymalloc;
11347fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011348
Neil Schemenauera35c6882001-02-27 04:45:05 +000011349
Neil Schemenauer16c22972002-03-22 15:34:49 +000011350if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011351then
11352 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011353fi
11354if test "$with_pymalloc" != "no"
11355then
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011358
11359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11361$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011362
Nick Coghlan6ea41862017-06-11 13:16:15 +100011363# Check for --with-c-locale-coercion
11364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11365$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11366
11367# Check whether --with-c-locale-coercion was given.
11368if test "${with_c_locale_coercion+set}" = set; then :
11369 withval=$with_c_locale_coercion;
11370fi
11371
11372
11373if test -z "$with_c_locale_coercion"
11374then
11375 with_c_locale_coercion="yes"
11376fi
11377if test "$with_c_locale_coercion" != "no"
11378then
11379
11380$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11381
11382fi
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11384$as_echo "$with_c_locale_coercion" >&6; }
11385
Benjamin Peterson05159c42009-12-03 03:01:27 +000011386# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11388$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011389
11390# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011391if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011392 withval=$with_valgrind;
11393else
11394 with_valgrind=no
11395fi
11396
Matthias Kloseb9621712010-04-24 17:59:49 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11398$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011399if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 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 +020011401if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011404
11405else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011406 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011407
11408fi
11409
11410
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011411 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011412fi
11413
Łukasz Langaa785c872016-09-09 17:37:37 -070011414# Check for DTrace support
11415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11416$as_echo_n "checking for --with-dtrace... " >&6; }
11417
11418# Check whether --with-dtrace was given.
11419if test "${with_dtrace+set}" = set; then :
11420 withval=$with_dtrace;
11421else
11422 with_dtrace=no
11423fi
11424
11425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11426$as_echo "$with_dtrace" >&6; }
11427
11428
11429
11430
11431
11432DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011433DTRACE_HEADERS=
11434DTRACE_OBJS=
11435
11436if test "$with_dtrace" = "yes"
11437then
11438 # Extract the first word of "dtrace", so it can be a program name with args.
11439set dummy dtrace; ac_word=$2
11440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11441$as_echo_n "checking for $ac_word... " >&6; }
11442if ${ac_cv_path_DTRACE+:} false; then :
11443 $as_echo_n "(cached) " >&6
11444else
11445 case $DTRACE in
11446 [\\/]* | ?:[\\/]*)
11447 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11448 ;;
11449 *)
11450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11451for as_dir in $PATH
11452do
11453 IFS=$as_save_IFS
11454 test -z "$as_dir" && as_dir=.
11455 for ac_exec_ext in '' $ac_executable_extensions; do
11456 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11457 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11459 break 2
11460 fi
11461done
11462 done
11463IFS=$as_save_IFS
11464
11465 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11466 ;;
11467esac
11468fi
11469DTRACE=$ac_cv_path_DTRACE
11470if test -n "$DTRACE"; then
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11472$as_echo "$DTRACE" >&6; }
11473else
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11475$as_echo "no" >&6; }
11476fi
11477
11478
11479 if test "$DTRACE" = "not found"; then
11480 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11481 fi
11482
11483$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11484
11485 DTRACE_HEADERS="Include/pydtrace_probes.h"
11486
11487 # On OS X, DTrace providers do not need to be explicitly compiled and
11488 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11489 # generation flag '-G'. We check for presence of this flag, rather than
11490 # hardcoding support by OS, in the interest of robustness.
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11492$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11493if ${ac_cv_dtrace_link+:} false; then :
11494 $as_echo_n "(cached) " >&6
11495else
11496 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011497 echo 'BEGIN{}' > conftest.d
David Carlieraabdeb72020-01-28 12:53:32 +000011498 "$DTRACE" "$DFLAGS" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011499 ac_cv_dtrace_link=yes
11500
11501fi
11502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11503$as_echo "$ac_cv_dtrace_link" >&6; }
11504 if test "$ac_cv_dtrace_link" = "yes"; then
11505 DTRACE_OBJS="Python/pydtrace.o"
11506 fi
11507fi
11508
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011509# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011510
Guido van Rossum98935bf2001-09-05 19:13:16 +000011511DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011512
Guido van Rossume97ee181999-12-20 21:27:22 +000011513# the dlopen() function means we might want to use dynload_shlib.o. some
11514# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011515for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011516do :
11517 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011518if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011520#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011521_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011522
Guido van Rossume97ee181999-12-20 21:27:22 +000011523fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011524done
Guido van Rossume97ee181999-12-20 21:27:22 +000011525
Michael W. Hudson54241132001-12-07 15:38:26 +000011526
Guido van Rossume97ee181999-12-20 21:27:22 +000011527# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11528# loading of modules.
11529
Matthias Kloseb9621712010-04-24 17:59:49 +000011530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11531$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011532if test -z "$DYNLOADFILE"
11533then
11534 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011535 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11536 if test "$ac_cv_func_dlopen" = yes
11537 then DYNLOADFILE="dynload_shlib.o"
11538 else DYNLOADFILE="dynload_aix.o"
11539 fi
11540 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011541 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011542 *)
11543 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11544 # out any dynamic loading
11545 if test "$ac_cv_func_dlopen" = yes
11546 then DYNLOADFILE="dynload_shlib.o"
11547 else DYNLOADFILE="dynload_stub.o"
11548 fi
11549 ;;
11550 esac
11551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11553$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011554if test "$DYNLOADFILE" != "dynload_stub.o"
11555then
Martin v. Löwis11437992002-04-12 09:54:03 +000011556
Matthias Kloseb9621712010-04-24 17:59:49 +000011557$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011558
11559fi
11560
Neil Schemenauer4e425612001-06-19 15:44:15 +000011561# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11562
Michael W. Hudson54241132001-12-07 15:38:26 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11565$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011566if test -z "$MACHDEP_OBJS"
11567then
Jack Jansene578a632001-08-15 01:27:14 +000011568 MACHDEP_OBJS=$extra_machdep_objs
11569else
11570 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011571fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011572if test -z "$MACHDEP_OBJS"; then
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11574$as_echo "none" >&6; }
11575else
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11577$as_echo "$MACHDEP_OBJS" >&6; }
11578fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011579
Guido van Rossum627b2d71993-12-24 10:39:16 +000011580# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011581for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011582 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11583 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011584 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011585 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011586 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011587 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011588 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011589 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011590 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011591 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011592 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011593 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011594 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011595 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011596 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011597 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011598 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011599 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11600 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011601 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011602 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011603 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011604 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011605 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011606do :
11607 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11608ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011609if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011611#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011612_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011613
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011614fi
11615done
11616
Michael W. Hudson54241132001-12-07 15:38:26 +000011617
Benjamin Peterson40caa052018-09-12 15:52:40 -070011618# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11619# links. Some libc implementations have a stub lchmod implementation that always
11620# returns an error.
11621if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011622 for ac_func in lchmod
11623do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011624 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11625if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011626 cat >>confdefs.h <<_ACEOF
11627#define HAVE_LCHMOD 1
11628_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011629
11630fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011631done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011632
11633fi
11634
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011635ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11636 #include <dirent.h>
11637"
11638if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11639
11640$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11641
11642fi
11643
11644
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011645# For some functions, having a definition is not sufficient, since
11646# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11648$as_echo_n "checking for chroot... " >&6; }
11649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011650/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011651#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011652int
11653main ()
11654{
11655void *x=chroot
11656 ;
11657 return 0;
11658}
11659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011661
Matthias Kloseb9621712010-04-24 17:59:49 +000011662$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011663
Matthias Kloseb159a552010-04-25 21:00:44 +000011664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011665$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011666else
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11668$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011669
11670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11673$as_echo_n "checking for link... " >&6; }
11674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011675/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011676#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011677int
11678main ()
11679{
11680void *x=link
11681 ;
11682 return 0;
11683}
11684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011685if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011686
Matthias Kloseb9621712010-04-24 17:59:49 +000011687$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011688
Matthias Kloseb159a552010-04-25 21:00:44 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011690$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011691else
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11693$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011694
11695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11698$as_echo_n "checking for symlink... " >&6; }
11699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011700/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011701#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011702int
11703main ()
11704{
11705void *x=symlink
11706 ;
11707 return 0;
11708}
11709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011711
Matthias Kloseb9621712010-04-24 17:59:49 +000011712$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011713
Matthias Kloseb159a552010-04-25 21:00:44 +000011714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011715$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011716else
Matthias Kloseb9621712010-04-24 17:59:49 +000011717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11718$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011719
11720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11723$as_echo_n "checking for fchdir... " >&6; }
11724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011725/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011726#include <unistd.h>
11727int
11728main ()
11729{
11730void *x=fchdir
11731 ;
11732 return 0;
11733}
11734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011735if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011736
Matthias Kloseb9621712010-04-24 17:59:49 +000011737$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011738
Matthias Kloseb159a552010-04-25 21:00:44 +000011739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011740$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011741else
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11743$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011744
11745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11748$as_echo_n "checking for fsync... " >&6; }
11749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011750/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011751#include <unistd.h>
11752int
11753main ()
11754{
11755void *x=fsync
11756 ;
11757 return 0;
11758}
11759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011761
Matthias Kloseb9621712010-04-24 17:59:49 +000011762$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011763
Matthias Kloseb159a552010-04-25 21:00:44 +000011764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011765$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011766else
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11768$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011769
11770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11773$as_echo_n "checking for fdatasync... " >&6; }
11774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011775/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011776#include <unistd.h>
11777int
11778main ()
11779{
11780void *x=fdatasync
11781 ;
11782 return 0;
11783}
11784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011785if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011786
Matthias Kloseb9621712010-04-24 17:59:49 +000011787$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011788
Matthias Kloseb159a552010-04-25 21:00:44 +000011789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011790$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011791else
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11793$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011794
11795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11798$as_echo_n "checking for epoll... " >&6; }
11799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011800/* end confdefs.h. */
11801#include <sys/epoll.h>
11802int
11803main ()
11804{
11805void *x=epoll_create
11806 ;
11807 return 0;
11808}
11809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011810if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011811
Matthias Kloseb9621712010-04-24 17:59:49 +000011812$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011813
Matthias Kloseb159a552010-04-25 21:00:44 +000011814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011815$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11818$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011819
11820fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11823$as_echo_n "checking for epoll_create1... " >&6; }
11824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11825/* end confdefs.h. */
11826#include <sys/epoll.h>
11827int
11828main ()
11829{
11830void *x=epoll_create1
11831 ;
11832 return 0;
11833}
11834_ACEOF
11835if ac_fn_c_try_compile "$LINENO"; then :
11836
11837$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11838
11839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11840$as_echo "yes" >&6; }
11841else
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11843$as_echo "no" >&6; }
11844
11845fi
11846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11848$as_echo_n "checking for kqueue... " >&6; }
11849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011850/* end confdefs.h. */
11851
11852#include <sys/types.h>
11853#include <sys/event.h>
11854
11855int
11856main ()
11857{
11858int x=kqueue()
11859 ;
11860 return 0;
11861}
11862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011863if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011866
Matthias Kloseb159a552010-04-25 21:00:44 +000011867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011868$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011869else
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11871$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011872
11873fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11876$as_echo_n "checking for prlimit... " >&6; }
11877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11878/* end confdefs.h. */
11879
11880#include <sys/time.h>
11881#include <sys/resource.h>
11882
11883int
11884main ()
11885{
11886void *x=prlimit
11887 ;
11888 return 0;
11889}
11890_ACEOF
11891if ac_fn_c_try_compile "$LINENO"; then :
11892
11893$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11894
11895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11896$as_echo "yes" >&6; }
11897else
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11899$as_echo "no" >&6; }
11900
11901fi
11902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11903
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11905$as_echo_n "checking for memfd_create... " >&6; }
11906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11907/* end confdefs.h. */
11908
11909#ifdef HAVE_SYS_MMAN_H
11910#include <sys/mman.h>
11911#endif
11912#ifdef HAVE_SYS_MEMFD_H
11913#include <sys/memfd.h>
11914#endif
11915
11916int
11917main ()
11918{
11919void *x=memfd_create
11920 ;
11921 return 0;
11922}
11923_ACEOF
11924if ac_fn_c_try_compile "$LINENO"; then :
11925
11926$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11927
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11929$as_echo "yes" >&6; }
11930else
11931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11932$as_echo "no" >&6; }
11933
11934fi
11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11936
Martin v. Löwisd5843682002-11-21 20:41:28 +000011937# On some systems (eg. FreeBSD 5), we would find a definition of the
11938# functions ctermid_r, setgroups in the library, but no prototype
11939# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11940# address to avoid compiler warnings and potential miscompilations
11941# because of the missing prototypes.
11942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11944$as_echo_n "checking for ctermid_r... " >&6; }
11945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011946/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011947
Martin v. Löwisd5843682002-11-21 20:41:28 +000011948#include <stdio.h>
11949
Martin v. Löwisd5843682002-11-21 20:41:28 +000011950int
11951main ()
11952{
11953void* p = ctermid_r
11954 ;
11955 return 0;
11956}
11957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011961
Matthias Kloseb159a552010-04-25 21:00:44 +000011962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011963$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011964else
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11966$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011967
11968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11970
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11972$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011973if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011974 $as_echo_n "(cached) " >&6
11975else
11976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011977/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011978#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011979int
11980main ()
11981{
11982void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011983
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011984 ;
11985 return 0;
11986}
11987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011989 ac_cv_flock_decl=yes
11990else
11991 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011992
11993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011995
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011996fi
11997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11998$as_echo "$ac_cv_flock_decl" >&6; }
11999if test "x${ac_cv_flock_decl}" = xyes; then
12000 for ac_func in flock
12001do :
12002 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012003if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012004 cat >>confdefs.h <<_ACEOF
12005#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012006_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012007
Antoine Pitroua3000072010-09-07 14:52:42 +000012008else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012010$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012011if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012012 $as_echo_n "(cached) " >&6
12013else
12014 ac_check_lib_save_LIBS=$LIBS
12015LIBS="-lbsd $LIBS"
12016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12017/* end confdefs.h. */
12018
12019/* Override any GCC internal prototype to avoid an error.
12020 Use char because int might match the return type of a GCC
12021 builtin and then its argument prototype would still apply. */
12022#ifdef __cplusplus
12023extern "C"
12024#endif
12025char flock ();
12026int
12027main ()
12028{
12029return flock ();
12030 ;
12031 return 0;
12032}
12033_ACEOF
12034if ac_fn_c_try_link "$LINENO"; then :
12035 ac_cv_lib_bsd_flock=yes
12036else
12037 ac_cv_lib_bsd_flock=no
12038fi
12039rm -f core conftest.err conftest.$ac_objext \
12040 conftest$ac_exeext conftest.$ac_ext
12041LIBS=$ac_check_lib_save_LIBS
12042fi
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12044$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012045if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012046 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012047
12048
12049$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12050
12051
12052fi
12053
12054
12055fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012056done
12057
Antoine Pitroua3000072010-09-07 14:52:42 +000012058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12061$as_echo_n "checking for getpagesize... " >&6; }
12062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012064
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012065#include <unistd.h>
12066
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012067int
12068main ()
12069{
12070void* p = getpagesize
12071 ;
12072 return 0;
12073}
12074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012075if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012076
Matthias Kloseb9621712010-04-24 17:59:49 +000012077$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012078
Matthias Kloseb159a552010-04-25 21:00:44 +000012079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012081else
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12083$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012084
12085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012087
Victor Stinner984890f2011-11-24 13:53:38 +010012088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12089$as_echo_n "checking for broken unsetenv... " >&6; }
12090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12091/* end confdefs.h. */
12092
12093#include <stdlib.h>
12094
12095int
12096main ()
12097{
12098int res = unsetenv("DUMMY")
12099 ;
12100 return 0;
12101}
12102_ACEOF
12103if ac_fn_c_try_compile "$LINENO"; then :
12104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12105$as_echo "no" >&6; }
12106else
12107
12108$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12109
12110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12111$as_echo "yes" >&6; }
12112
12113fi
12114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12115
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012116for ac_prog in true
12117do
12118 # Extract the first word of "$ac_prog", so it can be a program name with args.
12119set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12121$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012122if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012124else
12125 if test -n "$TRUE"; then
12126 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12127else
12128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12129for as_dir in $PATH
12130do
12131 IFS=$as_save_IFS
12132 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012135 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 $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 +000012137 break 2
12138 fi
12139done
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012141IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012142
12143fi
12144fi
12145TRUE=$ac_cv_prog_TRUE
12146if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12148$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012152fi
12153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012155 test -n "$TRUE" && break
12156done
12157test -n "$TRUE" || TRUE="/bin/true"
12158
12159
Matthias Kloseb9621712010-04-24 17:59:49 +000012160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12161$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012162if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012164else
12165 ac_check_lib_save_LIBS=$LIBS
12166LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012168/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170/* Override any GCC internal prototype to avoid an error.
12171 Use char because int might match the return type of a GCC
12172 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012173#ifdef __cplusplus
12174extern "C"
12175#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012176char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012177int
12178main ()
12179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012180return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012181 ;
12182 return 0;
12183}
12184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012186 ac_cv_lib_c_inet_aton=yes
12187else
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012190rm -f core conftest.err conftest.$ac_objext \
12191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012192LIBS=$ac_check_lib_save_LIBS
12193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12195$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012196if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012197 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12200$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012201if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012203else
12204 ac_check_lib_save_LIBS=$LIBS
12205LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012207/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209/* Override any GCC internal prototype to avoid an error.
12210 Use char because int might match the return type of a GCC
12211 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012212#ifdef __cplusplus
12213extern "C"
12214#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012215char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012216int
12217main ()
12218{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012219return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012220 ;
12221 return 0;
12222}
12223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012224if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012225 ac_cv_lib_resolv_inet_aton=yes
12226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012229rm -f core conftest.err conftest.$ac_objext \
12230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012231LIBS=$ac_check_lib_save_LIBS
12232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12234$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012235if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012236 cat >>confdefs.h <<_ACEOF
12237#define HAVE_LIBRESOLV 1
12238_ACEOF
12239
12240 LIBS="-lresolv $LIBS"
12241
12242fi
12243
12244
12245fi
12246
12247
Christian Heimesd0764e22007-12-04 15:00:33 +000012248# On Tru64, chflags seems to be present, but calling it will
12249# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12251$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012252if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012254else
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012256 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012257else
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012259/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012260
Christian Heimesd0764e22007-12-04 15:00:33 +000012261#include <sys/stat.h>
12262#include <unistd.h>
12263int main(int argc, char*argv[])
12264{
12265 if(chflags(argv[0], 0) != 0)
12266 return 1;
12267 return 0;
12268}
Ned Deily3eb67d52011-06-28 00:00:28 -070012269
Christian Heimesd0764e22007-12-04 15:00:33 +000012270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012272 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12277 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012278fi
12279
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012280
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12283$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012284if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012286if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012287 ac_cv_have_chflags="yes"
12288else
12289 ac_cv_have_chflags="no"
12290fi
12291
12292fi
12293if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012296
12297fi
12298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12300$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012301if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012305 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012306else
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012308/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012309
Christian Heimesd0764e22007-12-04 15:00:33 +000012310#include <sys/stat.h>
12311#include <unistd.h>
12312int main(int argc, char*argv[])
12313{
12314 if(lchflags(argv[0], 0) != 0)
12315 return 1;
12316 return 0;
12317}
Ned Deily3eb67d52011-06-28 00:00:28 -070012318
Christian Heimesd0764e22007-12-04 15:00:33 +000012319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012320if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012321 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012322else
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12326 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012327fi
12328
12329
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12332$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012333if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012335if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012336 ac_cv_have_lchflags="yes"
12337else
12338 ac_cv_have_lchflags="no"
12339fi
12340
12341fi
12342if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012345
12346fi
12347
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012348case $ac_sys_system/$ac_sys_release in
12349Darwin/*)
12350 _CUR_CFLAGS="${CFLAGS}"
12351 _CUR_LDFLAGS="${LDFLAGS}"
12352 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12353 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12354 ;;
12355esac
12356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12358$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012359if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012361else
12362 ac_check_lib_save_LIBS=$LIBS
12363LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012365/* end confdefs.h. */
12366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367/* Override any GCC internal prototype to avoid an error.
12368 Use char because int might match the return type of a GCC
12369 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012370#ifdef __cplusplus
12371extern "C"
12372#endif
12373char inflateCopy ();
12374int
12375main ()
12376{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012378 ;
12379 return 0;
12380}
12381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012382if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012383 ac_cv_lib_z_inflateCopy=yes
12384else
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012387rm -f core conftest.err conftest.$ac_objext \
12388 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012389LIBS=$ac_check_lib_save_LIBS
12390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12392$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012393if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012394
Matthias Kloseb9621712010-04-24 17:59:49 +000012395$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012396
12397fi
12398
12399
12400case $ac_sys_system/$ac_sys_release in
12401Darwin/*)
12402 CFLAGS="${_CUR_CFLAGS}"
12403 LDFLAGS="${_CUR_LDFLAGS}"
12404 ;;
12405esac
12406
Matthias Kloseb9621712010-04-24 17:59:49 +000012407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12408$as_echo_n "checking for hstrerror... " >&6; }
12409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012410/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012411
Martin v. Löwise9416172003-05-03 10:12:45 +000012412#include <netdb.h>
12413
Martin v. Löwise9416172003-05-03 10:12:45 +000012414int
12415main ()
12416{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012417void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012418 ;
12419 return 0;
12420}
12421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012425
Matthias Kloseb159a552010-04-25 21:00:44 +000012426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012427$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012428else
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12430$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012431
12432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012433rm -f core conftest.err conftest.$ac_objext \
12434 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12437$as_echo_n "checking for inet_aton... " >&6; }
12438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012439/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012440
Martin v. Löwis86d66262006-02-17 08:40:11 +000012441#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012442#include <sys/socket.h>
12443#include <netinet/in.h>
12444#include <arpa/inet.h>
12445
Martin v. Löwise9416172003-05-03 10:12:45 +000012446int
12447main ()
12448{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012449void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012450 ;
12451 return 0;
12452}
12453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012454if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012455
Matthias Kloseb9621712010-04-24 17:59:49 +000012456$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012457
Matthias Kloseb159a552010-04-25 21:00:44 +000012458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012459$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012460else
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12462$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012463
12464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012465rm -f core conftest.err conftest.$ac_objext \
12466 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12469$as_echo_n "checking for inet_pton... " >&6; }
12470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012472
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012473#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012474#include <sys/socket.h>
12475#include <netinet/in.h>
12476#include <arpa/inet.h>
12477
Martin v. Löwise9416172003-05-03 10:12:45 +000012478int
12479main ()
12480{
12481void* p = inet_pton
12482 ;
12483 return 0;
12484}
12485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012489
Matthias Kloseb159a552010-04-25 21:00:44 +000012490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012491$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012492else
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12494$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012495
12496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012498
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012499# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12501$as_echo_n "checking for setgroups... " >&6; }
12502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012503/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012504
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012505#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012506#ifdef HAVE_GRP_H
12507#include <grp.h>
12508#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012509
Martin v. Löwisd5843682002-11-21 20:41:28 +000012510int
12511main ()
12512{
12513void* p = setgroups
12514 ;
12515 return 0;
12516}
12517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012519
Matthias Kloseb9621712010-04-24 17:59:49 +000012520$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012521
Matthias Kloseb159a552010-04-25 21:00:44 +000012522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012523$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012524else
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12526$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012527
12528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012530
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012531# check for openpty and forkpty
12532
12533for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012534do :
12535 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012536if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012539_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012540
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012541else
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12543$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012544if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012545 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012546else
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012548LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012552/* Override any GCC internal prototype to avoid an error.
12553 Use char because int might match the return type of a GCC
12554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012555#ifdef __cplusplus
12556extern "C"
12557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012558char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012559int
12560main ()
12561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012563 ;
12564 return 0;
12565}
12566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012569else
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012572rm -f core conftest.err conftest.$ac_objext \
12573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012574LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12577$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012578if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012580 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012581else
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12583$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012584if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012585 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012586else
12587 ac_check_lib_save_LIBS=$LIBS
12588LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012590/* end confdefs.h. */
12591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592/* Override any GCC internal prototype to avoid an error.
12593 Use char because int might match the return type of a GCC
12594 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012595#ifdef __cplusplus
12596extern "C"
12597#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012598char openpty ();
12599int
12600main ()
12601{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012603 ;
12604 return 0;
12605}
12606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012607if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012608 ac_cv_lib_bsd_openpty=yes
12609else
Matthias Kloseb9621712010-04-24 17:59:49 +000012610 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012611fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012612rm -f core conftest.err conftest.$ac_objext \
12613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012614LIBS=$ac_check_lib_save_LIBS
12615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12617$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012618if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012619 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012620 LIBS="$LIBS -lbsd"
12621fi
12622
12623
12624fi
12625
Fred Drake8cef4cf2000-06-28 16:40:38 +000012626
12627fi
12628done
12629
12630for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012631do :
12632 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012633if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012635#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012636_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012637
Fred Drake8cef4cf2000-06-28 16:40:38 +000012638else
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12640$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012641if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012642 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012643else
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012645LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649/* Override any GCC internal prototype to avoid an error.
12650 Use char because int might match the return type of a GCC
12651 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012652#ifdef __cplusplus
12653extern "C"
12654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012655char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012656int
12657main ()
12658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 ;
12661 return 0;
12662}
12663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012666else
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012669rm -f core conftest.err conftest.$ac_objext \
12670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012671LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12674$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012675if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012677 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012678else
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12680$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012681if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012683else
12684 ac_check_lib_save_LIBS=$LIBS
12685LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012687/* end confdefs.h. */
12688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689/* Override any GCC internal prototype to avoid an error.
12690 Use char because int might match the return type of a GCC
12691 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012692#ifdef __cplusplus
12693extern "C"
12694#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012695char forkpty ();
12696int
12697main ()
12698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012700 ;
12701 return 0;
12702}
12703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012705 ac_cv_lib_bsd_forkpty=yes
12706else
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012709rm -f core conftest.err conftest.$ac_objext \
12710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012711LIBS=$ac_check_lib_save_LIBS
12712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12714$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012715if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012717 LIBS="$LIBS -lbsd"
12718fi
12719
12720
12721fi
12722
Fred Drake8cef4cf2000-06-28 16:40:38 +000012723
12724fi
12725done
12726
Jack Jansendd19cf82001-12-06 22:36:17 +000012727
Michael W. Hudson54241132001-12-07 15:38:26 +000012728# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012729for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012730do :
12731 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12732ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012733if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012734 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012735#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012736_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012738fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012739done
12740
Michael W. Hudson54241132001-12-07 15:38:26 +000012741
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012742ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012743if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012744 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012745
Martin v. Löwis1142de32002-03-29 16:28:31 +000012746else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012748 *" dup2.$ac_objext "* ) ;;
12749 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012750 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012751esac
12752
Martin v. Löwis1142de32002-03-29 16:28:31 +000012753fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012754
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012755ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012756if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012757 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12758
12759else
12760 case " $LIBOBJS " in
12761 *" strdup.$ac_objext "* ) ;;
12762 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12763 ;;
12764esac
12765
12766fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012767
12768
12769for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012770do :
12771 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012772if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012774#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012777/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012778#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012779int
12780main ()
12781{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012782getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 ;
12784 return 0;
12785}
12786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
Matthias Kloseb9621712010-04-24 17:59:49 +000012789$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012790
Guido van Rossum627b2d71993-12-24 10:39:16 +000012791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012793
Guido van Rossum627b2d71993-12-24 10:39:16 +000012794fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012795done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012796
Jack Jansen150753c2003-03-29 22:07:47 +000012797for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012798do :
12799 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012800if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012801 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012802#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012805/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012806#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012807int
12808main ()
12809{
12810setpgrp(0,0);
12811 ;
12812 return 0;
12813}
12814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012815if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
Matthias Kloseb9621712010-04-24 17:59:49 +000012817$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012818
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012821
12822fi
12823done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012824
Michael W. Hudson54241132001-12-07 15:38:26 +000012825
Gregory P. Smith387512c2018-12-30 15:42:32 -080012826# We search for both crypt and crypt_r as one or the other may be defined
12827# This gets us our -lcrypt in LIBS when required on the target platform.
12828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12829$as_echo_n "checking for library containing crypt... " >&6; }
12830if ${ac_cv_search_crypt+:} false; then :
12831 $as_echo_n "(cached) " >&6
12832else
12833 ac_func_search_save_LIBS=$LIBS
12834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12835/* end confdefs.h. */
12836
12837/* Override any GCC internal prototype to avoid an error.
12838 Use char because int might match the return type of a GCC
12839 builtin and then its argument prototype would still apply. */
12840#ifdef __cplusplus
12841extern "C"
12842#endif
12843char crypt ();
12844int
12845main ()
12846{
12847return crypt ();
12848 ;
12849 return 0;
12850}
12851_ACEOF
12852for ac_lib in '' crypt; do
12853 if test -z "$ac_lib"; then
12854 ac_res="none required"
12855 else
12856 ac_res=-l$ac_lib
12857 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12858 fi
12859 if ac_fn_c_try_link "$LINENO"; then :
12860 ac_cv_search_crypt=$ac_res
12861fi
12862rm -f core conftest.err conftest.$ac_objext \
12863 conftest$ac_exeext
12864 if ${ac_cv_search_crypt+:} false; then :
12865 break
12866fi
12867done
12868if ${ac_cv_search_crypt+:} false; then :
12869
12870else
12871 ac_cv_search_crypt=no
12872fi
12873rm conftest.$ac_ext
12874LIBS=$ac_func_search_save_LIBS
12875fi
12876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12877$as_echo "$ac_cv_search_crypt" >&6; }
12878ac_res=$ac_cv_search_crypt
12879if test "$ac_res" != no; then :
12880 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12881
12882fi
12883
12884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12885$as_echo_n "checking for library containing crypt_r... " >&6; }
12886if ${ac_cv_search_crypt_r+:} false; then :
12887 $as_echo_n "(cached) " >&6
12888else
12889 ac_func_search_save_LIBS=$LIBS
12890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12891/* end confdefs.h. */
12892
12893/* Override any GCC internal prototype to avoid an error.
12894 Use char because int might match the return type of a GCC
12895 builtin and then its argument prototype would still apply. */
12896#ifdef __cplusplus
12897extern "C"
12898#endif
12899char crypt_r ();
12900int
12901main ()
12902{
12903return crypt_r ();
12904 ;
12905 return 0;
12906}
12907_ACEOF
12908for ac_lib in '' crypt; do
12909 if test -z "$ac_lib"; then
12910 ac_res="none required"
12911 else
12912 ac_res=-l$ac_lib
12913 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12914 fi
12915 if ac_fn_c_try_link "$LINENO"; then :
12916 ac_cv_search_crypt_r=$ac_res
12917fi
12918rm -f core conftest.err conftest.$ac_objext \
12919 conftest$ac_exeext
12920 if ${ac_cv_search_crypt_r+:} false; then :
12921 break
12922fi
12923done
12924if ${ac_cv_search_crypt_r+:} false; then :
12925
12926else
12927 ac_cv_search_crypt_r=no
12928fi
12929rm conftest.$ac_ext
12930LIBS=$ac_func_search_save_LIBS
12931fi
12932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12933$as_echo "$ac_cv_search_crypt_r" >&6; }
12934ac_res=$ac_cv_search_crypt_r
12935if test "$ac_res" != no; then :
12936 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12937
12938fi
12939
12940
12941ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12942if test "x$ac_cv_func_crypt_r" = xyes; then :
12943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12944/* end confdefs.h. */
12945
12946#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12947#include <crypt.h>
12948
12949int
12950main ()
12951{
12952
12953struct crypt_data d;
12954char *r = crypt_r("", "", &d);
12955
12956 ;
12957 return 0;
12958}
12959_ACEOF
12960if ac_fn_c_try_compile "$LINENO"; then :
12961
12962$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12963
12964fi
12965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12966
12967fi
12968
12969
Victor Stinnere0be4232011-10-25 13:06:09 +020012970for ac_func in clock_gettime
12971do :
12972 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12973if test "x$ac_cv_func_clock_gettime" = xyes; then :
12974 cat >>confdefs.h <<_ACEOF
12975#define HAVE_CLOCK_GETTIME 1
12976_ACEOF
12977
12978else
12979
12980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12981$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12982if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12983 $as_echo_n "(cached) " >&6
12984else
12985 ac_check_lib_save_LIBS=$LIBS
12986LIBS="-lrt $LIBS"
12987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12988/* end confdefs.h. */
12989
12990/* Override any GCC internal prototype to avoid an error.
12991 Use char because int might match the return type of a GCC
12992 builtin and then its argument prototype would still apply. */
12993#ifdef __cplusplus
12994extern "C"
12995#endif
12996char clock_gettime ();
12997int
12998main ()
12999{
13000return clock_gettime ();
13001 ;
13002 return 0;
13003}
13004_ACEOF
13005if ac_fn_c_try_link "$LINENO"; then :
13006 ac_cv_lib_rt_clock_gettime=yes
13007else
13008 ac_cv_lib_rt_clock_gettime=no
13009fi
13010rm -f core conftest.err conftest.$ac_objext \
13011 conftest$ac_exeext conftest.$ac_ext
13012LIBS=$ac_check_lib_save_LIBS
13013fi
13014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13015$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13016if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13017
Victor Stinner7efb8332014-08-29 15:41:08 +020013018 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013019 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13020
13021
13022$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13023
13024
13025fi
13026
13027
13028fi
13029done
13030
13031
13032for ac_func in clock_getres
13033do :
13034 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13035if test "x$ac_cv_func_clock_getres" = xyes; then :
13036 cat >>confdefs.h <<_ACEOF
13037#define HAVE_CLOCK_GETRES 1
13038_ACEOF
13039
13040else
13041
13042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13043$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13044if ${ac_cv_lib_rt_clock_getres+:} false; then :
13045 $as_echo_n "(cached) " >&6
13046else
13047 ac_check_lib_save_LIBS=$LIBS
13048LIBS="-lrt $LIBS"
13049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13050/* end confdefs.h. */
13051
13052/* Override any GCC internal prototype to avoid an error.
13053 Use char because int might match the return type of a GCC
13054 builtin and then its argument prototype would still apply. */
13055#ifdef __cplusplus
13056extern "C"
13057#endif
13058char clock_getres ();
13059int
13060main ()
13061{
13062return clock_getres ();
13063 ;
13064 return 0;
13065}
13066_ACEOF
13067if ac_fn_c_try_link "$LINENO"; then :
13068 ac_cv_lib_rt_clock_getres=yes
13069else
13070 ac_cv_lib_rt_clock_getres=no
13071fi
13072rm -f core conftest.err conftest.$ac_objext \
13073 conftest$ac_exeext conftest.$ac_ext
13074LIBS=$ac_check_lib_save_LIBS
13075fi
13076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13077$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13078if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13079
13080 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13081
13082
13083fi
13084
13085
13086fi
13087done
13088
13089
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013090for ac_func in clock_settime
13091do :
13092 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13093if test "x$ac_cv_func_clock_settime" = xyes; then :
13094 cat >>confdefs.h <<_ACEOF
13095#define HAVE_CLOCK_SETTIME 1
13096_ACEOF
13097
13098else
13099
13100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13101$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13102if ${ac_cv_lib_rt_clock_settime+:} false; then :
13103 $as_echo_n "(cached) " >&6
13104else
13105 ac_check_lib_save_LIBS=$LIBS
13106LIBS="-lrt $LIBS"
13107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13108/* end confdefs.h. */
13109
13110/* Override any GCC internal prototype to avoid an error.
13111 Use char because int might match the return type of a GCC
13112 builtin and then its argument prototype would still apply. */
13113#ifdef __cplusplus
13114extern "C"
13115#endif
13116char clock_settime ();
13117int
13118main ()
13119{
13120return clock_settime ();
13121 ;
13122 return 0;
13123}
13124_ACEOF
13125if ac_fn_c_try_link "$LINENO"; then :
13126 ac_cv_lib_rt_clock_settime=yes
13127else
13128 ac_cv_lib_rt_clock_settime=no
13129fi
13130rm -f core conftest.err conftest.$ac_objext \
13131 conftest$ac_exeext conftest.$ac_ext
13132LIBS=$ac_check_lib_save_LIBS
13133fi
13134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13135$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13136if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13137
13138 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13139
13140
13141fi
13142
13143
13144fi
13145done
13146
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13149$as_echo_n "checking for major... " >&6; }
13150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013151/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013152
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013153#if defined(MAJOR_IN_MKDEV)
13154#include <sys/mkdev.h>
13155#elif defined(MAJOR_IN_SYSMACROS)
13156#include <sys/sysmacros.h>
13157#else
13158#include <sys/types.h>
13159#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013160
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013161int
13162main ()
13163{
13164
13165 makedev(major(0),minor(0));
13166
13167 ;
13168 return 0;
13169}
13170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013172
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13177$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013178
13179else
Skip Montanaro6dead952003-09-25 14:50:04 +000013180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13182$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013183
13184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013185rm -f core conftest.err conftest.$ac_objext \
13186 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013187
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013188# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013189# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13191$as_echo_n "checking for getaddrinfo... " >&6; }
13192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013193/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013194
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013195#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013196#include <sys/socket.h>
13197#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013198#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013199
Martin v. Löwis11437992002-04-12 09:54:03 +000013200int
13201main ()
13202{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013203getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013204 ;
13205 return 0;
13206}
13207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013208if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013209 have_getaddrinfo=yes
13210else
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013213rm -f core conftest.err conftest.$ac_objext \
13214 conftest$ac_exeext conftest.$ac_ext
13215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13216$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013217if test $have_getaddrinfo = yes
13218then
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13220$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013221 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013225
13226if test "${enable_ipv6+set}" = set; then
13227 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13228else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013229 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013230fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013233/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013234
Stefan Krah19c21392012-11-22 23:47:32 +010013235#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236#include <sys/types.h>
13237#include <netdb.h>
13238#include <string.h>
13239#include <sys/socket.h>
13240#include <netinet/in.h>
13241
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013242int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243{
13244 int passive, gaierr, inet4 = 0, inet6 = 0;
13245 struct addrinfo hints, *ai, *aitop;
13246 char straddr[INET6_ADDRSTRLEN], strport[16];
13247
13248 for (passive = 0; passive <= 1; passive++) {
13249 memset(&hints, 0, sizeof(hints));
13250 hints.ai_family = AF_UNSPEC;
13251 hints.ai_flags = passive ? AI_PASSIVE : 0;
13252 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013253 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13255 (void)gai_strerror(gaierr);
13256 goto bad;
13257 }
13258 for (ai = aitop; ai; ai = ai->ai_next) {
13259 if (ai->ai_addr == NULL ||
13260 ai->ai_addrlen == 0 ||
13261 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13262 straddr, sizeof(straddr), strport, sizeof(strport),
13263 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13264 goto bad;
13265 }
13266 switch (ai->ai_family) {
13267 case AF_INET:
13268 if (strcmp(strport, "54321") != 0) {
13269 goto bad;
13270 }
13271 if (passive) {
13272 if (strcmp(straddr, "0.0.0.0") != 0) {
13273 goto bad;
13274 }
13275 } else {
13276 if (strcmp(straddr, "127.0.0.1") != 0) {
13277 goto bad;
13278 }
13279 }
13280 inet4++;
13281 break;
13282 case AF_INET6:
13283 if (strcmp(strport, "54321") != 0) {
13284 goto bad;
13285 }
13286 if (passive) {
13287 if (strcmp(straddr, "::") != 0) {
13288 goto bad;
13289 }
13290 } else {
13291 if (strcmp(straddr, "::1") != 0) {
13292 goto bad;
13293 }
13294 }
13295 inet6++;
13296 break;
13297 case AF_UNSPEC:
13298 goto bad;
13299 break;
13300 default:
13301 /* another family support? */
13302 break;
13303 }
13304 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013305 freeaddrinfo(aitop);
13306 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013307 }
13308
13309 if (!(inet4 == 0 || inet4 == 2))
13310 goto bad;
13311 if (!(inet6 == 0 || inet6 == 2))
13312 goto bad;
13313
13314 if (aitop)
13315 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013316 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013317
13318 bad:
13319 if (aitop)
13320 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013321 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013322}
13323
Martin v. Löwis11437992002-04-12 09:54:03 +000013324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013325if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13331 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013335
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13339$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13340
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013341if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013342then
13343 if test $ipv6 = yes
13344 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013345 echo 'Fatal: You must get working getaddrinfo() function.'
13346 echo ' or you can specify "--disable-ipv6"'.
13347 exit 1
13348 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013349else
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013352
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013353fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013354
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013355for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013356do :
13357 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013358if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013360#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013361_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013362
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013363fi
13364done
13365
Michael W. Hudson54241132001-12-07 15:38:26 +000013366
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013367# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13369$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013370if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013372else
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013374/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013375#include <sys/types.h>
13376#include <sys/time.h>
13377#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
Martin v. Löwis11437992002-04-12 09:54:03 +000013379int
13380main ()
13381{
13382if ((struct tm *) 0)
13383return 0;
13384 ;
13385 return 0;
13386}
13387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013388if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013390else
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13396$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013397if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013400
13401fi
13402
Matthias Kloseb9621712010-04-24 17:59:49 +000013403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13404$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013405if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013409/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410#include <sys/types.h>
13411#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413int
13414main ()
13415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416struct tm tm;
13417 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 ;
13420 return 0;
13421}
13422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013423if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013424 ac_cv_struct_tm=time.h
13425else
Matthias Kloseb9621712010-04-24 17:59:49 +000013426 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13431$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013432if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013435
13436fi
13437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438ac_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 +000013439#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441"
Victor Stinnere0be4232011-10-25 13:06:09 +020013442if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013443
13444cat >>confdefs.h <<_ACEOF
13445#define HAVE_STRUCT_TM_TM_ZONE 1
13446_ACEOF
13447
13448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013449fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454
13455else
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13457"
Victor Stinnere0be4232011-10-25 13:06:09 +020013458if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013460else
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013462fi
13463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013464cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013465#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013466_ACEOF
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13469$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013470if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013474/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013475#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013476#if !HAVE_DECL_TZNAME
13477extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013479
Martin v. Löwis11437992002-04-12 09:54:03 +000013480int
13481main ()
13482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013483return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 ;
13485 return 0;
13486}
13487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013488if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489 ac_cv_var_tzname=yes
13490else
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013493rm -f core conftest.err conftest.$ac_objext \
13494 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13497$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013498 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013501
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013502 fi
13503fi
13504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505ac_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 +020013506if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
13508cat >>confdefs.h <<_ACEOF
13509#define HAVE_STRUCT_STAT_ST_RDEV 1
13510_ACEOF
13511
13512
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013513fi
13514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515ac_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 +020013516if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013517
Martin v. Löwis11437992002-04-12 09:54:03 +000013518cat >>confdefs.h <<_ACEOF
13519#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13520_ACEOF
13521
13522
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013523fi
13524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525ac_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 +020013526if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013527
13528cat >>confdefs.h <<_ACEOF
13529#define HAVE_STRUCT_STAT_ST_FLAGS 1
13530_ACEOF
13531
13532
13533fi
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535ac_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 +020013536if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013537
13538cat >>confdefs.h <<_ACEOF
13539#define HAVE_STRUCT_STAT_ST_GEN 1
13540_ACEOF
13541
13542
13543fi
13544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545ac_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 +020013546if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013547
13548cat >>confdefs.h <<_ACEOF
13549#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13550_ACEOF
13551
13552
13553fi
13554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555ac_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 +020013556if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013557
Martin v. Löwis11437992002-04-12 09:54:03 +000013558cat >>confdefs.h <<_ACEOF
13559#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13560_ACEOF
13561
13562
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013563fi
13564
Stefan Krah267b6392016-04-26 01:09:18 +020013565ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13566 #include <sys/types.h>
13567 #include <pwd.h>
13568
13569"
13570if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13571
13572cat >>confdefs.h <<_ACEOF
13573#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13574_ACEOF
13575
13576
13577fi
13578ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13579 #include <sys/types.h>
13580 #include <pwd.h>
13581
13582"
13583if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13584
13585cat >>confdefs.h <<_ACEOF
13586#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13587_ACEOF
13588
13589
13590fi
13591
Zachary Ware6a6967e2016-10-01 00:47:27 -050013592# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13593ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13594"
13595if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13596
13597cat >>confdefs.h <<_ACEOF
13598#define HAVE_SIGINFO_T_SI_BAND 1
13599_ACEOF
13600
13601
13602fi
13603
Michael W. Hudson54241132001-12-07 15:38:26 +000013604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13606$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013607if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013609else
Matthias Kloseb159a552010-04-25 21:00:44 +000013610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013612/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013613#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013614int
13615main ()
13616{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013617return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 ;
13619 return 0;
13620}
13621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013622if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013623 ac_cv_header_time_altzone=yes
13624else
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013629fi
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13632$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013636
13637fi
13638
Guido van Rossumda88dad1995-01-26 00:46:29 +000013639was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13641$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013643/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013644
13645#include <sys/types.h>
13646#include <sys/select.h>
13647#include <sys/time.h>
13648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649int
13650main ()
13651{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013652;
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 ;
13654 return 0;
13655}
13656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013658
13659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013661
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013662 was_it_defined=yes
13663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13667$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13670$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013671if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013673else
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013675/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013676#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013677int
13678main ()
13679{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013680struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 ;
13682 return 0;
13683}
13684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013685if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013686 ac_cv_struct_addrinfo=yes
13687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13691fi
13692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13694$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013695if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013698
13699fi
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13702$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013703if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013705else
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013707/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013708
13709# include <sys/types.h>
13710# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013711int
13712main ()
13713{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013714struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 ;
13716 return 0;
13717}
13718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013719if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013720 ac_cv_struct_sockaddr_storage=yes
13721else
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13725fi
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13728$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013729if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013732
13733fi
13734
Christian Heimesdffa3942016-09-05 23:54:41 +020013735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13736$as_echo_n "checking for sockaddr_alg... " >&6; }
13737if ${ac_cv_struct_sockaddr_alg+:} false; then :
13738 $as_echo_n "(cached) " >&6
13739else
13740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13741/* end confdefs.h. */
13742
13743# include <sys/types.h>
13744# include <sys/socket.h>
13745# include <linux/if_alg.h>
13746int
13747main ()
13748{
13749struct sockaddr_alg s
13750 ;
13751 return 0;
13752}
13753_ACEOF
13754if ac_fn_c_try_compile "$LINENO"; then :
13755 ac_cv_struct_sockaddr_alg=yes
13756else
13757 ac_cv_struct_sockaddr_alg=no
13758fi
13759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13760fi
13761
13762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13763$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13764if test $ac_cv_struct_sockaddr_alg = yes; then
13765
13766$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13767
13768fi
13769
Guido van Rossum627b2d71993-12-24 10:39:16 +000013770# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13773$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013774if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013776else
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013779$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013780int
13781main ()
13782{
13783static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013784test_array [0] = 0;
13785return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013786
13787 ;
13788 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013789}
Martin v. Löwis11437992002-04-12 09:54:03 +000013790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013791if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013792 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013793else
Matthias Kloseb9621712010-04-24 17:59:49 +000013794 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13799$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013800if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802
13803fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013804
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13806$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013807if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013811/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812
Martin v. Löwis11437992002-04-12 09:54:03 +000013813int
13814main ()
13815{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013816
Martin v. Löwis11437992002-04-12 09:54:03 +000013817#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013818 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013820 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822 char const *const *pcpcc;
13823 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 /* NEC SVR4.0.2 mips cc rejects this. */
13825 struct point {int x, y;};
13826 static struct point const zero = {0,0};
13827 /* AIX XL C 1.02.0.0 rejects this.
13828 It does not let you subtract one const X* pointer from another in
13829 an arm of an if-expression whose if-part is not a constant
13830 expression */
13831 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834 ++pcpcc;
13835 ppc = (char**) pcpcc;
13836 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013837 { /* SCO 3.2v4 cc rejects this sort of thing. */
13838 char tx;
13839 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013841
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 }
13845 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13846 int x[] = {25, 17};
13847 const int *foo = &x[0];
13848 ++foo;
13849 }
13850 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13851 typedef const int *iptr;
13852 iptr p = 0;
13853 ++p;
13854 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013855 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013857 struct s { int j; const int *ap[3]; } bx;
13858 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 }
13860 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13861 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013865#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013866
Martin v. Löwis11437992002-04-12 09:54:03 +000013867 ;
13868 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013869}
Martin v. Löwis11437992002-04-12 09:54:03 +000013870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013872 ac_cv_c_const=yes
13873else
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13879$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013880if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
Matthias Kloseb9621712010-04-24 17:59:49 +000013882$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013883
13884fi
13885
Michael W. Hudson54241132001-12-07 15:38:26 +000013886
Guido van Rossumda88dad1995-01-26 00:46:29 +000013887works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13889$as_echo_n "checking for working signed char... " >&6; }
13890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013891/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013892
Martin v. Löwis11437992002-04-12 09:54:03 +000013893int
13894main ()
13895{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013896signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 ;
13898 return 0;
13899}
13900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013902 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013903else
Skip Montanaro6dead952003-09-25 14:50:04 +000013904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013906
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013907
Guido van Rossum7f43da71994-08-01 12:15:30 +000013908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13911$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013912
Guido van Rossumda88dad1995-01-26 00:46:29 +000013913have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13915$as_echo_n "checking for prototypes... " >&6; }
13916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013917/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013918int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013919int
13920main ()
13921{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013922return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 ;
13924 return 0;
13925}
13926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013927if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013930
Matthias Kloseb159a552010-04-25 21:00:44 +000013931 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13935$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013936
Guido van Rossumda88dad1995-01-26 00:46:29 +000013937works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13939$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013941/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013942
13943#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013944int foo(int x, ...) {
13945 va_list va;
13946 va_start(va, x);
13947 va_arg(va, int);
13948 va_arg(va, char *);
13949 va_arg(va, double);
13950 return 0;
13951}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013952
Martin v. Löwis11437992002-04-12 09:54:03 +000013953int
13954main ()
13955{
Guido van Rossum90eea071996-08-30 20:58:57 +000013956return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013957 ;
13958 return 0;
13959}
13960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013961if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013962
13963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013965
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013966 works=yes
13967
Guido van Rossum627b2d71993-12-24 10:39:16 +000013968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13971$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972
Martin v. Löwisd6320502004-08-12 13:45:08 +000013973# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13975$as_echo_n "checking for socketpair... " >&6; }
13976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013977/* end confdefs.h. */
13978
13979#include <sys/types.h>
13980#include <sys/socket.h>
13981
13982int
13983main ()
13984{
13985void *x=socketpair
13986 ;
13987 return 0;
13988}
13989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013990if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013993
Matthias Kloseb159a552010-04-25 21:00:44 +000013994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013995$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013996else
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13998$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013999
14000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014002
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014003# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14005$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014007/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014008#include <sys/types.h>
14009#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014010int
14011main ()
14012{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014013struct sockaddr x;
14014x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014015 ;
14016 return 0;
14017}
14018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014019if ac_fn_c_try_compile "$LINENO"; then :
14020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14021$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014024
14025else
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14027$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014028
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014031
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014033
14034
Matthias Kloseb9621712010-04-24 17:59:49 +000014035ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014036if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14041$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014042 OLD_CFLAGS=$CFLAGS
14043 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014045/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014046
14047# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014048
Martin v. Löwis11437992002-04-12 09:54:03 +000014049int
14050main ()
14051{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052
14053 char *name;
14054 struct hostent *he, *res;
14055 char buffer[2048];
14056 int buflen = 2048;
14057 int h_errnop;
14058
14059 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014060
14061 ;
14062 return 0;
14063}
14064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014065if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014068
Martin v. Löwis11437992002-04-12 09:54:03 +000014069
Matthias Kloseb9621712010-04-24 17:59:49 +000014070$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14073$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014074
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014075else
Skip Montanaro6dead952003-09-25 14:50:04 +000014076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14078$as_echo "no" >&6; }
14079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14080$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014082/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014083
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014084# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014085
Martin v. Löwis11437992002-04-12 09:54:03 +000014086int
14087main ()
14088{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014089
14090 char *name;
14091 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014092 char buffer[2048];
14093 int buflen = 2048;
14094 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014095
Matthias Kloseb159a552010-04-25 21:00:44 +000014096 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014097
14098 ;
14099 return 0;
14100}
14101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014102if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014105
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
Matthias Kloseb159a552010-04-25 21:00:44 +000014107$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014108
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14110$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014111
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014112else
Skip Montanaro6dead952003-09-25 14:50:04 +000014113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14115$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14117$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14119/* end confdefs.h. */
14120
14121# include <netdb.h>
14122
14123int
14124main ()
14125{
14126
14127 char *name;
14128 struct hostent *he;
14129 struct hostent_data data;
14130
14131 (void) gethostbyname_r(name, he, &data);
14132
14133 ;
14134 return 0;
14135}
14136_ACEOF
14137if ac_fn_c_try_compile "$LINENO"; then :
14138
14139 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14140
14141
14142$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14143
14144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14145$as_echo "yes" >&6; }
14146
14147else
14148
14149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14150$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014151
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014154
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014157
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014160 CFLAGS=$OLD_CFLAGS
14161
14162else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014163
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 for ac_func in gethostbyname
14165do :
14166 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014167if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014168 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014169#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014170_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014171
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014172fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014173done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014174
Michael W. Hudson54241132001-12-07 15:38:26 +000014175
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014176fi
14177
Michael W. Hudson54241132001-12-07 15:38:26 +000014178
14179
14180
14181
14182
14183
Guido van Rossum627b2d71993-12-24 10:39:16 +000014184# checks for system services
14185# (none yet)
14186
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014187# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014188ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014189if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014190
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014191else
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14193$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014194if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014196else
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014198LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202/* Override any GCC internal prototype to avoid an error.
14203 Use char because int might match the return type of a GCC
14204 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014205#ifdef __cplusplus
14206extern "C"
14207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014208char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014209int
14210main ()
14211{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 ;
14214 return 0;
14215}
14216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014217if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014218 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014219else
Matthias Kloseb9621712010-04-24 17:59:49 +000014220 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014222rm -f core conftest.err conftest.$ac_objext \
14223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014224LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14227$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014228if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014229 cat >>confdefs.h <<_ACEOF
14230#define HAVE_LIBIEEE 1
14231_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014232
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014233 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014234
Guido van Rossum627b2d71993-12-24 10:39:16 +000014235fi
14236
Michael W. Hudson54241132001-12-07 15:38:26 +000014237
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014238fi
14239
Michael W. Hudson54241132001-12-07 15:38:26 +000014240
Guido van Rossum7f43da71994-08-01 12:15:30 +000014241# check for --with-libm=...
14242
Guido van Rossum563e7081996-09-10 18:20:48 +000014243case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014244Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014245*) LIBM=-lm
14246esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14248$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014251if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014253if test "$withval" = no
14254then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14256$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014257elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014258then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14260$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014261else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014262fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014263else
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14265$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266fi
14267
Guido van Rossum7f43da71994-08-01 12:15:30 +000014268
14269# check for --with-libc=...
14270
Matthias Kloseb9621712010-04-24 17:59:49 +000014271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14272$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014275if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014276 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014277if test "$withval" = no
14278then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14280$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014281elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014282then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14284$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014285else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014286fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014287else
Matthias Kloseb9621712010-04-24 17:59:49 +000014288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14289$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290fi
14291
Guido van Rossum7f43da71994-08-01 12:15:30 +000014292
Stefan Krah1919b7e2012-03-21 18:25:23 +010014293# **************************************
14294# * Check for gcc x64 inline assembler *
14295# **************************************
14296
14297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14298$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14300/* end confdefs.h. */
14301
14302int
14303main ()
14304{
14305
14306 __asm__ __volatile__ ("movq %rcx, %rax");
14307
14308 ;
14309 return 0;
14310}
14311_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014312if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014313 have_gcc_asm_for_x64=yes
14314else
14315 have_gcc_asm_for_x64=no
14316fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014317rm -f core conftest.err conftest.$ac_objext \
14318 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14320$as_echo "$have_gcc_asm_for_x64" >&6; }
14321if test "$have_gcc_asm_for_x64" = yes
14322then
14323
14324$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14325
14326fi
14327
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328# **************************************************
14329# * Check for various properties of floating point *
14330# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014331
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14333$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14334if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014336else
14337
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014338
14339ax_cv_c_float_words_bigendian=unknown
14340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014341/* end confdefs.h. */
14342
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014343
14344double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14345
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014346
14347_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014348if ac_fn_c_try_compile "$LINENO"; then :
14349
14350
14351if grep noonsees conftest.$ac_objext >/dev/null ; then
14352 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014353fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014354if grep seesnoon conftest.$ac_objext >/dev/null ; then
14355 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14356 ax_cv_c_float_words_bigendian=no
14357 else
14358 ax_cv_c_float_words_bigendian=unknown
14359 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014360fi
14361
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014362
14363fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014365fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14367$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014368
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014369case $ax_cv_c_float_words_bigendian in
14370 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014371
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014372$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14373 ;;
14374 no)
14375 ;;
14376 *)
14377 as_fn_error $? "
14378
14379Unknown float word ordering. You need to manually preset
14380ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14381
14382 " "$LINENO" 5 ;;
14383esac
14384
14385
14386if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014387then
14388
Matthias Kloseb9621712010-04-24 17:59:49 +000014389$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014390
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014391elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014392then
14393
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014394$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14395
14396else
14397 # Some ARM platforms use a mixed-endian representation for doubles.
14398 # While Python doesn't currently have full support for these platforms
14399 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14400 # conversions work.
14401 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14402 # or little, then it must be this?
14403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014405
14406fi
14407
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014408# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014409# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014410# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014411# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014412# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014413# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014414
14415# This inline assembler syntax may also work for suncc and icc,
14416# so we try it on all platforms.
14417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14419$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014421/* end confdefs.h. */
14422
14423int
14424main ()
14425{
14426
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014427 unsigned short cw;
14428 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14429 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014430
14431 ;
14432 return 0;
14433}
14434_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014435if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014436 have_gcc_asm_for_x87=yes
14437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014439fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014440rm -f core conftest.err conftest.$ac_objext \
14441 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14443$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014444if test "$have_gcc_asm_for_x87" = yes
14445then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014448
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14452$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14454/* end confdefs.h. */
14455
14456int
14457main ()
14458{
14459
14460 unsigned int fpcr;
14461 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14462 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14463
14464 ;
14465 return 0;
14466}
14467_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014468if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014469 have_gcc_asm_for_mc68881=yes
14470else
14471 have_gcc_asm_for_mc68881=no
14472fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014473rm -f core conftest.err conftest.$ac_objext \
14474 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14476$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14477if test "$have_gcc_asm_for_mc68881" = yes
14478then
14479
14480$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14481
14482fi
14483
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014484# Detect whether system arithmetic is subject to x87-style double
14485# rounding issues. The result of this test has little meaning on non
14486# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14487# mode is round-to-nearest and double rounding issues are present, and
14488# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14490$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014491# $BASECFLAGS may affect the result
14492ac_save_cc="$CC"
14493CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014494if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014495 ac_cv_x87_double_rounding=no
14496else
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014498/* end confdefs.h. */
14499
14500#include <stdlib.h>
14501#include <math.h>
14502int main() {
14503 volatile double x, y, z;
14504 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14505 x = 0.99999999999999989; /* 1-2**-53 */
14506 y = 1./x;
14507 if (y != 1.)
14508 exit(0);
14509 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14510 x = 1e16;
14511 y = 2.99999;
14512 z = x + y;
14513 if (z != 1e16+4.)
14514 exit(0);
14515 /* both tests show evidence of double rounding */
14516 exit(1);
14517}
14518
14519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014520if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014521 ac_cv_x87_double_rounding=no
14522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014527fi
14528
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014529CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14531$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014532if test "$ac_cv_x87_double_rounding" = yes
14533then
14534
Matthias Kloseb9621712010-04-24 17:59:49 +000014535$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014536
14537fi
14538
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014539# ************************************
14540# * Check for mathematical functions *
14541# ************************************
14542
14543LIBS_SAVE=$LIBS
14544LIBS="$LIBS $LIBM"
14545
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014546for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14547do :
14548 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14549ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014550if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014551 cat >>confdefs.h <<_ACEOF
14552#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14553_ACEOF
14554
14555fi
14556done
14557
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014558for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014559do :
14560 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14561ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014562if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014563 cat >>confdefs.h <<_ACEOF
14564#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14565_ACEOF
14566
14567fi
14568done
14569
14570ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14571"
Victor Stinnere0be4232011-10-25 13:06:09 +020014572if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014573 ac_have_decl=1
14574else
14575 ac_have_decl=0
14576fi
14577
14578cat >>confdefs.h <<_ACEOF
14579#define HAVE_DECL_ISINF $ac_have_decl
14580_ACEOF
14581ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14582"
Victor Stinnere0be4232011-10-25 13:06:09 +020014583if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014584 ac_have_decl=1
14585else
14586 ac_have_decl=0
14587fi
14588
14589cat >>confdefs.h <<_ACEOF
14590#define HAVE_DECL_ISNAN $ac_have_decl
14591_ACEOF
14592ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14593"
Victor Stinnere0be4232011-10-25 13:06:09 +020014594if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014595 ac_have_decl=1
14596else
14597 ac_have_decl=0
14598fi
14599
14600cat >>confdefs.h <<_ACEOF
14601#define HAVE_DECL_ISFINITE $ac_have_decl
14602_ACEOF
14603
14604
Mark Dickinsona614f042009-11-28 12:48:43 +000014605# For multiprocessing module, check that sem_open
14606# actually works. For FreeBSD versions <= 7.2,
14607# the kernel module that provides POSIX semaphores
14608# isn't loaded by default, so an attempt to call
14609# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14611$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014612if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014614else
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014616 ac_cv_posix_semaphores_enabled=yes
14617else
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014619/* end confdefs.h. */
14620
14621#include <unistd.h>
14622#include <fcntl.h>
14623#include <stdio.h>
14624#include <semaphore.h>
14625#include <sys/stat.h>
14626
14627int main(void) {
14628 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14629 if (a == SEM_FAILED) {
14630 perror("sem_open");
14631 return 1;
14632 }
14633 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014634 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014635 return 0;
14636}
14637
14638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014639if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014640 ac_cv_posix_semaphores_enabled=yes
14641else
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14645 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014646fi
14647
14648
Mark Dickinsona614f042009-11-28 12:48:43 +000014649fi
14650
Matthias Kloseb9621712010-04-24 17:59:49 +000014651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14652$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014653if test $ac_cv_posix_semaphores_enabled = no
14654then
14655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014657
14658fi
14659
Mark Dickinson10683072009-04-18 21:18:19 +000014660# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14662$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014663if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014665else
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014667 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014668else
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014670/* end confdefs.h. */
14671
14672#include <unistd.h>
14673#include <fcntl.h>
14674#include <stdio.h>
14675#include <semaphore.h>
14676#include <sys/stat.h>
14677
14678int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014679 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014680 int count;
14681 int res;
14682 if(a==SEM_FAILED){
14683 perror("sem_open");
14684 return 1;
14685
14686 }
14687 res = sem_getvalue(a, &count);
14688 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014689 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014690 return res==-1 ? 1 : 0;
14691}
14692
Mark Dickinson10683072009-04-18 21:18:19 +000014693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014694if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014695 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014696else
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14700 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014701fi
14702
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014703
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014704fi
14705
Matthias Kloseb9621712010-04-24 17:59:49 +000014706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14707$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014708if test $ac_cv_broken_sem_getvalue = yes
14709then
14710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014712
14713fi
14714
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014715ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14716"
14717if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14718 ac_have_decl=1
14719else
14720 ac_have_decl=0
14721fi
14722
14723cat >>confdefs.h <<_ACEOF
14724#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14725_ACEOF
14726ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14727"
14728if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14729 ac_have_decl=1
14730else
14731 ac_have_decl=0
14732fi
14733
14734cat >>confdefs.h <<_ACEOF
14735#define HAVE_DECL_RTLD_NOW $ac_have_decl
14736_ACEOF
14737ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14738"
14739if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14740 ac_have_decl=1
14741else
14742 ac_have_decl=0
14743fi
14744
14745cat >>confdefs.h <<_ACEOF
14746#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14747_ACEOF
14748ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14749"
14750if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14751 ac_have_decl=1
14752else
14753 ac_have_decl=0
14754fi
14755
14756cat >>confdefs.h <<_ACEOF
14757#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14758_ACEOF
14759ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14760"
14761if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14762 ac_have_decl=1
14763else
14764 ac_have_decl=0
14765fi
14766
14767cat >>confdefs.h <<_ACEOF
14768#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14769_ACEOF
14770ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14771"
14772if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14773 ac_have_decl=1
14774else
14775 ac_have_decl=0
14776fi
14777
14778cat >>confdefs.h <<_ACEOF
14779#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14780_ACEOF
14781ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14782"
14783if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14784 ac_have_decl=1
14785else
14786 ac_have_decl=0
14787fi
14788
14789cat >>confdefs.h <<_ACEOF
14790#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14791_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014792ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14793"
14794if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14795 ac_have_decl=1
14796else
14797 ac_have_decl=0
14798fi
14799
14800cat >>confdefs.h <<_ACEOF
14801#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14802_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014803
14804
Mark Dickinsonbd792642009-03-18 20:06:12 +000014805# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14807$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014808# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014809if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014810 enableval=$enable_big_digits; case $enable_big_digits in
14811yes)
14812 enable_big_digits=30 ;;
14813no)
14814 enable_big_digits=15 ;;
1481515|30)
14816 ;;
14817*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014818 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 +000014819esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14821$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014822
14823cat >>confdefs.h <<_ACEOF
14824#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14825_ACEOF
14826
14827
14828else
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14830$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014831fi
14832
14833
Guido van Rossumef2255b2000-03-10 22:30:29 +000014834# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014835ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014836if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014837
14838
Matthias Kloseb9621712010-04-24 17:59:49 +000014839$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014840
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014841 wchar_h="yes"
14842
Guido van Rossumef2255b2000-03-10 22:30:29 +000014843else
Martin v. Löwis11437992002-04-12 09:54:03 +000014844 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014845
14846fi
14847
Michael W. Hudson54241132001-12-07 15:38:26 +000014848
Martin v. Löwis11437992002-04-12 09:54:03 +000014849
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014850# determine wchar_t size
14851if test "$wchar_h" = yes
14852then
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14855# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14856# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14858$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014859if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014861else
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14863"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014864
Martin v. Löwis11437992002-04-12 09:54:03 +000014865else
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 if test "$ac_cv_type_wchar_t" = yes; then
14867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014869as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014870See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871 else
14872 ac_cv_sizeof_wchar_t=0
14873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014875
Martin v. Löwis11437992002-04-12 09:54:03 +000014876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14878$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879
14880
14881
Martin v. Löwis11437992002-04-12 09:54:03 +000014882cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014883#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014884_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014885
Michael W. Hudson54241132001-12-07 15:38:26 +000014886
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014887fi
14888
Matthias Kloseb9621712010-04-24 17:59:49 +000014889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14890$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014891have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014893/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014894
14895#include <tcl.h>
14896#if TCL_UTF_MAX != 6
14897# error "NOT UCS4_TCL"
14898#endif
14899int
14900main ()
14901{
14902
14903 ;
14904 return 0;
14905}
14906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014907if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014908
14909
Matthias Kloseb9621712010-04-24 17:59:49 +000014910$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014911
14912 have_ucs4_tcl=yes
14913
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14917$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014918
Skip Montanaro6dead952003-09-25 14:50:04 +000014919# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014920if test "$wchar_h" = yes
14921then
14922 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14924$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014925 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014927else
14928
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014930 ac_cv_wchar_t_signed=yes
14931else
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014933/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014934
14935 #include <wchar.h>
14936 int main()
14937 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014938 /* Success: exit code 0 */
14939 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014940 }
14941
14942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014943if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014944 ac_cv_wchar_t_signed=yes
14945else
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14949 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014950fi
14951
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014952fi
14953
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14955$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956fi
14957
Michael Osipov3738fad2018-08-24 18:17:19 +020014958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14959$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014960# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014961if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014962 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014963then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014966
Michael Osipov3738fad2018-08-24 18:17:19 +020014967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14968$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014969else
Michael Osipov3738fad2018-08-24 18:17:19 +020014970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14971$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014972fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014973
14974# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14976$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014977if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014979else
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 ac_cv_c_bigendian=unknown
14981 # See if we're dealing with a universal compiler.
14982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14983/* end confdefs.h. */
14984#ifndef __APPLE_CC__
14985 not a universal capable compiler
14986 #endif
14987 typedef int dummy;
14988
Skip Montanaro6dead952003-09-25 14:50:04 +000014989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014990if ac_fn_c_try_compile "$LINENO"; then :
14991
14992 # Check for potential -arch flags. It is not universal unless
14993 # there are at least two -arch flags with different values.
14994 ac_arch=
14995 ac_prev=
14996 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14997 if test -n "$ac_prev"; then
14998 case $ac_word in
14999 i?86 | x86_64 | ppc | ppc64)
15000 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15001 ac_arch=$ac_word
15002 else
15003 ac_cv_c_bigendian=universal
15004 break
15005 fi
15006 ;;
15007 esac
15008 ac_prev=
15009 elif test "x$ac_word" = "x-arch"; then
15010 ac_prev=arch
15011 fi
15012 done
15013fi
15014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15015 if test $ac_cv_c_bigendian = unknown; then
15016 # See if sys/param.h defines the BYTE_ORDER macro.
15017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015018/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015019#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015020 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015021
Martin v. Löwis11437992002-04-12 09:54:03 +000015022int
15023main ()
15024{
Matthias Kloseb9621712010-04-24 17:59:49 +000015025#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15026 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15027 && LITTLE_ENDIAN)
15028 bogus endian macros
15029 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015030
15031 ;
15032 return 0;
15033}
15034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015035if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015036 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015038/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015039#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015041
Martin v. Löwis11437992002-04-12 09:54:03 +000015042int
15043main ()
15044{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015045#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 not big endian
15047 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015048
15049 ;
15050 return 0;
15051}
15052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015053if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015054 ac_cv_c_bigendian=yes
15055else
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015059fi
15060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15061 fi
15062 if test $ac_cv_c_bigendian = unknown; then
15063 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015065/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015066#include <limits.h>
15067
Martin v. Löwis11437992002-04-12 09:54:03 +000015068int
15069main ()
15070{
Matthias Kloseb9621712010-04-24 17:59:49 +000015071#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15072 bogus endian macros
15073 #endif
15074
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 ;
15076 return 0;
15077}
15078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015079if ac_fn_c_try_compile "$LINENO"; then :
15080 # It does; now see whether it defined to _BIG_ENDIAN or not.
15081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15082/* end confdefs.h. */
15083#include <limits.h>
15084
15085int
15086main ()
15087{
15088#ifndef _BIG_ENDIAN
15089 not big endian
15090 #endif
15091
15092 ;
15093 return 0;
15094}
15095_ACEOF
15096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015098else
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15102fi
15103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15104 fi
15105 if test $ac_cv_c_bigendian = unknown; then
15106 # Compile a test program.
15107 if test "$cross_compiling" = yes; then :
15108 # Try to guess by grepping values from an object file.
15109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15110/* end confdefs.h. */
15111short int ascii_mm[] =
15112 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15113 short int ascii_ii[] =
15114 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15115 int use_ascii (int i) {
15116 return ascii_mm[i] + ascii_ii[i];
15117 }
15118 short int ebcdic_ii[] =
15119 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15120 short int ebcdic_mm[] =
15121 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15122 int use_ebcdic (int i) {
15123 return ebcdic_mm[i] + ebcdic_ii[i];
15124 }
15125 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126
Matthias Kloseb9621712010-04-24 17:59:49 +000015127int
15128main ()
15129{
15130return use_ascii (foo) == use_ebcdic (foo);
15131 ;
15132 return 0;
15133}
15134_ACEOF
15135if ac_fn_c_try_compile "$LINENO"; then :
15136 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15137 ac_cv_c_bigendian=yes
15138 fi
15139 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15140 if test "$ac_cv_c_bigendian" = unknown; then
15141 ac_cv_c_bigendian=no
15142 else
15143 # finding both strings is unlikely to happen, but who knows?
15144 ac_cv_c_bigendian=unknown
15145 fi
15146 fi
15147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015149else
Matthias Kloseb9621712010-04-24 17:59:49 +000015150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015151/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015153int
15154main ()
15155{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 /* Are we little or big endian? From Harbison&Steele. */
15158 union
15159 {
15160 long int l;
15161 char c[sizeof (long int)];
15162 } u;
15163 u.l = 1;
15164 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165
15166 ;
15167 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015168}
Martin v. Löwis11437992002-04-12 09:54:03 +000015169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015170if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015171 ac_cv_c_bigendian=no
15172else
Matthias Kloseb9621712010-04-24 17:59:49 +000015173 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15176 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15182$as_echo "$ac_cv_c_bigendian" >&6; }
15183 case $ac_cv_c_bigendian in #(
15184 yes)
15185 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15186;; #(
15187 no)
15188 ;; #(
15189 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015190
Matthias Kloseb9621712010-04-24 17:59:49 +000015191$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015192
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 ;; #(
15194 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015195 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015196 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015197 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015198
Michael W. Hudson54241132001-12-07 15:38:26 +000015199
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015200# ABI version string for Python extension modules. This appears between the
15201# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15202# from the following attributes which affect the ABI of this Python build (in
15203# this order):
15204#
15205# * The Python implementation (always 'cpython-' for us)
15206# * The major and minor version numbers
15207# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015208#
15209# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015210# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15211# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015212#
15213# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15214# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015215
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15217$as_echo_n "checking ABIFLAGS... " >&6; }
15218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15219$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15221$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015222SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15224$as_echo "$SOABI" >&6; }
15225
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015226# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15227if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015228 # Similar to SOABI but remove "d" flag from ABIFLAGS
15229
15230 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15231
15232cat >>confdefs.h <<_ACEOF
15233#define ALT_SOABI "${ALT_SOABI}"
15234_ACEOF
15235
15236fi
15237
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015238
15239case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015240 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015241 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15242 *)
15243 EXT_SUFFIX=${SHLIB_SUFFIX};;
15244esac
15245
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15247$as_echo_n "checking LDVERSION... " >&6; }
15248LDVERSION='$(VERSION)$(ABIFLAGS)'
15249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15250$as_echo "$LDVERSION" >&6; }
15251
E. M. Brayc994c8f2019-05-24 17:33:47 +020015252# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015253
E. M. Brayb1fc4172019-05-24 18:39:39 +020015254if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015255 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015256else
15257 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015258fi
15259
doko@python.org87421192013-01-26 11:39:31 +010015260
doko@ubuntu.com55532312016-06-14 08:55:19 +020015261if test x$PLATFORM_TRIPLET = x; then
15262 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15263else
15264 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15265fi
doko@python.org87421192013-01-26 11:39:31 +010015266
15267
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015268# Check whether right shifting a negative integer extends the sign bit
15269# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15271$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015272if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015274else
Martin v. Löwis11437992002-04-12 09:54:03 +000015275
Matthias Kloseb9621712010-04-24 17:59:49 +000015276if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015277 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015278else
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015280/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015281
15282int main()
15283{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015284 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015285}
15286
Martin v. Löwis11437992002-04-12 09:54:03 +000015287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015288if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015289 ac_cv_rshift_extends_sign=yes
15290else
Matthias Kloseb9621712010-04-24 17:59:49 +000015291 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015295fi
15296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297fi
15298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15300$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015301if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015302then
Martin v. Löwis11437992002-04-12 09:54:03 +000015303
Matthias Kloseb9621712010-04-24 17:59:49 +000015304$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015305
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015306fi
15307
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015308# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15310$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015311if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015313else
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
Matthias Kloseb9621712010-04-24 17:59:49 +000015315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015316/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015317#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015318int
15319main ()
15320{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015321
15322 FILE *f = fopen("/dev/null", "r");
15323 flockfile(f);
15324 getc_unlocked(f);
15325 funlockfile(f);
15326
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 ;
15328 return 0;
15329}
15330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015331if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015332 ac_cv_have_getc_unlocked=yes
15333else
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 ac_cv_have_getc_unlocked=no
15335fi
15336rm -f core conftest.err conftest.$ac_objext \
15337 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339
Matthias Kloseb9621712010-04-24 17:59:49 +000015340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15341$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015342if test "$ac_cv_have_getc_unlocked" = yes
15343then
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
Matthias Kloseb9621712010-04-24 17:59:49 +000015345$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015346
15347fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015348
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015349# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015350# save the value of LIBS so we don't actually link Python with readline
15351LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015352
Gregory P. Smith18820942008-09-07 06:24:49 +000015353# On some systems we need to link readline to a termcap compatible
15354# library. NOTE: Keep the precedence of listed libraries synchronised
15355# with setup.py.
15356py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15358$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015359for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015360 if test -z "$py_libtermcap"; then
15361 READLINE_LIBS="-lreadline"
15362 else
15363 READLINE_LIBS="-lreadline -l$py_libtermcap"
15364 fi
15365 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015367/* end confdefs.h. */
15368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369/* Override any GCC internal prototype to avoid an error.
15370 Use char because int might match the return type of a GCC
15371 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015372#ifdef __cplusplus
15373extern "C"
15374#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015375char readline ();
15376int
15377main ()
15378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015380 ;
15381 return 0;
15382}
15383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015384if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015385 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015387rm -f core conftest.err conftest.$ac_objext \
15388 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015389 if test $py_cv_lib_readline = yes; then
15390 break
15391 fi
15392done
15393# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15394#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015395if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15397$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015398else
Matthias Kloseb9621712010-04-24 17:59:49 +000015399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15400$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015401
Matthias Kloseb9621712010-04-24 17:59:49 +000015402$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015403
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015404fi
15405
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015406# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015408/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015409#include <readline/readline.h>
15410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015411if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015412 have_readline=yes
15413else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015414 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015415
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015416fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015417rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015418if test $have_readline = yes
15419then
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015421/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015422#include <readline/readline.h>
15423
15424_ACEOF
15425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015426 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015427
Matthias Kloseb9621712010-04-24 17:59:49 +000015428$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015429
15430fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015431rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015432
Matthias Kloseb9621712010-04-24 17:59:49 +000015433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015434/* end confdefs.h. */
15435#include <readline/readline.h>
15436
15437_ACEOF
15438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015439 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015440
Matthias Kloseb9621712010-04-24 17:59:49 +000015441$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015442
15443fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015444rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015445
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015446fi
15447
Martin v. Löwis0daad592001-09-30 21:09:59 +000015448# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15450$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015451if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015452 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015453else
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015455LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459/* Override any GCC internal prototype to avoid an error.
15460 Use char because int might match the return type of a GCC
15461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015462#ifdef __cplusplus
15463extern "C"
15464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015465char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015466int
15467main ()
15468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015469return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 ;
15471 return 0;
15472}
15473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015476else
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015479rm -f core conftest.err conftest.$ac_objext \
15480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015481LIBS=$ac_check_lib_save_LIBS
15482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15484$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015485if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015486
Matthias Kloseb9621712010-04-24 17:59:49 +000015487$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015488
Martin v. Löwis0daad592001-09-30 21:09:59 +000015489fi
15490
Michael W. Hudson54241132001-12-07 15:38:26 +000015491
Thomas Wouters89d996e2007-09-08 17:39:28 +000015492# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15494$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015495if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015497else
15498 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015499LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015501/* end confdefs.h. */
15502
15503/* Override any GCC internal prototype to avoid an error.
15504 Use char because int might match the return type of a GCC
15505 builtin and then its argument prototype would still apply. */
15506#ifdef __cplusplus
15507extern "C"
15508#endif
15509char rl_completion_display_matches_hook ();
15510int
15511main ()
15512{
15513return rl_completion_display_matches_hook ();
15514 ;
15515 return 0;
15516}
15517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015518if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015519 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15520else
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015523rm -f core conftest.err conftest.$ac_objext \
15524 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015525LIBS=$ac_check_lib_save_LIBS
15526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15528$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015529if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015530
Matthias Kloseb9621712010-04-24 17:59:49 +000015531$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015532
15533fi
15534
15535
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015536# also in 4.0, but not in editline
15537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15538$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15539if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15540 $as_echo_n "(cached) " >&6
15541else
15542 ac_check_lib_save_LIBS=$LIBS
15543LIBS="-lreadline $READLINE_LIBS $LIBS"
15544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15545/* end confdefs.h. */
15546
15547/* Override any GCC internal prototype to avoid an error.
15548 Use char because int might match the return type of a GCC
15549 builtin and then its argument prototype would still apply. */
15550#ifdef __cplusplus
15551extern "C"
15552#endif
15553char rl_resize_terminal ();
15554int
15555main ()
15556{
15557return rl_resize_terminal ();
15558 ;
15559 return 0;
15560}
15561_ACEOF
15562if ac_fn_c_try_link "$LINENO"; then :
15563 ac_cv_lib_readline_rl_resize_terminal=yes
15564else
15565 ac_cv_lib_readline_rl_resize_terminal=no
15566fi
15567rm -f core conftest.err conftest.$ac_objext \
15568 conftest$ac_exeext conftest.$ac_ext
15569LIBS=$ac_check_lib_save_LIBS
15570fi
15571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15572$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15573if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15574
15575$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15576
15577fi
15578
15579
Martin v. Löwis0daad592001-09-30 21:09:59 +000015580# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15582$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015583if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015584 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015585else
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015587LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591/* Override any GCC internal prototype to avoid an error.
15592 Use char because int might match the return type of a GCC
15593 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015594#ifdef __cplusplus
15595extern "C"
15596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015597char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015598int
15599main ()
15600{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015601return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 ;
15603 return 0;
15604}
15605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015606if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015607 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015608else
Matthias Kloseb9621712010-04-24 17:59:49 +000015609 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015611rm -f core conftest.err conftest.$ac_objext \
15612 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015613LIBS=$ac_check_lib_save_LIBS
15614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15616$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015617if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015618
Matthias Kloseb9621712010-04-24 17:59:49 +000015619$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015620
Guido van Rossum353ae582001-07-10 16:45:32 +000015621fi
15622
Jack Jansendd19cf82001-12-06 22:36:17 +000015623
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015624# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015626/* end confdefs.h. */
15627#include <readline/readline.h>
15628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015629if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015630 have_readline=yes
15631else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015632 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015633
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015634fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015635rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015636if test $have_readline = yes
15637then
Matthias Kloseb9621712010-04-24 17:59:49 +000015638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015639/* end confdefs.h. */
15640#include <readline/readline.h>
15641
15642_ACEOF
15643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015645
Matthias Kloseb9621712010-04-24 17:59:49 +000015646$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015647
15648fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015649rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015650
15651fi
15652
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15654$as_echo_n "checking for append_history in -lreadline... " >&6; }
15655if ${ac_cv_lib_readline_append_history+:} false; then :
15656 $as_echo_n "(cached) " >&6
15657else
15658 ac_check_lib_save_LIBS=$LIBS
15659LIBS="-lreadline $READLINE_LIBS $LIBS"
15660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15661/* end confdefs.h. */
15662
15663/* Override any GCC internal prototype to avoid an error.
15664 Use char because int might match the return type of a GCC
15665 builtin and then its argument prototype would still apply. */
15666#ifdef __cplusplus
15667extern "C"
15668#endif
15669char append_history ();
15670int
15671main ()
15672{
15673return append_history ();
15674 ;
15675 return 0;
15676}
15677_ACEOF
15678if ac_fn_c_try_link "$LINENO"; then :
15679 ac_cv_lib_readline_append_history=yes
15680else
15681 ac_cv_lib_readline_append_history=no
15682fi
15683rm -f core conftest.err conftest.$ac_objext \
15684 conftest$ac_exeext conftest.$ac_ext
15685LIBS=$ac_check_lib_save_LIBS
15686fi
15687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15688$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15689if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15690
15691$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15692
15693fi
15694
15695
Martin v. Löwis82bca632006-02-10 20:49:30 +000015696# End of readline checks: restore LIBS
15697LIBS=$LIBS_no_readline
15698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15700$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015701if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015703else
Martin v. Löwis11437992002-04-12 09:54:03 +000015704
Matthias Kloseb9621712010-04-24 17:59:49 +000015705if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015706 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015707else
Matthias Kloseb9621712010-04-24 17:59:49 +000015708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015709/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015710
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015711#include <stdlib.h>
15712#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015713int main()
15714{
15715 int val1 = nice(1);
15716 if (val1 != -1 && val1 == nice(2))
15717 exit(0);
15718 exit(1);
15719}
15720
Martin v. Löwis11437992002-04-12 09:54:03 +000015721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015722if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015723 ac_cv_broken_nice=yes
15724else
Matthias Kloseb9621712010-04-24 17:59:49 +000015725 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015729fi
15730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731fi
15732
Matthias Kloseb9621712010-04-24 17:59:49 +000015733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15734$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015735if test "$ac_cv_broken_nice" = yes
15736then
Martin v. Löwis11437992002-04-12 09:54:03 +000015737
Matthias Kloseb9621712010-04-24 17:59:49 +000015738$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015739
15740fi
15741
Matthias Kloseb9621712010-04-24 17:59:49 +000015742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15743$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015744if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015745 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015746else
Matthias Kloseb9621712010-04-24 17:59:49 +000015747 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015748 ac_cv_broken_poll=no
15749else
Matthias Kloseb9621712010-04-24 17:59:49 +000015750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015751/* end confdefs.h. */
15752
15753#include <poll.h>
15754
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015755int main()
15756{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015757 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015758 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015759
15760 close (42);
15761
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015762 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015763 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015764 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015765 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015766 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015767 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015768 return 1;
15769}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015770
15771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015772if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015773 ac_cv_broken_poll=yes
15774else
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015781fi
15782
Matthias Kloseb9621712010-04-24 17:59:49 +000015783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15784$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015785if test "$ac_cv_broken_poll" = yes
15786then
15787
Matthias Kloseb9621712010-04-24 17:59:49 +000015788$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015789
15790fi
15791
Martin v. Löwis1d459062005-03-14 21:23:33 +000015792# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15794$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015795if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015796 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015797else
15798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015800 ac_cv_working_tzset=no
15801else
Matthias Kloseb9621712010-04-24 17:59:49 +000015802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015803/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015804
15805#include <stdlib.h>
15806#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015807#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015808
15809#if HAVE_TZNAME
15810extern char *tzname[];
15811#endif
15812
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015813int main()
15814{
Brett Cannon18367812003-09-19 00:59:16 +000015815 /* Note that we need to ensure that not only does tzset(3)
15816 do 'something' with localtime, but it works as documented
15817 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015818 This includes making sure that tzname is set properly if
15819 tm->tm_zone does not exist since it is the alternative way
15820 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015821
15822 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015823 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015824 */
15825
Martin v. Löwis1d459062005-03-14 21:23:33 +000015826 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015827 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15828
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015829 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015830 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015831 if (localtime(&groundhogday)->tm_hour != 0)
15832 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015833#if HAVE_TZNAME
15834 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15835 if (strcmp(tzname[0], "UTC") ||
15836 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15837 exit(1);
15838#endif
Brett Cannon18367812003-09-19 00:59:16 +000015839
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015840 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015841 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015842 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015843 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015844#if HAVE_TZNAME
15845 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15846 exit(1);
15847#endif
Brett Cannon18367812003-09-19 00:59:16 +000015848
15849 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15850 tzset();
15851 if (localtime(&groundhogday)->tm_hour != 11)
15852 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015853#if HAVE_TZNAME
15854 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15855 exit(1);
15856#endif
15857
15858#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015859 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15860 exit(1);
15861 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15862 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015863#endif
Brett Cannon18367812003-09-19 00:59:16 +000015864
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015865 exit(0);
15866}
15867
15868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015869if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015870 ac_cv_working_tzset=yes
15871else
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15875 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015876fi
15877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015878fi
15879
Matthias Kloseb9621712010-04-24 17:59:49 +000015880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15881$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015882if test "$ac_cv_working_tzset" = yes
15883then
15884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015886
15887fi
15888
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015889# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15891$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015892if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015893 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015894else
Matthias Kloseb9621712010-04-24 17:59:49 +000015895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015896/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015897#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015898int
15899main ()
15900{
15901
15902struct stat st;
15903st.st_mtim.tv_nsec = 1;
15904
15905 ;
15906 return 0;
15907}
15908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015909if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015910 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015911else
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15915fi
15916
Matthias Kloseb9621712010-04-24 17:59:49 +000015917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15918$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015919if test "$ac_cv_stat_tv_nsec" = yes
15920then
15921
Matthias Kloseb9621712010-04-24 17:59:49 +000015922$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015923
15924fi
15925
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015926# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15928$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015929if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015930 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015931else
Matthias Kloseb9621712010-04-24 17:59:49 +000015932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015933/* end confdefs.h. */
15934#include <sys/stat.h>
15935int
15936main ()
15937{
15938
15939struct stat st;
15940st.st_mtimespec.tv_nsec = 1;
15941
15942 ;
15943 return 0;
15944}
15945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015946if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015947 ac_cv_stat_tv_nsec2=yes
15948else
Matthias Kloseb9621712010-04-24 17:59:49 +000015949 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15952fi
15953
Matthias Kloseb9621712010-04-24 17:59:49 +000015954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15955$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015956if test "$ac_cv_stat_tv_nsec2" = yes
15957then
15958
Matthias Kloseb9621712010-04-24 17:59:49 +000015959$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015960
15961fi
15962
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015963# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015964ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015965if test "$cross_compiling" = no; then
15966 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15967fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015968
15969for ac_header in curses.h ncurses.h
15970do :
15971 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15972ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15973if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15974 cat >>confdefs.h <<_ACEOF
15975#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15976_ACEOF
15977
15978fi
15979
15980done
15981
15982
15983# On Solaris, term.h requires curses.h
15984for ac_header in term.h
15985do :
15986 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15987#ifdef HAVE_CURSES_H
15988#include <curses.h>
15989#endif
15990
15991"
15992if test "x$ac_cv_header_term_h" = xyes; then :
15993 cat >>confdefs.h <<_ACEOF
15994#define HAVE_TERM_H 1
15995_ACEOF
15996
15997fi
15998
15999done
16000
16001
Jack Jansen666b1e72001-10-31 12:11:48 +000016002# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16004$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016005if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016006 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016007else
Matthias Kloseb9621712010-04-24 17:59:49 +000016008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016009/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016010#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016011int
16012main ()
16013{
Jack Jansen666b1e72001-10-31 12:11:48 +000016014
16015 int rtn;
16016 rtn = mvwdelch(0,0,0);
16017
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 ;
16019 return 0;
16020}
16021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016022if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016023 ac_cv_mvwdelch_is_expression=yes
16024else
Matthias Kloseb9621712010-04-24 17:59:49 +000016025 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16028fi
16029
Matthias Kloseb9621712010-04-24 17:59:49 +000016030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16031$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016032
16033if test "$ac_cv_mvwdelch_is_expression" = yes
16034then
Martin v. Löwis11437992002-04-12 09:54:03 +000016035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016037
16038fi
16039
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016040# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16041# structs since version 5.7. If the macro is defined as zero before including
16042# [n]curses.h, ncurses will expose fields of the structs regardless of the
16043# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16045$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016046if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016047 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016048else
Matthias Kloseb9621712010-04-24 17:59:49 +000016049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016050/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016051
16052 #define NCURSES_OPAQUE 0
16053 #include <curses.h>
16054
Martin v. Löwis11437992002-04-12 09:54:03 +000016055int
16056main ()
16057{
Jack Jansen666b1e72001-10-31 12:11:48 +000016058
16059 WINDOW *w;
16060 w->_flags = 0;
16061
Martin v. Löwis11437992002-04-12 09:54:03 +000016062 ;
16063 return 0;
16064}
16065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016066if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016067 ac_cv_window_has_flags=yes
16068else
Matthias Kloseb9621712010-04-24 17:59:49 +000016069 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16072fi
16073
Matthias Kloseb9621712010-04-24 17:59:49 +000016074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16075$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016076
Jack Jansen666b1e72001-10-31 12:11:48 +000016077
16078if test "$ac_cv_window_has_flags" = yes
16079then
Martin v. Löwis11437992002-04-12 09:54:03 +000016080
Matthias Kloseb9621712010-04-24 17:59:49 +000016081$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016082
16083fi
16084
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16086$as_echo_n "checking for is_pad... " >&6; }
16087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16088/* end confdefs.h. */
16089#include <curses.h>
16090int
16091main ()
16092{
16093
16094#ifndef is_pad
16095void *x=is_pad
16096#endif
16097
16098 ;
16099 return 0;
16100}
16101_ACEOF
16102if ac_fn_c_try_compile "$LINENO"; then :
16103
16104$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16105
16106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16107$as_echo "yes" >&6; }
16108else
16109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16110$as_echo "no" >&6; }
16111
16112fi
16113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16116$as_echo_n "checking for is_term_resized... " >&6; }
16117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016118/* end confdefs.h. */
16119#include <curses.h>
16120int
16121main ()
16122{
16123void *x=is_term_resized
16124 ;
16125 return 0;
16126}
16127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016128if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016129
Matthias Kloseb9621712010-04-24 17:59:49 +000016130$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016131
Matthias Kloseb159a552010-04-25 21:00:44 +000016132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016133$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016134else
Matthias Kloseb9621712010-04-24 17:59:49 +000016135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16136$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016137
16138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16140
Matthias Kloseb9621712010-04-24 17:59:49 +000016141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16142$as_echo_n "checking for resize_term... " >&6; }
16143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016144/* end confdefs.h. */
16145#include <curses.h>
16146int
16147main ()
16148{
16149void *x=resize_term
16150 ;
16151 return 0;
16152}
16153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016154if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016155
Matthias Kloseb9621712010-04-24 17:59:49 +000016156$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016157
Matthias Kloseb159a552010-04-25 21:00:44 +000016158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016159$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016160else
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16162$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016163
16164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16166
Matthias Kloseb9621712010-04-24 17:59:49 +000016167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16168$as_echo_n "checking for resizeterm... " >&6; }
16169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016170/* end confdefs.h. */
16171#include <curses.h>
16172int
16173main ()
16174{
16175void *x=resizeterm
16176 ;
16177 return 0;
16178}
16179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016180if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016181
Matthias Kloseb9621712010-04-24 17:59:49 +000016182$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016183
Matthias Kloseb159a552010-04-25 21:00:44 +000016184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016185$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016186else
Matthias Kloseb9621712010-04-24 17:59:49 +000016187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16188$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016189
16190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016192
16193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16194$as_echo_n "checking for immedok... " >&6; }
16195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16196/* end confdefs.h. */
16197#include <curses.h>
16198int
16199main ()
16200{
16201
16202#ifndef immedok
16203void *x=immedok
16204#endif
16205
16206 ;
16207 return 0;
16208}
16209_ACEOF
16210if ac_fn_c_try_compile "$LINENO"; then :
16211
16212$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16213
16214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16215$as_echo "yes" >&6; }
16216else
16217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16218$as_echo "no" >&6; }
16219
16220fi
16221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16222
16223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16224$as_echo_n "checking for syncok... " >&6; }
16225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16226/* end confdefs.h. */
16227#include <curses.h>
16228int
16229main ()
16230{
16231
16232#ifndef syncok
16233void *x=syncok
16234#endif
16235
16236 ;
16237 return 0;
16238}
16239_ACEOF
16240if ac_fn_c_try_compile "$LINENO"; then :
16241
16242$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16243
16244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16245$as_echo "yes" >&6; }
16246else
16247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16248$as_echo "no" >&6; }
16249
16250fi
16251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16252
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16254$as_echo_n "checking for wchgat... " >&6; }
16255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16256/* end confdefs.h. */
16257#include <curses.h>
16258int
16259main ()
16260{
16261
16262#ifndef wchgat
16263void *x=wchgat
16264#endif
16265
16266 ;
16267 return 0;
16268}
16269_ACEOF
16270if ac_fn_c_try_compile "$LINENO"; then :
16271
16272$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16273
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16275$as_echo "yes" >&6; }
16276else
16277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16278$as_echo "no" >&6; }
16279
16280fi
16281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16282
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16284$as_echo_n "checking for filter... " >&6; }
16285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16286/* end confdefs.h. */
16287#include <curses.h>
16288int
16289main ()
16290{
16291
16292#ifndef filter
16293void *x=filter
16294#endif
16295
16296 ;
16297 return 0;
16298}
16299_ACEOF
16300if ac_fn_c_try_compile "$LINENO"; then :
16301
16302$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16303
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16305$as_echo "yes" >&6; }
16306else
16307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16308$as_echo "no" >&6; }
16309
16310fi
16311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16312
16313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16314$as_echo_n "checking for has_key... " >&6; }
16315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16316/* end confdefs.h. */
16317#include <curses.h>
16318int
16319main ()
16320{
16321
16322#ifndef has_key
16323void *x=has_key
16324#endif
16325
16326 ;
16327 return 0;
16328}
16329_ACEOF
16330if ac_fn_c_try_compile "$LINENO"; then :
16331
16332$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16333
16334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16335$as_echo "yes" >&6; }
16336else
16337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16338$as_echo "no" >&6; }
16339
16340fi
16341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16342
16343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16344$as_echo_n "checking for typeahead... " >&6; }
16345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16346/* end confdefs.h. */
16347#include <curses.h>
16348int
16349main ()
16350{
16351
16352#ifndef typeahead
16353void *x=typeahead
16354#endif
16355
16356 ;
16357 return 0;
16358}
16359_ACEOF
16360if ac_fn_c_try_compile "$LINENO"; then :
16361
16362$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16363
16364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16365$as_echo "yes" >&6; }
16366else
16367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16368$as_echo "no" >&6; }
16369
16370fi
16371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16372
16373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16374$as_echo_n "checking for use_env... " >&6; }
16375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16376/* end confdefs.h. */
16377#include <curses.h>
16378int
16379main ()
16380{
16381
16382#ifndef use_env
16383void *x=use_env
16384#endif
16385
16386 ;
16387 return 0;
16388}
16389_ACEOF
16390if ac_fn_c_try_compile "$LINENO"; then :
16391
16392$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16393
16394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16395$as_echo "yes" >&6; }
16396else
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16398$as_echo "no" >&6; }
16399
16400fi
16401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016402# last curses configure check
16403CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16406$as_echo "$as_me: checking for device files" >&6;}
16407
16408if test "x$cross_compiling" = xyes; then
16409 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16411$as_echo_n "checking for /dev/ptmx... " >&6; }
16412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16413$as_echo "not set" >&6; }
16414 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16415 fi
16416 if test "${ac_cv_file__dev_ptc+set}" != set; then
16417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16418$as_echo_n "checking for /dev/ptc... " >&6; }
16419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16420$as_echo "not set" >&6; }
16421 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16422 fi
16423fi
16424
Matthias Kloseb9621712010-04-24 17:59:49 +000016425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16426$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016427if ${ac_cv_file__dev_ptmx+:} false; then :
16428 $as_echo_n "(cached) " >&6
16429else
16430 test "$cross_compiling" = yes &&
16431 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16432if test -r "/dev/ptmx"; then
16433 ac_cv_file__dev_ptmx=yes
16434else
16435 ac_cv_file__dev_ptmx=no
16436fi
16437fi
16438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16439$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16440if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016441
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016442fi
16443
16444if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016445
Matthias Kloseb9621712010-04-24 17:59:49 +000016446$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016447
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16450$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016451if ${ac_cv_file__dev_ptc+:} false; then :
16452 $as_echo_n "(cached) " >&6
16453else
16454 test "$cross_compiling" = yes &&
16455 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16456if test -r "/dev/ptc"; then
16457 ac_cv_file__dev_ptc=yes
16458else
16459 ac_cv_file__dev_ptc=no
16460fi
16461fi
16462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16463$as_echo "$ac_cv_file__dev_ptc" >&6; }
16464if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016465
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016466fi
16467
16468if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016469
Matthias Kloseb9621712010-04-24 17:59:49 +000016470$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016471
Neal Norwitz865400f2003-03-21 01:42:58 +000016472fi
16473
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016474if test $ac_sys_system = Darwin
16475then
16476 LIBS="$LIBS -framework CoreFoundation"
16477fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016478
Matthias Kloseb9621712010-04-24 17:59:49 +000016479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16480$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016481if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016482 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016483else
Matthias Kloseb9621712010-04-24 17:59:49 +000016484 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016485 ac_cv_have_size_t_format="cross -- assuming yes"
16486
Thomas Wouters477c8d52006-05-27 19:21:47 +000016487else
Matthias Kloseb9621712010-04-24 17:59:49 +000016488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016489/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016490
Thomas Wouters477c8d52006-05-27 19:21:47 +000016491#include <stdio.h>
16492#include <stddef.h>
16493#include <string.h>
16494
Christian Heimes2c181612007-12-17 20:04:13 +000016495#ifdef HAVE_SYS_TYPES_H
16496#include <sys/types.h>
16497#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016498
16499#ifdef HAVE_SSIZE_T
16500typedef ssize_t Py_ssize_t;
16501#elif SIZEOF_VOID_P == SIZEOF_LONG
16502typedef long Py_ssize_t;
16503#else
16504typedef int Py_ssize_t;
16505#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016506
Christian Heimes2c181612007-12-17 20:04:13 +000016507int main()
16508{
16509 char buffer[256];
16510
Thomas Wouters477c8d52006-05-27 19:21:47 +000016511 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16512 return 1;
16513
Thomas Wouters89f507f2006-12-13 04:49:30 +000016514 if (strcmp(buffer, "123"))
16515 return 1;
16516
16517 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16518 return 1;
16519
16520 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016521 return 1;
16522
16523 return 0;
16524}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016525
Thomas Wouters477c8d52006-05-27 19:21:47 +000016526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016527if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016528 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016529else
Matthias Kloseb9621712010-04-24 17:59:49 +000016530 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16533 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016534fi
16535
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16538$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016539if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016540
Matthias Kloseb9621712010-04-24 17:59:49 +000016541$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016542
16543fi
16544
Matthias Kloseb9621712010-04-24 17:59:49 +000016545ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016546#ifdef HAVE_SYS_TYPES_H
16547#include <sys/types.h>
16548#endif
16549#ifdef HAVE_SYS_SOCKET_H
16550#include <sys/socket.h>
16551#endif
16552
Matthias Kloseb9621712010-04-24 17:59:49 +000016553"
Victor Stinnere0be4232011-10-25 13:06:09 +020016554if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016555
Martin v. Löwis11437992002-04-12 09:54:03 +000016556else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016557
Matthias Kloseb9621712010-04-24 17:59:49 +000016558$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016559
16560fi
16561
Michael W. Hudson54241132001-12-07 15:38:26 +000016562
Matthias Kloseb9621712010-04-24 17:59:49 +000016563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16564$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016565if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016566 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016567else
Matthias Kloseb9621712010-04-24 17:59:49 +000016568 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016569 ac_cv_broken_mbstowcs=no
16570else
Matthias Kloseb9621712010-04-24 17:59:49 +000016571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016572/* end confdefs.h. */
16573
Stefan Krah19c21392012-11-22 23:47:32 +010016574#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016575#include<stdlib.h>
16576int main() {
16577 size_t len = -1;
16578 const char *str = "text";
16579 len = mbstowcs(NULL, str, 0);
16580 return (len != 4);
16581}
16582
16583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016584if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016585 ac_cv_broken_mbstowcs=no
16586else
Matthias Kloseb9621712010-04-24 17:59:49 +000016587 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016591fi
16592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016593fi
16594
Matthias Kloseb9621712010-04-24 17:59:49 +000016595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16596$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016597if test "$ac_cv_broken_mbstowcs" = yes
16598then
16599
Matthias Kloseb9621712010-04-24 17:59:49 +000016600$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016601
16602fi
16603
Antoine Pitroub52ec782009-01-25 16:34:23 +000016604# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16606$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016607
16608# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016609if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016610 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016611if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016612then
16613
Matthias Kloseb9621712010-04-24 17:59:49 +000016614$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016615
Matthias Kloseb9621712010-04-24 17:59:49 +000016616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16617$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016618fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016619if test "$withval" = no
16620then
16621
16622$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16623
Matthias Kloseb9621712010-04-24 17:59:49 +000016624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16625$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016626fi
16627
Antoine Pitrou042b1282010-08-13 21:15:58 +000016628else
16629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16630$as_echo "no value specified" >&6; }
16631fi
16632
Antoine Pitroub52ec782009-01-25 16:34:23 +000016633
Matthias Kloseb17289e2012-03-15 19:51:34 +010016634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16635$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16636if ${ac_cv_computed_gotos+:} false; then :
16637 $as_echo_n "(cached) " >&6
16638else
16639 if test "$cross_compiling" = yes; then :
16640 if test "${with_computed_gotos+set}" = set; then
16641 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16642 else
16643 ac_cv_computed_gotos=no
16644 fi
16645else
16646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16647/* end confdefs.h. */
16648
16649int main(int argc, char **argv)
16650{
16651 static void *targets[1] = { &&LABEL1 };
16652 goto LABEL2;
16653LABEL1:
16654 return 0;
16655LABEL2:
16656 goto *targets[0];
16657 return 1;
16658}
16659
16660_ACEOF
16661if ac_fn_c_try_run "$LINENO"; then :
16662 ac_cv_computed_gotos=yes
16663else
16664 ac_cv_computed_gotos=no
16665fi
16666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16667 conftest.$ac_objext conftest.beam conftest.$ac_ext
16668fi
16669
16670fi
16671
16672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16673$as_echo "$ac_cv_computed_gotos" >&6; }
16674case "$ac_cv_computed_gotos" in yes*)
16675
16676$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16677
16678esac
16679
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016680case $ac_sys_system in
16681AIX*)
16682
16683$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16684 ;;
16685esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016686
Michael W. Hudson54241132001-12-07 15:38:26 +000016687
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016688
16689
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016690for h in `(cd $srcdir;echo Python/thread_*.h)`
16691do
16692 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16693done
16694
Michael W. Hudson54241132001-12-07 15:38:26 +000016695
Victor Stinner21a74a92019-04-11 22:28:12 +020016696SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16698$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016699for dir in $SRCDIRS; do
16700 if test ! -d $dir; then
16701 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016702 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016703done
Matthias Kloseb9621712010-04-24 17:59:49 +000016704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16705$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016706
Stefan Krah1919b7e2012-03-21 18:25:23 +010016707# Availability of -O2:
16708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16709$as_echo_n "checking for -O2... " >&6; }
16710saved_cflags="$CFLAGS"
16711CFLAGS="-O2"
16712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16713/* end confdefs.h. */
16714
16715int
16716main ()
16717{
16718
16719
16720 ;
16721 return 0;
16722}
16723_ACEOF
16724if ac_fn_c_try_compile "$LINENO"; then :
16725 have_O2=yes
16726else
16727 have_O2=no
16728fi
16729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16731$as_echo "$have_O2" >&6; }
16732CFLAGS="$saved_cflags"
16733
16734# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16735# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16737$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16738saved_cflags="$CFLAGS"
16739CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16740if test "$have_O2" = no; then
16741 CFLAGS=""
16742fi
16743if test "$cross_compiling" = yes; then :
16744 have_glibc_memmove_bug=undefined
16745else
16746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16747/* end confdefs.h. */
16748
16749#include <stdio.h>
16750#include <stdlib.h>
16751#include <string.h>
16752void foo(void *p, void *q) { memmove(p, q, 19); }
16753int main() {
16754 char a[32] = "123456789000000000";
16755 foo(&a[9], a);
16756 if (strcmp(a, "123456789123456789000000000") != 0)
16757 return 1;
16758 foo(a, &a[9]);
16759 if (strcmp(a, "123456789000000000") != 0)
16760 return 1;
16761 return 0;
16762}
16763
16764_ACEOF
16765if ac_fn_c_try_run "$LINENO"; then :
16766 have_glibc_memmove_bug=no
16767else
16768 have_glibc_memmove_bug=yes
16769fi
16770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16771 conftest.$ac_objext conftest.beam conftest.$ac_ext
16772fi
16773
16774CFLAGS="$saved_cflags"
16775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16776$as_echo "$have_glibc_memmove_bug" >&6; }
16777if test "$have_glibc_memmove_bug" = yes; then
16778
16779$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16780
16781fi
16782
16783if test "$have_gcc_asm_for_x87" = yes; then
16784 # Some versions of gcc miscompile inline asm:
16785 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16786 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16787 case $CC in
16788 *gcc*)
16789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16790$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16791 saved_cflags="$CFLAGS"
16792 CFLAGS="-O2"
16793 if test "$cross_compiling" = yes; then :
16794 have_ipa_pure_const_bug=undefined
16795else
16796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16797/* end confdefs.h. */
16798
16799 __attribute__((noinline)) int
16800 foo(int *p) {
16801 int r;
16802 asm ( "movl \$6, (%1)\n\t"
16803 "xorl %0, %0\n\t"
16804 : "=r" (r) : "r" (p) : "memory"
16805 );
16806 return r;
16807 }
16808 int main() {
16809 int p = 8;
16810 if ((foo(&p) ? : p) != 6)
16811 return 1;
16812 return 0;
16813 }
16814
16815_ACEOF
16816if ac_fn_c_try_run "$LINENO"; then :
16817 have_ipa_pure_const_bug=no
16818else
16819 have_ipa_pure_const_bug=yes
16820fi
16821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16822 conftest.$ac_objext conftest.beam conftest.$ac_ext
16823fi
16824
16825 CFLAGS="$saved_cflags"
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16827$as_echo "$have_ipa_pure_const_bug" >&6; }
16828 if test "$have_ipa_pure_const_bug" = yes; then
16829
16830$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16831
16832 fi
16833 ;;
16834 esac
16835fi
16836
Victor Stinner4f5366e2015-01-09 02:13:19 +010016837# Check for stdatomic.h
16838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16839$as_echo_n "checking for stdatomic.h... " >&6; }
16840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16841/* end confdefs.h. */
16842
16843
16844 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016845 atomic_int int_var;
16846 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016847 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016848 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16849 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16850 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016851 return 0;
16852 }
16853
16854
16855_ACEOF
16856if ac_fn_c_try_link "$LINENO"; then :
16857 have_stdatomic_h=yes
16858else
16859 have_stdatomic_h=no
16860fi
16861rm -f core conftest.err conftest.$ac_objext \
16862 conftest$ac_exeext conftest.$ac_ext
16863
16864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16865$as_echo "$have_stdatomic_h" >&6; }
16866
16867if test "$have_stdatomic_h" = yes; then
16868
16869$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16870
16871fi
16872
16873# Check for GCC >= 4.7 __atomic builtins
16874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16875$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16877/* end confdefs.h. */
16878
16879
16880 volatile int val = 1;
16881 int main() {
16882 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16883 return 0;
16884 }
16885
16886
16887_ACEOF
16888if ac_fn_c_try_link "$LINENO"; then :
16889 have_builtin_atomic=yes
16890else
16891 have_builtin_atomic=no
16892fi
16893rm -f core conftest.err conftest.$ac_objext \
16894 conftest$ac_exeext conftest.$ac_ext
16895
16896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16897$as_echo "$have_builtin_atomic" >&6; }
16898
16899if test "$have_builtin_atomic" = yes; then
16900
16901$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16902
16903fi
16904
Ned Deily322f5ba2013-11-21 23:01:59 -080016905# ensurepip option
16906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16907$as_echo_n "checking for ensurepip... " >&6; }
16908
16909# Check whether --with-ensurepip was given.
16910if test "${with_ensurepip+set}" = set; then :
16911 withval=$with_ensurepip;
16912else
16913 with_ensurepip=upgrade
16914fi
16915
16916case $with_ensurepip in #(
16917 yes|upgrade) :
16918 ENSUREPIP=upgrade ;; #(
16919 install) :
16920 ENSUREPIP=install ;; #(
16921 no) :
16922 ENSUREPIP=no ;; #(
16923 *) :
16924 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16925esac
16926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16927$as_echo "$ENSUREPIP" >&6; }
16928
16929
Victor Stinner35a97c02015-03-08 02:59:09 +010016930# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16932$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16934/* end confdefs.h. */
16935
16936
16937 #include <dirent.h>
16938
16939 int main() {
16940 struct dirent entry;
16941 return entry.d_type == DT_UNKNOWN;
16942 }
16943
16944
16945_ACEOF
16946if ac_fn_c_try_link "$LINENO"; then :
16947 have_dirent_d_type=yes
16948else
16949 have_dirent_d_type=no
16950fi
16951rm -f core conftest.err conftest.$ac_objext \
16952 conftest$ac_exeext conftest.$ac_ext
16953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16954$as_echo "$have_dirent_d_type" >&6; }
16955
16956if test "$have_dirent_d_type" = yes; then
16957
16958$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16959
16960fi
16961
Victor Stinner9eb57c52015-03-19 22:21:49 +010016962# check if the Linux getrandom() syscall is available
16963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16964$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16966/* end confdefs.h. */
16967
16968
Victor Stinner1b80b242016-04-12 22:34:58 +020016969 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016970 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016971 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016972
16973 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016974 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016975 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016976 const int flags = GRND_NONBLOCK;
16977 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016978 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016979 return 0;
16980 }
16981
16982
16983_ACEOF
16984if ac_fn_c_try_link "$LINENO"; then :
16985 have_getrandom_syscall=yes
16986else
16987 have_getrandom_syscall=no
16988fi
16989rm -f core conftest.err conftest.$ac_objext \
16990 conftest$ac_exeext conftest.$ac_ext
16991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16992$as_echo "$have_getrandom_syscall" >&6; }
16993
16994if test "$have_getrandom_syscall" = yes; then
16995
16996$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16997
16998fi
16999
Victor Stinner3abf44e2015-09-18 15:38:37 +020017000# check if the getrandom() function is available
17001# the test was written for the Solaris function of <sys/random.h>
17002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17003$as_echo_n "checking for the getrandom() function... " >&6; }
17004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17005/* end confdefs.h. */
17006
17007
17008 #include <sys/random.h>
17009
17010 int main() {
17011 char buffer[1];
17012 const size_t buflen = sizeof(buffer);
17013 const int flags = 0;
17014 /* ignore the result, Python checks for ENOSYS at runtime */
17015 (void)getrandom(buffer, buflen, flags);
17016 return 0;
17017 }
17018
17019
17020_ACEOF
17021if ac_fn_c_try_link "$LINENO"; then :
17022 have_getrandom=yes
17023else
17024 have_getrandom=no
17025fi
17026rm -f core conftest.err conftest.$ac_objext \
17027 conftest$ac_exeext conftest.$ac_ext
17028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17029$as_echo "$have_getrandom" >&6; }
17030
17031if test "$have_getrandom" = yes; then
17032
17033$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17034
17035fi
17036
Neil Schemenauer5741c452019-02-08 10:48:46 -080017037# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17038# shm_* may only be available if linking against librt
17039save_LIBS="$LIBS"
17040save_includes_default="$ac_includes_default"
17041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17042$as_echo_n "checking for library containing shm_open... " >&6; }
17043if ${ac_cv_search_shm_open+:} false; then :
17044 $as_echo_n "(cached) " >&6
17045else
17046 ac_func_search_save_LIBS=$LIBS
17047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17048/* end confdefs.h. */
17049
17050/* Override any GCC internal prototype to avoid an error.
17051 Use char because int might match the return type of a GCC
17052 builtin and then its argument prototype would still apply. */
17053#ifdef __cplusplus
17054extern "C"
17055#endif
17056char shm_open ();
17057int
17058main ()
17059{
17060return shm_open ();
17061 ;
17062 return 0;
17063}
17064_ACEOF
17065for ac_lib in '' rt; do
17066 if test -z "$ac_lib"; then
17067 ac_res="none required"
17068 else
17069 ac_res=-l$ac_lib
17070 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17071 fi
17072 if ac_fn_c_try_link "$LINENO"; then :
17073 ac_cv_search_shm_open=$ac_res
17074fi
17075rm -f core conftest.err conftest.$ac_objext \
17076 conftest$ac_exeext
17077 if ${ac_cv_search_shm_open+:} false; then :
17078 break
17079fi
17080done
17081if ${ac_cv_search_shm_open+:} false; then :
17082
17083else
17084 ac_cv_search_shm_open=no
17085fi
17086rm conftest.$ac_ext
17087LIBS=$ac_func_search_save_LIBS
17088fi
17089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17090$as_echo "$ac_cv_search_shm_open" >&6; }
17091ac_res=$ac_cv_search_shm_open
17092if test "$ac_res" != no; then :
17093 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17094
17095fi
17096
17097if test "$ac_cv_search_shm_open" = "-lrt"; then
17098
17099$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17100
17101fi
17102for ac_header in sys/mman.h
17103do :
17104 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17105if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17106 cat >>confdefs.h <<_ACEOF
17107#define HAVE_SYS_MMAN_H 1
17108_ACEOF
17109
17110fi
17111
17112done
17113
17114# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17115ac_includes_default="\
17116${ac_includes_default}
17117#ifndef __cplusplus
17118# ifdef HAVE_SYS_MMAN_H
17119# include <sys/mman.h>
17120# endif
17121#endif
17122"
17123for ac_func in shm_open shm_unlink
17124do :
17125 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17126ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17127if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17128 cat >>confdefs.h <<_ACEOF
17129#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17130_ACEOF
17131
17132fi
17133done
17134
17135# we don't want to link with librt always, restore LIBS
17136LIBS="$save_LIBS"
17137ac_includes_default="$save_includes_default"
17138
Christian Heimesff5be6e2018-01-20 13:19:21 +010017139# Check for usable OpenSSL
17140
17141 found=false
17142
17143# Check whether --with-openssl was given.
17144if test "${with_openssl+set}" = set; then :
17145 withval=$with_openssl;
17146 case "$withval" in
17147 "" | y | ye | yes | n | no)
17148 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17149 ;;
17150 *) ssldirs="$withval"
17151 ;;
17152 esac
17153
17154else
17155
17156 # if pkg-config is installed and openssl has installed a .pc file,
17157 # then use that information and don't search ssldirs
17158 if test -n "$ac_tool_prefix"; then
17159 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17160set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17162$as_echo_n "checking for $ac_word... " >&6; }
17163if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17164 $as_echo_n "(cached) " >&6
17165else
17166 if test -n "$PKG_CONFIG"; then
17167 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17168else
17169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17170for as_dir in $PATH
17171do
17172 IFS=$as_save_IFS
17173 test -z "$as_dir" && as_dir=.
17174 for ac_exec_ext in '' $ac_executable_extensions; do
17175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17176 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17178 break 2
17179 fi
17180done
17181 done
17182IFS=$as_save_IFS
17183
17184fi
17185fi
17186PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17187if test -n "$PKG_CONFIG"; then
17188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17189$as_echo "$PKG_CONFIG" >&6; }
17190else
17191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17192$as_echo "no" >&6; }
17193fi
17194
17195
17196fi
17197if test -z "$ac_cv_prog_PKG_CONFIG"; then
17198 ac_ct_PKG_CONFIG=$PKG_CONFIG
17199 # Extract the first word of "pkg-config", so it can be a program name with args.
17200set dummy pkg-config; ac_word=$2
17201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17202$as_echo_n "checking for $ac_word... " >&6; }
17203if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17204 $as_echo_n "(cached) " >&6
17205else
17206 if test -n "$ac_ct_PKG_CONFIG"; then
17207 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17208else
17209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17210for as_dir in $PATH
17211do
17212 IFS=$as_save_IFS
17213 test -z "$as_dir" && as_dir=.
17214 for ac_exec_ext in '' $ac_executable_extensions; do
17215 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17216 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17218 break 2
17219 fi
17220done
17221 done
17222IFS=$as_save_IFS
17223
17224fi
17225fi
17226ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17227if test -n "$ac_ct_PKG_CONFIG"; then
17228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17229$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17230else
17231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17232$as_echo "no" >&6; }
17233fi
17234
17235 if test "x$ac_ct_PKG_CONFIG" = x; then
17236 PKG_CONFIG=""
17237 else
17238 case $cross_compiling:$ac_tool_warned in
17239yes:)
17240{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17241$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17242ac_tool_warned=yes ;;
17243esac
17244 PKG_CONFIG=$ac_ct_PKG_CONFIG
17245 fi
17246else
17247 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17248fi
17249
17250 if test x"$PKG_CONFIG" != x""; then
17251 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17252 if test $? = 0; then
17253 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17254 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17255 found=true
17256 fi
17257 fi
17258
17259 # no such luck; use some default ssldirs
17260 if ! $found; then
17261 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17262 fi
17263
17264
17265fi
17266
17267
17268
17269 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17270 # an 'openssl' subdirectory
17271
17272 if ! $found; then
17273 OPENSSL_INCLUDES=
17274 for ssldir in $ssldirs; do
17275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17276$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17277 if test -f "$ssldir/include/openssl/ssl.h"; then
17278 OPENSSL_INCLUDES="-I$ssldir/include"
17279 OPENSSL_LDFLAGS="-L$ssldir/lib"
17280 OPENSSL_LIBS="-lssl -lcrypto"
17281 found=true
17282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17283$as_echo "yes" >&6; }
17284 break
17285 else
17286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17287$as_echo "no" >&6; }
17288 fi
17289 done
17290
17291 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17292 # it will just work!
17293 fi
17294
17295 # try the preprocessor and linker with our new flags,
17296 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17297
17298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17299$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17300 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17301 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17302
17303 save_LIBS="$LIBS"
17304 save_LDFLAGS="$LDFLAGS"
17305 save_CPPFLAGS="$CPPFLAGS"
17306 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17307 LIBS="$OPENSSL_LIBS $LIBS"
17308 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17310/* end confdefs.h. */
17311#include <openssl/ssl.h>
17312int
17313main ()
17314{
17315SSL_new(NULL)
17316 ;
17317 return 0;
17318}
17319_ACEOF
17320if ac_fn_c_try_link "$LINENO"; then :
17321
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17323$as_echo "yes" >&6; }
17324 have_openssl=yes
17325
17326else
17327
17328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17329$as_echo "no" >&6; }
17330 have_openssl=no
17331
17332fi
17333rm -f core conftest.err conftest.$ac_objext \
17334 conftest$ac_exeext conftest.$ac_ext
17335 CPPFLAGS="$save_CPPFLAGS"
17336 LDFLAGS="$save_LDFLAGS"
17337 LIBS="$save_LIBS"
17338
17339
17340
17341
17342
17343
17344if test "$have_openssl" = yes; then
17345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17346$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17347
17348 save_LIBS="$LIBS"
17349 save_LDFLAGS="$LDFLAGS"
17350 save_CPPFLAGS="$CPPFLAGS"
17351 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17352 LIBS="$OPENSSL_LIBS $LIBS"
17353 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17354
17355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17356/* end confdefs.h. */
17357
17358 #include <openssl/x509_vfy.h>
17359
17360int
17361main ()
17362{
17363
17364 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17365 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17366 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17367 X509_VERIFY_PARAM_set_hostflags(p, 0);
17368
17369 ;
17370 return 0;
17371}
17372
17373_ACEOF
17374if ac_fn_c_try_link "$LINENO"; then :
17375
17376 ac_cv_has_x509_verify_param_set1_host=yes
17377
17378else
17379
17380 ac_cv_has_x509_verify_param_set1_host=no
17381
17382fi
17383rm -f core conftest.err conftest.$ac_objext \
17384 conftest$ac_exeext conftest.$ac_ext
17385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17386$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17387 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17388
17389$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17390
17391 fi
17392
17393 CPPFLAGS="$save_CPPFLAGS"
17394 LDFLAGS="$save_LDFLAGS"
17395 LIBS="$save_LIBS"
17396fi
17397
Christian Heimes892d66e2018-01-29 14:10:18 +010017398# ssl module default cipher suite string
17399
17400
17401
17402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17403$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17404
17405# Check whether --with-ssl-default-suites was given.
17406if test "${with_ssl_default_suites+set}" = set; then :
17407 withval=$with_ssl_default_suites;
17408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17409$as_echo "$withval" >&6; }
17410case "$withval" in
17411 python)
17412 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17413
17414 ;;
17415 openssl)
17416 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17417
17418 ;;
17419 *)
17420 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17421
17422 cat >>confdefs.h <<_ACEOF
17423#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17424_ACEOF
17425
17426 ;;
17427esac
17428
17429else
17430
17431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17432$as_echo "python" >&6; }
17433$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17434
17435
17436fi
17437
17438
17439
Guido van Rossum627b2d71993-12-24 10:39:16 +000017440# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017441ac_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 +000017442
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017443ac_config_files="$ac_config_files Modules/ld_so_aix"
17444
Martin v. Löwis11437992002-04-12 09:54:03 +000017445cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017446# This file is a shell script that caches the results of configure
17447# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017448# scripts and configure runs, see configure's option --config-cache.
17449# It is not useful on other systems. If it contains results you don't
17450# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017451#
Martin v. Löwis11437992002-04-12 09:54:03 +000017452# config.status only pays attention to the cache file if you give it
17453# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017454#
Skip Montanaro6dead952003-09-25 14:50:04 +000017455# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017456# loading this file, other *unset* `ac_cv_foo' will be assigned the
17457# following values.
17458
17459_ACEOF
17460
Guido van Rossumf78abae1997-01-21 22:02:36 +000017461# The following way of writing the cache mishandles newlines in values,
17462# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017464# Ultrix sh set writes to stderr and can't be redirected directly,
17465# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466(
17467 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17468 eval ac_val=\$$ac_var
17469 case $ac_val in #(
17470 *${as_nl}*)
17471 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017472 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17473$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474 esac
17475 case $ac_var in #(
17476 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017477 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17478 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479 esac ;;
17480 esac
17481 done
17482
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17485 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017486 # `set' does not quote correctly, so add quotes: double-quote
17487 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017488 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017489 "s/'/'\\\\''/g;
17490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017491 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017492 *)
17493 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017494 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017495 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496 esac |
17497 sort
17498) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017499 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017500 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017502 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017503 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17504 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17506 :end' >>confcache
17507if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17508 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017509 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017510 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17511$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017512 if test ! -f "$cache_file" || test -h "$cache_file"; then
17513 cat confcache >"$cache_file"
17514 else
17515 case $cache_file in #(
17516 */* | ?:*)
17517 mv -f confcache "$cache_file"$$ &&
17518 mv -f "$cache_file"$$ "$cache_file" ;; #(
17519 *)
17520 mv -f confcache "$cache_file" ;;
17521 esac
17522 fi
17523 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017524 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017525 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17526$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017527 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017528fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017529rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017530
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017531test "x$prefix" = xNONE && prefix=$ac_default_prefix
17532# Let make expand exec_prefix.
17533test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017534
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017535DEFS=-DHAVE_CONFIG_H
17536
Skip Montanaro6dead952003-09-25 14:50:04 +000017537ac_libobjs=
17538ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017539U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017540for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17541 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017543 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17545 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017546 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17547 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017548done
17549LIBOBJS=$ac_libobjs
17550
17551LTLIBOBJS=$ac_ltlibobjs
17552
17553
Martin v. Löwis11437992002-04-12 09:54:03 +000017554
Matthias Kloseb9621712010-04-24 17:59:49 +000017555
Victor Stinnere0be4232011-10-25 13:06:09 +020017556: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017557ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017558ac_clean_files_save=$ac_clean_files
17559ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017560{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17561$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17562as_write_fail=0
17563cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017564#! $SHELL
17565# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017566# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017567# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017568# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017569
Martin v. Löwis11437992002-04-12 09:54:03 +000017570debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017571ac_cs_recheck=false
17572ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017573
Matthias Kloseb9621712010-04-24 17:59:49 +000017574SHELL=\${CONFIG_SHELL-$SHELL}
17575export SHELL
17576_ASEOF
17577cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17578## -------------------- ##
17579## M4sh Initialization. ##
17580## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582# Be more Bourne compatible
17583DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017584if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017585 emulate sh
17586 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017587 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017588 # is contrary to our usage. Disable this feature.
17589 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017591else
Matthias Kloseb9621712010-04-24 17:59:49 +000017592 case `(set -o) 2>/dev/null` in #(
17593 *posix*) :
17594 set -o posix ;; #(
17595 *) :
17596 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017598fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017599
17600
Matthias Kloseb9621712010-04-24 17:59:49 +000017601as_nl='
17602'
17603export as_nl
17604# Printing a long string crashes Solaris 7 /usr/bin/printf.
17605as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17606as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17607as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17608# Prefer a ksh shell builtin over an external printf program on Solaris,
17609# but without wasting forks for bash or zsh.
17610if test -z "$BASH_VERSION$ZSH_VERSION" \
17611 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17612 as_echo='print -r --'
17613 as_echo_n='print -rn --'
17614elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17615 as_echo='printf %s\n'
17616 as_echo_n='printf %s'
17617else
17618 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17619 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17620 as_echo_n='/usr/ucb/echo -n'
17621 else
17622 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17623 as_echo_n_body='eval
17624 arg=$1;
17625 case $arg in #(
17626 *"$as_nl"*)
17627 expr "X$arg" : "X\\(.*\\)$as_nl";
17628 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17629 esac;
17630 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17631 '
17632 export as_echo_n_body
17633 as_echo_n='sh -c $as_echo_n_body as_echo'
17634 fi
17635 export as_echo_body
17636 as_echo='sh -c $as_echo_body as_echo'
17637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017638
17639# The user is always right.
17640if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017641 PATH_SEPARATOR=:
17642 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17643 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17644 PATH_SEPARATOR=';'
17645 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648
17649# IFS
17650# We need space, tab and new line, in precisely that order. Quoting is
17651# there to prevent editors from complaining about space-tab.
17652# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17653# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654IFS=" "" $as_nl"
17655
17656# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017657as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017658case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659 *[\\/]* ) as_myself=$0 ;;
17660 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017661for as_dir in $PATH
17662do
17663 IFS=$as_save_IFS
17664 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017665 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17666 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669 ;;
17670esac
17671# We did not find ourselves, most probably we were run as `sh COMMAND'
17672# in which case we are not to be found in the path.
17673if test "x$as_myself" = x; then
17674 as_myself=$0
17675fi
17676if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017677 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17678 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679fi
17680
Matthias Kloseb9621712010-04-24 17:59:49 +000017681# Unset variables that we do not need and which cause bugs (e.g. in
17682# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17683# suppresses any "Segmentation fault" message there. '((' could
17684# trigger a bug in pdksh 5.2.14.
17685for as_var in BASH_ENV ENV MAIL MAILPATH
17686do eval test x\${$as_var+set} = xset \
17687 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688done
17689PS1='$ '
17690PS2='> '
17691PS4='+ '
17692
17693# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017694LC_ALL=C
17695export LC_ALL
17696LANGUAGE=C
17697export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698
Matthias Kloseb9621712010-04-24 17:59:49 +000017699# CDPATH.
17700(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17701
17702
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017703# as_fn_error STATUS ERROR [LINENO LOG_FD]
17704# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017705# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17706# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017707# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017708as_fn_error ()
17709{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017710 as_status=$1; test $as_status -eq 0 && as_status=1
17711 if test "$4"; then
17712 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17713 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017714 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017715 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017716 as_fn_exit $as_status
17717} # as_fn_error
17718
17719
17720# as_fn_set_status STATUS
17721# -----------------------
17722# Set $? to STATUS, without forking.
17723as_fn_set_status ()
17724{
17725 return $1
17726} # as_fn_set_status
17727
17728# as_fn_exit STATUS
17729# -----------------
17730# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17731as_fn_exit ()
17732{
17733 set +e
17734 as_fn_set_status $1
17735 exit $1
17736} # as_fn_exit
17737
17738# as_fn_unset VAR
17739# ---------------
17740# Portably unset VAR.
17741as_fn_unset ()
17742{
17743 { eval $1=; unset $1;}
17744}
17745as_unset=as_fn_unset
17746# as_fn_append VAR VALUE
17747# ----------------------
17748# Append the text in VALUE to the end of the definition contained in VAR. Take
17749# advantage of any shell optimizations that allow amortized linear growth over
17750# repeated appends, instead of the typical quadratic growth present in naive
17751# implementations.
17752if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17753 eval 'as_fn_append ()
17754 {
17755 eval $1+=\$2
17756 }'
17757else
17758 as_fn_append ()
17759 {
17760 eval $1=\$$1\$2
17761 }
17762fi # as_fn_append
17763
17764# as_fn_arith ARG...
17765# ------------------
17766# Perform arithmetic evaluation on the ARGs, and store the result in the
17767# global $as_val. Take advantage of shells that can avoid forks. The arguments
17768# must be portable across $(()) and expr.
17769if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17770 eval 'as_fn_arith ()
17771 {
17772 as_val=$(( $* ))
17773 }'
17774else
17775 as_fn_arith ()
17776 {
17777 as_val=`expr "$@" || test $? -eq 1`
17778 }
17779fi # as_fn_arith
17780
17781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782if expr a : '\(a\)' >/dev/null 2>&1 &&
17783 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17784 as_expr=expr
17785else
17786 as_expr=false
17787fi
17788
17789if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17790 as_basename=basename
17791else
17792 as_basename=false
17793fi
17794
Matthias Kloseb9621712010-04-24 17:59:49 +000017795if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17796 as_dirname=dirname
17797else
17798 as_dirname=false
17799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801as_me=`$as_basename -- "$0" ||
17802$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17803 X"$0" : 'X\(//\)$' \| \
17804 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017805$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806 sed '/^.*\/\([^/][^/]*\)\/*$/{
17807 s//\1/
17808 q
17809 }
17810 /^X\/\(\/\/\)$/{
17811 s//\1/
17812 q
17813 }
17814 /^X\/\(\/\).*/{
17815 s//\1/
17816 q
17817 }
17818 s/.*/./; q'`
17819
Matthias Kloseb9621712010-04-24 17:59:49 +000017820# Avoid depending upon Character Ranges.
17821as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17822as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17823as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17824as_cr_digits='0123456789'
17825as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826
17827ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017828case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017830 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017832 xy) ECHO_C='\c';;
17833 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17834 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835 esac;;
17836*)
17837 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017839
Martin v. Löwis11437992002-04-12 09:54:03 +000017840rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017841if test -d conf$$.dir; then
17842 rm -f conf$$.dir/conf$$.file
17843else
17844 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017845 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017847if (echo >conf$$.file) 2>/dev/null; then
17848 if ln -s conf$$.file conf$$ 2>/dev/null; then
17849 as_ln_s='ln -s'
17850 # ... but there are two gotchas:
17851 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17852 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017853 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017854 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017855 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017856 elif ln conf$$.file conf$$ 2>/dev/null; then
17857 as_ln_s=ln
17858 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017859 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017860 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017861else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017862 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017864rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17865rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017866
Matthias Kloseb9621712010-04-24 17:59:49 +000017867
17868# as_fn_mkdir_p
17869# -------------
17870# Create "$as_dir" as a directory, including parents if necessary.
17871as_fn_mkdir_p ()
17872{
17873
17874 case $as_dir in #(
17875 -*) as_dir=./$as_dir;;
17876 esac
17877 test -d "$as_dir" || eval $as_mkdir_p || {
17878 as_dirs=
17879 while :; do
17880 case $as_dir in #(
17881 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17882 *) as_qdir=$as_dir;;
17883 esac
17884 as_dirs="'$as_qdir' $as_dirs"
17885 as_dir=`$as_dirname -- "$as_dir" ||
17886$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17887 X"$as_dir" : 'X\(//\)[^/]' \| \
17888 X"$as_dir" : 'X\(//\)$' \| \
17889 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17890$as_echo X"$as_dir" |
17891 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17892 s//\1/
17893 q
17894 }
17895 /^X\(\/\/\)[^/].*/{
17896 s//\1/
17897 q
17898 }
17899 /^X\(\/\/\)$/{
17900 s//\1/
17901 q
17902 }
17903 /^X\(\/\).*/{
17904 s//\1/
17905 q
17906 }
17907 s/.*/./; q'`
17908 test -d "$as_dir" && break
17909 done
17910 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017911 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017912
17913
17914} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017915if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017916 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017917else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017918 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017919 as_mkdir_p=false
17920fi
17921
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017922
17923# as_fn_executable_p FILE
17924# -----------------------
17925# Test if FILE is an executable regular file.
17926as_fn_executable_p ()
17927{
17928 test -f "$1" && test -x "$1"
17929} # as_fn_executable_p
17930as_test_x='test -x'
17931as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017932
17933# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017934as_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 +000017935
17936# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017937as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017938
17939
Martin v. Löwis11437992002-04-12 09:54:03 +000017940exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017941## ----------------------------------- ##
17942## Main body of $CONFIG_STATUS script. ##
17943## ----------------------------------- ##
17944_ASEOF
17945test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017946
Matthias Kloseb9621712010-04-24 17:59:49 +000017947cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17948# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017949# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017950# values after options handling.
17951ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017952This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017953generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017954
17955 CONFIG_FILES = $CONFIG_FILES
17956 CONFIG_HEADERS = $CONFIG_HEADERS
17957 CONFIG_LINKS = $CONFIG_LINKS
17958 CONFIG_COMMANDS = $CONFIG_COMMANDS
17959 $ $0 $@
17960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961on `(hostname || uname -n) 2>/dev/null | sed 1q`
17962"
17963
Martin v. Löwis11437992002-04-12 09:54:03 +000017964_ACEOF
17965
Matthias Kloseb9621712010-04-24 17:59:49 +000017966case $ac_config_files in *"
17967"*) set x $ac_config_files; shift; ac_config_files=$*;;
17968esac
17969
17970case $ac_config_headers in *"
17971"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17972esac
17973
17974
17975cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017976# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017977config_files="$ac_config_files"
17978config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017981
Matthias Kloseb9621712010-04-24 17:59:49 +000017982cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017983ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017984\`$as_me' instantiates files and other configuration actions
17985from templates according to the current configuration. Unless the files
17986and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017987
Matthias Kloseb9621712010-04-24 17:59:49 +000017988Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017989
17990 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017992 --config print configuration, then exit
17993 -q, --quiet, --silent
17994 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017995 -d, --debug don't remove temporary files
17996 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017997 --file=FILE[:TEMPLATE]
17998 instantiate the configuration file FILE
17999 --header=FILE[:TEMPLATE]
18000 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018001
18002Configuration files:
18003$config_files
18004
18005Configuration headers:
18006$config_headers
18007
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018008Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018011cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18012ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018013ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018014python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018015configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018016 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018017
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018018Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018019This config.status script is free software; the Free Software Foundation
18020gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021
18022ac_pwd='$ac_pwd'
18023srcdir='$srcdir'
18024INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018025MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018026test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018027_ACEOF
18028
Matthias Kloseb9621712010-04-24 17:59:49 +000018029cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18030# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018031ac_need_defaults=:
18032while test $# != 0
18033do
18034 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018035 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18037 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018038 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018040 --*=)
18041 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18042 ac_optarg=
18043 ac_shift=:
18044 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018046 ac_option=$1
18047 ac_optarg=$2
18048 ac_shift=shift
18049 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018050 esac
18051
Skip Montanaro6dead952003-09-25 14:50:04 +000018052 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018053 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018054 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18055 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018056 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018057 $as_echo "$ac_cs_version"; exit ;;
18058 --config | --confi | --conf | --con | --co | --c )
18059 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018061 debug=: ;;
18062 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018063 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018064 case $ac_optarg in
18065 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018066 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018067 esac
18068 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018069 ac_need_defaults=false;;
18070 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018071 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018072 case $ac_optarg in
18073 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18074 esac
18075 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018076 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077 --he | --h)
18078 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018079 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018080Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018082 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018083 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18084 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18085 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018086
18087 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018088 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018089Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018090
Matthias Kloseb9621712010-04-24 17:59:49 +000018091 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018093
18094 esac
18095 shift
18096done
18097
Skip Montanaro6dead952003-09-25 14:50:04 +000018098ac_configure_extra_args=
18099
18100if $ac_cs_silent; then
18101 exec 6>/dev/null
18102 ac_configure_extra_args="$ac_configure_extra_args --silent"
18103fi
18104
18105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018106cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018107if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018108 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018109 shift
18110 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18111 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018113 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018114fi
18115
Martin v. Löwis11437992002-04-12 09:54:03 +000018116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018117cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118exec 5>>config.log
18119{
18120 echo
18121 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18122## Running $as_me. ##
18123_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018124 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018130
Matthias Kloseb9621712010-04-24 17:59:49 +000018131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018132
18133# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018134for ac_config_target in $ac_config_targets
18135do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136 case $ac_config_target in
18137 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18138 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18139 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018140 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18141 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018143 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018144 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018145 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018146 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147
Victor Stinnere0be4232011-10-25 13:06:09 +020018148 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018149 esac
18150done
18151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152
Martin v. Löwis11437992002-04-12 09:54:03 +000018153# If the user did not use the arguments to specify the items to instantiate,
18154# then the envvar interface is used. Set only those that are not.
18155# We use the long form for the default assignment because of an extremely
18156# bizarre bug on SunOS 4.1.3.
18157if $ac_need_defaults; then
18158 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18159 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18160fi
18161
Skip Montanaro6dead952003-09-25 14:50:04 +000018162# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018164# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165# Hook for its removal unless debugging.
18166# Note that there is a small window in which the directory will not be cleaned:
18167# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018168$debug ||
18169{
Victor Stinnere0be4232011-10-25 13:06:09 +020018170 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018172 : "${ac_tmp:=$tmp}"
18173 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018174' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018175 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018176}
Martin v. Löwis11437992002-04-12 09:54:03 +000018177# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018178
Martin v. Löwis11437992002-04-12 09:54:03 +000018179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018180 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018181 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018182} ||
18183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184 tmp=./conf$$-$RANDOM
18185 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018186} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018187ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018188
Matthias Kloseb9621712010-04-24 17:59:49 +000018189# Set up the scripts for CONFIG_FILES section.
18190# No need to generate them if there are no CONFIG_FILES.
18191# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018192if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018193
Matthias Kloseb9621712010-04-24 17:59:49 +000018194
18195ac_cr=`echo X | tr X '\015'`
18196# On cygwin, bash can eat \r inside `` if the user requested igncr.
18197# But we know of no other shell where ac_cr would be empty at this
18198# point, so we can use a bashism as a fallback.
18199if test "x$ac_cr" = x; then
18200 eval ac_cr=\$\'\\r\'
18201fi
18202ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18203if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018204 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018205else
18206 ac_cs_awk_cr=$ac_cr
18207fi
18208
Victor Stinnere0be4232011-10-25 13:06:09 +020018209echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018210_ACEOF
18211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212
Matthias Kloseb9621712010-04-24 17:59:49 +000018213{
18214 echo "cat >conf$$subs.awk <<_ACEOF" &&
18215 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18216 echo "_ACEOF"
18217} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018218 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18219ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018220ac_delim='%!_!# '
18221for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018222 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018223 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224
Matthias Kloseb9621712010-04-24 17:59:49 +000018225 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18226 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018227 break
18228 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018229 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230 else
18231 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018232 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233done
Matthias Kloseb9621712010-04-24 17:59:49 +000018234rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235
Matthias Kloseb9621712010-04-24 17:59:49 +000018236cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018237cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018239sed -n '
18240h
18241s/^/S["/; s/!.*/"]=/
18242p
18243g
18244s/^[^!]*!//
18245:repl
18246t repl
18247s/'"$ac_delim"'$//
18248t delim
18249:nl
18250h
18251s/\(.\{148\}\)..*/\1/
18252t more1
18253s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18254p
18255n
18256b repl
18257:more1
18258s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18259p
18260g
18261s/.\{148\}//
18262t nl
18263:delim
18264h
18265s/\(.\{148\}\)..*/\1/
18266t more2
18267s/["\\]/\\&/g; s/^/"/; s/$/"/
18268p
18269b
18270:more2
18271s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18272p
18273g
18274s/.\{148\}//
18275t delim
18276' <conf$$subs.awk | sed '
18277/^[^""]/{
18278 N
18279 s/\n//
18280}
18281' >>$CONFIG_STATUS || ac_write_fail=1
18282rm -f conf$$subs.awk
18283cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18284_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018285cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018286 for (key in S) S_is_set[key] = 1
18287 FS = ""
18288
18289}
18290{
18291 line = $ 0
18292 nfields = split(line, field, "@")
18293 substed = 0
18294 len = length(field[1])
18295 for (i = 2; i < nfields; i++) {
18296 key = field[i]
18297 keylen = length(key)
18298 if (S_is_set[key]) {
18299 value = S[key]
18300 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18301 len += length(value) + length(field[++i])
18302 substed = 1
18303 } else
18304 len += 1 + keylen
18305 }
18306
18307 print line
18308}
18309
18310_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018312cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18313if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18314 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18315else
18316 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018317fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018318 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018319_ACEOF
18320
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018321# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18322# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018323# trailing colons and then remove the whole line if VPATH becomes empty
18324# (actually we leave an empty line to preserve line numbers).
18325if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018326 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18327h
18328s///
18329s/^/:/
18330s/[ ]*$/:/
18331s/:\$(srcdir):/:/g
18332s/:\${srcdir}:/:/g
18333s/:@srcdir@:/:/g
18334s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018335s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018336x
18337s/\(=[ ]*\).*/\1/
18338G
18339s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340s/^[^=]*=[ ]*$//
18341}'
18342fi
18343
Matthias Kloseb9621712010-04-24 17:59:49 +000018344cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018345fi # test -n "$CONFIG_FILES"
18346
Matthias Kloseb9621712010-04-24 17:59:49 +000018347# Set up the scripts for CONFIG_HEADERS section.
18348# No need to generate them if there are no CONFIG_HEADERS.
18349# This happens for instance with `./config.status Makefile'.
18350if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018351cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018352BEGIN {
18353_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354
Matthias Kloseb9621712010-04-24 17:59:49 +000018355# Transform confdefs.h into an awk script `defines.awk', embedded as
18356# here-document in config.status, that substitutes the proper values into
18357# config.h.in to produce config.h.
18358
18359# Create a delimiter string that does not exist in confdefs.h, to ease
18360# handling of long lines.
18361ac_delim='%!_!# '
18362for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018363 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18364 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018365 break
18366 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018367 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018368 else
18369 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18370 fi
18371done
18372
18373# For the awk script, D is an array of macro values keyed by name,
18374# likewise P contains macro parameters if any. Preserve backslash
18375# newline sequences.
18376
18377ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18378sed -n '
18379s/.\{148\}/&'"$ac_delim"'/g
18380t rset
18381:rset
18382s/^[ ]*#[ ]*define[ ][ ]*/ /
18383t def
18384d
18385:def
18386s/\\$//
18387t bsnl
18388s/["\\]/\\&/g
18389s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18390D["\1"]=" \3"/p
18391s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18392d
18393:bsnl
18394s/["\\]/\\&/g
18395s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18396D["\1"]=" \3\\\\\\n"\\/p
18397t cont
18398s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18399t cont
18400d
18401:cont
18402n
18403s/.\{148\}/&'"$ac_delim"'/g
18404t clear
18405:clear
18406s/\\$//
18407t bsnlc
18408s/["\\]/\\&/g; s/^/"/; s/$/"/p
18409d
18410:bsnlc
18411s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18412b cont
18413' <confdefs.h | sed '
18414s/'"$ac_delim"'/"\\\
18415"/g' >>$CONFIG_STATUS || ac_write_fail=1
18416
18417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18418 for (key in D) D_is_set[key] = 1
18419 FS = ""
18420}
18421/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18422 line = \$ 0
18423 split(line, arg, " ")
18424 if (arg[1] == "#") {
18425 defundef = arg[2]
18426 mac1 = arg[3]
18427 } else {
18428 defundef = substr(arg[1], 2)
18429 mac1 = arg[2]
18430 }
18431 split(mac1, mac2, "(") #)
18432 macro = mac2[1]
18433 prefix = substr(line, 1, index(line, defundef) - 1)
18434 if (D_is_set[macro]) {
18435 # Preserve the white space surrounding the "#".
18436 print prefix "define", macro P[macro] D[macro]
18437 next
18438 } else {
18439 # Replace #undef with comments. This is necessary, for example,
18440 # in the case of _POSIX_SOURCE, which is predefined and required
18441 # on some systems where configure will not decide to define it.
18442 if (defundef == "undef") {
18443 print "/*", prefix defundef, macro, "*/"
18444 next
18445 }
18446 }
18447}
18448{ print }
18449_ACAWK
18450_ACEOF
18451cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018452 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018453fi # test -n "$CONFIG_HEADERS"
18454
18455
18456eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18457shift
18458for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459do
18460 case $ac_tag in
18461 :[FHLC]) ac_mode=$ac_tag; continue;;
18462 esac
18463 case $ac_mode$ac_tag in
18464 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018465 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018466 :[FH]-) ac_tag=-:-;;
18467 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18468 esac
18469 ac_save_IFS=$IFS
18470 IFS=:
18471 set x $ac_tag
18472 IFS=$ac_save_IFS
18473 shift
18474 ac_file=$1
18475 shift
18476
18477 case $ac_mode in
18478 :L) ac_source=$1;;
18479 :[FH])
18480 ac_file_inputs=
18481 for ac_f
18482 do
18483 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018484 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485 *) # Look for the file first in the build tree, then in the source tree
18486 # (if the path is not absolute). The absolute path cannot be DOS-style,
18487 # because $ac_f cannot contain `:'.
18488 test -f "$ac_f" ||
18489 case $ac_f in
18490 [\\/$]*) false;;
18491 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18492 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018493 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018495 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18496 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497 done
18498
18499 # Let's still pretend it is `configure' which instantiates (i.e., don't
18500 # use $as_me), people would be surprised to read:
18501 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018502 configure_input='Generated from '`
18503 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18504 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505 if test x"$ac_file" != x-; then
18506 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018507 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18508$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018510 # Neutralize special characters interpreted by sed in replacement strings.
18511 case $configure_input in #(
18512 *\&* | *\|* | *\\* )
18513 ac_sed_conf_input=`$as_echo "$configure_input" |
18514 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18515 *) ac_sed_conf_input=$configure_input;;
18516 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018517
18518 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018519 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18520 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018521 esac
18522 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 esac
18524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018526$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018527 X"$ac_file" : 'X\(//\)[^/]' \| \
18528 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018530$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18532 s//\1/
18533 q
18534 }
18535 /^X\(\/\/\)[^/].*/{
18536 s//\1/
18537 q
18538 }
18539 /^X\(\/\/\)$/{
18540 s//\1/
18541 q
18542 }
18543 /^X\(\/\).*/{
18544 s//\1/
18545 q
18546 }
18547 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018548 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018549 ac_builddir=.
18550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018551case "$ac_dir" in
18552.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18553*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018554 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018556 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018557 case $ac_top_builddir_sub in
18558 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18559 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18560 esac ;;
18561esac
18562ac_abs_top_builddir=$ac_pwd
18563ac_abs_builddir=$ac_pwd$ac_dir_suffix
18564# for backward compatibility:
18565ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018566
18567case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018568 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018569 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570 ac_top_srcdir=$ac_top_builddir_sub
18571 ac_abs_top_srcdir=$ac_pwd ;;
18572 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018573 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574 ac_top_srcdir=$srcdir
18575 ac_abs_top_srcdir=$srcdir ;;
18576 *) # Relative name.
18577 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18578 ac_top_srcdir=$ac_top_build_prefix$srcdir
18579 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018580esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018581ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018582
Martin v. Löwis11437992002-04-12 09:54:03 +000018583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584 case $ac_mode in
18585 :F)
18586 #
18587 # CONFIG_FILE
18588 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018589
18590 case $INSTALL in
18591 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018592 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018593 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018594 ac_MKDIR_P=$MKDIR_P
18595 case $MKDIR_P in
18596 [\\/$]* | ?:[\\/]* ) ;;
18597 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18598 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018599_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600
Matthias Kloseb9621712010-04-24 17:59:49 +000018601cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018602# If the template does not know about datarootdir, expand it.
18603# FIXME: This hack should be removed a few years after 2.60.
18604ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018605ac_sed_dataroot='
18606/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018607 p
18608 q
18609}
18610/@datadir@/p
18611/@docdir@/p
18612/@infodir@/p
18613/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018614/@mandir@/p'
18615case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018616*datarootdir*) ac_datarootdir_seen=yes;;
18617*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018618 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18619$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018622 ac_datarootdir_hack='
18623 s&@datadir@&$datadir&g
18624 s&@docdir@&$docdir&g
18625 s&@infodir@&$infodir&g
18626 s&@localedir@&$localedir&g
18627 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018628 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018629esac
18630_ACEOF
18631
18632# Neutralize VPATH when `$srcdir' = `.'.
18633# Shell code in configure.ac might set extrasub.
18634# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018635cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18636ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018637$extrasub
18638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018639cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018640:t
18641/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018642s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018643s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018644s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018645s&@srcdir@&$ac_srcdir&;t t
18646s&@abs_srcdir@&$ac_abs_srcdir&;t t
18647s&@top_srcdir@&$ac_top_srcdir&;t t
18648s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18649s&@builddir@&$ac_builddir&;t t
18650s&@abs_builddir@&$ac_abs_builddir&;t t
18651s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18652s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018653s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018654$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018655"
Victor Stinnere0be4232011-10-25 13:06:09 +020018656eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18657 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018659test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018660 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18661 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18662 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018664which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018665$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018666which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018667
Victor Stinnere0be4232011-10-25 13:06:09 +020018668 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018669 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018670 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18671 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018672 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018673 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018674 ;;
18675 :H)
18676 #
18677 # CONFIG_HEADER
18678 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018679 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018680 {
18681 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018682 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18683 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018684 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018685 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018686 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18687$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018688 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018689 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018690 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018691 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018692 fi
18693 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018694 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018695 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018696 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018697 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018698 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018700
18701 esac
18702
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018703
18704 case $ac_file$ac_mode in
18705 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18706
18707 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018708done # for ac_tag
18709
Guido van Rossum627b2d71993-12-24 10:39:16 +000018710
Matthias Kloseb9621712010-04-24 17:59:49 +000018711as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018712_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018713ac_clean_files=$ac_clean_files_save
18714
Matthias Kloseb9621712010-04-24 17:59:49 +000018715test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018716 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018717
Martin v. Löwis11437992002-04-12 09:54:03 +000018718
18719# configure is writing to config.log, and then calls config.status.
18720# config.status does its own redirection, appending to config.log.
18721# Unfortunately, on DOS this fails, as config.log is still kept open
18722# by configure, so config.status won't be able to write to it; its
18723# output is simply discarded. So we exec the FD to /dev/null,
18724# effectively closing config.log, so it can be properly (re)opened and
18725# appended to by config.status. When coming back to configure, we
18726# need to make the FD available again.
18727if test "$no_create" != yes; then
18728 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018729 ac_config_status_args=
18730 test "$silent" = yes &&
18731 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018732 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018733 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018734 exec 5>>config.log
18735 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18736 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018737 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018738fi
18739if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18741$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018742fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018743
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018744
Christian Heimes75ed8902013-11-20 01:11:18 +010018745echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018746if test ! -f Modules/Setup.local
18747then
18748 echo "# Edit this file for local setup changes" >Modules/Setup.local
18749fi
18750
Christian Heimes75ed8902013-11-20 01:11:18 +010018751echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018752$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018753 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018754 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018755mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018756
18757if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18758 echo "" >&6
18759 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018760 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 +000018761 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018762 echo "" >&6
18763 echo "" >&6
18764fi
18765